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