]> git.pld-linux.org Git - packages/PythonCAD.git/blame_incremental - PythonCAD.spec
BR: rpmbuild(macros) >= 1.710
[packages/PythonCAD.git] / PythonCAD.spec
... / ...
CommitLineData
1%define _ver %(echo %{version} | tr _ -)
2Summary: An open-source CAD package built designed around Python
3Summary(pl.UTF-8): Wolnodostępny pakiet CAD oparty o Pythona
4Name: PythonCAD
5Version: DS1_R28
6Release: 1
7License: GPL
8Group: Applications/Engineering
9Source0: http://www.pythoncad.org/releases/%{name}-%{_ver}.tar.bz2
10# Source0-md5: 2c310626518b875d998ce2fd391d79bb
11URL: http://www.pythoncad.org/
12BuildRequires: rpmbuild(macros) >= 1.710
13BuildRequires: python-devel >= 2.3
14%pyrequires_eq python-libs
15Requires: python-pygtk-gtk >= 2.6.4
16BuildArch: noarch
17BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18
19%description
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
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ą
29z wersji BSD lub Uniksem.
30
31%prep
32%setup -q -n %{name}-%{_ver}
33
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
44%build
45%py_build
46
47%install
48rm -rf $RPM_BUILD_ROOT
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}
54
55%py_install
56
57find $RPM_BUILD_ROOT%{py_sitescriptdir} -name "*.py" | xargs rm
58cp gtkpycad.py $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
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}/*
67%{py_sitescriptdir}/%{name}
68%{_sysconfdir}/%{name}
69%{_desktopdir}/pythoncad.desktop
70%{_pixmapsdir}/*.png
This page took 0.0873 seconds and 4 git commands to generate.