BR: rpmbuild(macros) >= 1.710
[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/
3a423aff 12BuildRequires: rpmbuild(macros) >= 1.710
19fe83c0 13BuildRequires: python-devel >= 2.3
e94d5b33 14%pyrequires_eq python-libs
19fe83c0 15Requires: python-pygtk-gtk >= 2.6.4
999f9c2f 16BuildArch: noarch
1c8cb75e 17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19%description
3f5276ff
JB
20PythonCAD is an open-source CAD package built designed around Python.
21As such, it aims to be a fully scriptable and customizable CAD
22program. It is initially designed to run under Linux, one of the BSD
23flavors, or Unix.
24
fcf44278
JR
25%description -l pl.UTF-8
26PythonCAD jest wolnodostępnym pakietem CAD zbudowanym w oparciu
27o Pythona. Dlatego ma być w pełni skryptowalnym i konfigurowalnym
28programem CAD. Jest przeznaczony do uruchamiania pod Linuksem, jedną
19fe83c0 29z wersji BSD lub Uniksem.
1c8cb75e 30
31%prep
32%setup -q -n %{name}-%{_ver}
33
19fe83c0
RT
34cat <<'EOF' >PythonCad.sh
35#!/bin/sh
36exec python %{py_sitescriptdir}/%{name}/gtkpycad.py $@
37EOF
38
39sed -i -e 's#Exec=/usr/bin/gtkpycad.py#Exec=PythonCad#' pythoncad.desktop
40sed -i -e 's#Categories=Office;Graphics;Application;Utility;X-Red-Hat-Base;#Categories=Utility;Engineering;#' pythoncad.desktop
41echo 'Comment[pl]=Aplikacja typ CAD' >> pythoncad.desktop
42echo '# vi: encoding=utf-8' >> pythoncad.desktop
43
1c8cb75e 44%build
1d9f1853 45%py_build
1c8cb75e 46
47%install
48rm -rf $RPM_BUILD_ROOT
19fe83c0
RT
49install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_desktopdir},%{_pixmapsdir},%{py_sitescriptdir}/%{name}}
50install -Dp PythonCad.sh $RPM_BUILD_ROOT%{_bindir}/PythonCad
51cp pythoncad.desktop $RPM_BUILD_ROOT%{_desktopdir}
52cp prefs.py $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
53cp gtkpycad.png $RPM_BUILD_ROOT%{_pixmapsdir}
1c8cb75e 54
1d9f1853 55%py_install
1c8cb75e 56
19fe83c0
RT
57find $RPM_BUILD_ROOT%{py_sitescriptdir} -name "*.py" | xargs rm
58cp gtkpycad.py $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
1c8cb75e 59
60%clean
61rm -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}/*
19fe83c0
RT
67%{py_sitescriptdir}/%{name}
68%{_sysconfdir}/%{name}
69%{_desktopdir}/pythoncad.desktop
70%{_pixmapsdir}/*.png
This page took 0.079126 seconds and 4 git commands to generate.