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 ...
8 %{?build_rhel:%define rhel 1}
10 %{?build_suse:%define suse 1}
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.}
20 %define _version DS1
-R35
22 Summary: PythonCAD scriptable CAD package
26 Group: Applications
/Engineering
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
36 BuildRequires
: python
>= %{pyver}
37 Requires: python
>= %{pyver}
38 Requires: pygtk2
>= 1.99.16
39 Requires: libxml2
-python
42 BuildRequires
: python
>= %{pyver}
43 Requires: python
>= %{pyver}
44 Requires: python
-gtk
>= 2.0
48 BuildRequires
: python
>= %{pyver}
49 Requires: python
>= %{pyver}
51 Requires: libxml2
-python
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
66 %setup -q
-n
%{name}-%{_version}
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
91 [ "$RPM_BUILD_ROOT"
!= "
/"
] && rm -rf "$RPM_BUILD_ROOT"
95 /usr
/%{_lib}/python
%pyver/site
-packages
/PythonCAD
/*
97 /etc
/pythoncad
/prefs.py
98 /usr
/share
/applications
/pythoncad.desktop
99 /usr
/share
/pixmaps
/gtkpycad.png
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
>
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
>
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
>