]> git.pld-linux.org Git - packages/PythonCAD.git/commitdiff
- updated to R28
authorRobert Tomasik <rotom@pld-linux.org>
Sat, 11 Feb 2006 23:02:04 +0000 (23:02 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- added .desktop and pixmaps
- updated Requires
- cleaned

Changed files:
    PythonCAD.spec -> 1.13

PythonCAD.spec

index f6a1e0ec42283ddb36c50ae39bd585a07db2c9b9..7bb55bdcbef888393765ffce5cb11def3458b802 100644 (file)
@@ -1,17 +1,17 @@
+%define        _ver    %(echo %{version} | tr _ -)
 Summary:       An open-source CAD package built designed around Python
 Summary(pl):   Wolnodostêpny pakiet CAD oparty o Pythona
 Name:          PythonCAD
-Version:       DS1_R19
-%define        _ver    %(echo %{version} | tr _ -)
-Release:       3
+Version:       DS1_R28
+Release:       1
 License:       GPL
 Group:         Applications/Engineering
 Source0:       http://www.pythoncad.org/releases/%{name}-%{_ver}.tar.bz2
-# Source0-md5: 3bfeb558044591c485fd569961d8b5a8
+# Source0-md5: 2c310626518b875d998ce2fd391d79bb
 URL:           http://www.pythoncad.org/
-BuildRequires: python-devel
+BuildRequires: python-devel >= 2.3
 %pyrequires_eq python-libs
-Requires:      python-pygtk-gtk >= 1.99.16
+Requires:      python-pygtk-gtk >= 2.6.4
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -22,26 +22,41 @@ program. It is initially designed to run under Linux, one of the BSD
 flavors, or Unix.
 
 %description -l pl
-PythonCAD jest wolnodostêpnym pakietem CAD zbudowanym w oparciu o
-Pythona. Dlatego ma byæ w pe³ni skryptowalnym i konfigurowalnym
-programem CAD. Pocz±tkowo jest przeznaczony do uruchamiania pod
-Linuksem, jedn± z wersji BSD lub Uniksem.
+PythonCAD jest wolnodostêpnym pakietem CAD zbudowanym w oparciu
+Pythona. Dlatego ma byæ w pe³ni skryptowalnym i konfigurowalnym
+programem CAD. Jest przeznaczony do uruchamiania pod Linuksem, jedn±
+z wersji BSD lub Uniksem.
 
 %prep
 %setup -q -n %{name}-%{_ver}
 
+cat <<'EOF' >PythonCad.sh
+#!/bin/sh
+exec python %{py_sitescriptdir}/%{name}/gtkpycad.py $@
+EOF
+
+sed -i -e 's#Exec=/usr/bin/gtkpycad.py#Exec=PythonCad#' pythoncad.desktop
+sed -i -e 's#Categories=Office;Graphics;Application;Utility;X-Red-Hat-Base;#Categories=Utility;Engineering;#' pythoncad.desktop
+echo 'Comment[pl]=Aplikacja typ CAD' >> pythoncad.desktop
+echo '# vi: encoding=utf-8' >> pythoncad.desktop
+
 %build
 python setup.py build
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_bindir},%{_desktopdir},%{_pixmapsdir},%{py_sitescriptdir}/%{name}}
+install -Dp PythonCad.sh $RPM_BUILD_ROOT%{_bindir}/PythonCad
+cp pythoncad.desktop $RPM_BUILD_ROOT%{_desktopdir}
+cp prefs.py $RPM_BUILD_ROOT%{_sysconfdir}/%{name}
+cp gtkpycad.png $RPM_BUILD_ROOT%{_pixmapsdir}
 
 python setup.py install \
        --optimize=2 \
        --root=$RPM_BUILD_ROOT
 
-install gtkpycad.py $RPM_BUILD_ROOT%{_bindir}
+find $RPM_BUILD_ROOT%{py_sitescriptdir} -name "*.py" | xargs rm
+cp gtkpycad.py $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -50,12 +65,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc README PKG-INFO NEWS
 %attr(755,root,root) %{_bindir}/*
-%dir %{py_sitescriptdir}/%{name}
-%dir %{py_sitescriptdir}/%{name}/Generic
-%{py_sitescriptdir}/%{name}/Generic/*.py[oc]
-%dir %{py_sitescriptdir}/%{name}/Interface
-%dir %{py_sitescriptdir}/%{name}/Interface/Gtk
-%{py_sitescriptdir}/%{name}/Interface/Gtk/*.py[oc]
-%dir %{py_sitescriptdir}/%{name}/Interface/Cocoa
-%{py_sitescriptdir}/%{name}/Interface/Cocoa/*.py[oc]
-%{py_sitescriptdir}/%{name}/Interface/*.py[oc]
+%{py_sitescriptdir}/%{name}
+%{_sysconfdir}/%{name}
+%{_desktopdir}/pythoncad.desktop
+%{_pixmapsdir}/*.png
This page took 0.060279 seconds and 4 git commands to generate.