PythonCAD/Interface/Gtk/gtkentities.py: Update copyright year.
[pythoncad.git] / pythoncad.spec
blob0c57ac2438475254946a9e6e53eb4c97d4e02d09
1 %{expand: %%define pyver %(python -c 'import sys;print(sys.version[0:3])')}
3 # platform defines - set one below or define the build_xxx on the command line
5 # fixme: add a Fedora line in here ...
7 %define rhel 0
8 %{?build_rhel:%define rhel 1}
9 %define suse 0
10 %{?build_suse:%define suse 1}
11 %define mdk 0
12 %{?build_mdk:%define mdk 1}
14 # test for a platform definition
15 %if ! %{rhel} && ! %{suse} && ! %{mdk}
16 %{error: You must specify a platform. Please examine the spec file.}
17 exit 1
18 %endif
20 %define _version DS1-R35
22 Summary: PythonCAD scriptable CAD package
23 Name: PythonCAD
24 Version: 0.1.35
25 Release: 1
26 Group: Applications/Engineering
27 License: GPL v2
28 Source: %{name}-%{_version}.tar.gz
29 #Patch0: %{_version}.patch
30 BuildRoot: %{_tmppath}/%{name}-root
31 URL: http://www.pythoncad.org/
32 Packager: D. Scott Barninger <barninger at fairfieldcomputers dot com>
33 BuildArchitectures: noarch
35 %if %{rhel}
36 BuildRequires: python >= %{pyver}
37 Requires: python >= %{pyver}
38 Requires: pygtk2 >= 1.99.16
39 Requires: libxml2-python
40 %endif
41 %if %{suse}
42 BuildRequires: python >= %{pyver}
43 Requires: python >= %{pyver}
44 Requires: python-gtk >= 2.0
45 Requires: python-xml
46 %endif
47 %if %{mdk}
48 BuildRequires: python >= %{pyver}
49 Requires: python >= %{pyver}
50 Requires: pygtk2.0
51 Requires: libxml2-python
52 %endif
55 %description
56 PythonCAD is a CAD package written, surprisingly enough, in Python.
57 The PythonCAD project aims to produce a scriptable, open-source, easy to use
58 CAD package for Linux, the various flavors of BSD Unix, commercial Unix, and
59 other platforms to which someone who is interested ports the program. Work
60 began on PythonCAD in July, 2002, and the first public release was on
61 December 21, 2002.
64 %prep
66 %setup -q -n %{name}-%{_version}
67 #%patch -p0
69 %build
71 %install
73 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
75 python setup.py install --prefix=/usr --root=$RPM_BUILD_ROOT
76 mkdir -p $RPM_BUILD_ROOT/usr/bin
77 mkdir -p $RPM_BUILD_ROOT/etc/pythoncad
78 mkdir -p $RPM_BUILD_ROOT/usr/share/pixmaps
79 mkdir -p $RPM_BUILD_ROOT/usr/share/applications
80 cp gtkpycad.py $RPM_BUILD_ROOT/usr/bin/
81 cp prefs.py $RPM_BUILD_ROOT/etc/pythoncad/
82 cp pythoncad.desktop $RPM_BUILD_ROOT/usr/share/applications/
83 cp gtkpycad.png $RPM_BUILD_ROOT/usr/share/pixmaps/
84 chmod 755 $RPM_BUILD_ROOT/usr/bin/gtkpycad.py
85 chmod 644 $RPM_BUILD_ROOT/etc/pythoncad/prefs.py
86 chmod 644 $RPM_BUILD_ROOT/usr/share/applications/pythoncad.desktop
87 chmod 644 $RPM_BUILD_ROOT/usr/share/pixmaps/gtkpycad.png
90 %clean
91 [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf "$RPM_BUILD_ROOT"
93 %files
94 %defattr(-,root,root)
95 /usr/%{_lib}/python%pyver/site-packages/PythonCAD/*
96 /usr/bin/gtkpycad.py
97 /etc/pythoncad/prefs.py
98 /usr/share/applications/pythoncad.desktop
99 /usr/share/pixmaps/gtkpycad.png
101 %post
103 %preun
105 %changelog
106 * Fri Dec 01 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
107 - add prefix specification to install
108 * Sun Oct 01 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
109 - release 0.1.34
110 * Wed Feb 1 2006 Art Haas <ahaas@airmail.net>
111 - Update version numbers
112 * Sat Jan 27 2006 D. Scott Barninger <barninger at fairfieldcomputers.com>
113 - release 0.1.27
114 * Sat Jan 15 2005 D. Scott Barninger <barninger at fairfieldcomputers.com>
115 - setup version strings so we don't have to repackage source
116 * Fri Oct 15 2004 D. Scott Barninger <barninger at fairfieldcomputers.com>
117 - initial spec file