]> git.pld-linux.org Git - packages/PythonCAD.git/blob - PythonCAD.spec
BR: rpmbuild(macros) >= 1.710
[packages/PythonCAD.git] / PythonCAD.spec
1 %define _ver    %(echo %{version} | tr _ -)
2 Summary:        An open-source CAD package built designed around Python
3 Summary(pl.UTF-8):      Wolnodostępny pakiet CAD oparty o Pythona
4 Name:           PythonCAD
5 Version:        DS1_R28
6 Release:        1
7 License:        GPL
8 Group:          Applications/Engineering
9 Source0:        http://www.pythoncad.org/releases/%{name}-%{_ver}.tar.bz2
10 # Source0-md5:  2c310626518b875d998ce2fd391d79bb
11 URL:            http://www.pythoncad.org/
12 BuildRequires:  rpmbuild(macros) >= 1.710
13 BuildRequires:  python-devel >= 2.3
14 %pyrequires_eq  python-libs
15 Requires:       python-pygtk-gtk >= 2.6.4
16 BuildArch:      noarch
17 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19 %description
20 PythonCAD is an open-source CAD package built designed around Python.
21 As such, it aims to be a fully scriptable and customizable CAD
22 program. It is initially designed to run under Linux, one of the BSD
23 flavors, or Unix.
24
25 %description -l pl.UTF-8
26 PythonCAD jest wolnodostępnym pakietem CAD zbudowanym w oparciu
27 o Pythona. Dlatego ma być w pełni skryptowalnym i konfigurowalnym
28 programem CAD. Jest przeznaczony do uruchamiania pod Linuksem, jedną
29 z wersji BSD lub Uniksem.
30
31 %prep
32 %setup -q -n %{name}-%{_ver}
33
34 cat <<'EOF' >PythonCad.sh
35 #!/bin/sh
36 exec python %{py_sitescriptdir}/%{name}/gtkpycad.py $@
37 EOF
38
39 sed -i -e 's#Exec=/usr/bin/gtkpycad.py#Exec=PythonCad#' pythoncad.desktop
40 sed -i -e 's#Categories=Office;Graphics;Application;Utility;X-Red-Hat-Base;#Categories=Utility;Engineering;#' pythoncad.desktop
41 echo 'Comment[pl]=Aplikacja typ CAD' >> pythoncad.desktop
42 echo '# vi: encoding=utf-8' >> pythoncad.desktop
43
44 %build
45 %py_build
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_desktopdir},%{_pixmapsdir},%{py_sitescriptdir}/%{name}}
50 install -Dp PythonCad.sh $RPM_BUILD_ROOT%{_bindir}/PythonCad
51 cp pythoncad.desktop $RPM_BUILD_ROOT%{_desktopdir}
52 cp prefs.py $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
53 cp gtkpycad.png $RPM_BUILD_ROOT%{_pixmapsdir}
54
55 %py_install
56
57 find $RPM_BUILD_ROOT%{py_sitescriptdir} -name "*.py" | xargs rm
58 cp gtkpycad.py $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
59
60 %clean
61 rm -rf $RPM_BUILD_ROOT
62
63 %files
64 %defattr(644,root,root,755)
65 %doc README PKG-INFO NEWS
66 %attr(755,root,root) %{_bindir}/*
67 %{py_sitescriptdir}/%{name}
68 %{_sysconfdir}/%{name}
69 %{_desktopdir}/pythoncad.desktop
70 %{_pixmapsdir}/*.png
This page took 0.066811 seconds and 4 git commands to generate.