base-specs/system-config-printer.spec
changeset 14658 f2a475c38abe
child 14089 2791513b88d1
child 14756 0517e3633a15
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/base-specs/system-config-printer.spec	Wed Nov 26 16:16:26 2008 +0000
@@ -0,0 +1,93 @@
+#
+# spec file for package system-config-printer
+#
+# includes module(s): system-onfig-printer
+#
+# Copyright (c) 2008 Sun Microsystems, Inc.
+# This file and all modifications and additions to the pristine
+# package are under the same license as the package itself.
+#
+# Owner: gheet
+#
+%{?!pythonver:%define pythonver 2.4}
+
+
+Name:         system-config-printer
+License:      GPL V2
+Group:        Development/Languages/Python
+Version:      1.0.9
+Release:      1
+Distribution: Java Desktop System
+Vendor:       Sun Microsystems, Inc.
+Summary:      Print Manager for CUPS
+Source:       http://cyberelk.net/tim/data/%{name}/1.0.x/%{name}-%{version}.tar.bz2
+Patch1:	      system-config-printer-01-temp-for-2.4.diff
+Patch2:	      system-config-printer-02-no-manpage.diff
+Patch3:	      system-config-printer-03-app-path.diff
+URL:          http://cyberelk.net/tim/software/%{name}
+BuildRoot:    %{_tmppath}/%{name}-%{version}-build
+Docdir:       %{_defaultdocdir}/doc
+Autoreqprov:  off
+Prereq:       /sbin/ldconfig
+Requires:     SUNWpycups
+# uncomment this once we sorted samba 3.2.x
+#Requires:     SUNWpysmbc
+BuildRequires: SUNWpycups
+#BuildRequires: SUNWpysmbc
+
+%description
+System Config Printer is a tool is to configure a CUPS server (often the local machine) 
+using the CUPS API. The tool is written in Python, using pygtk for the graphical parts 
+and with some Python bindings (pycups) for the CUPS API.
+
+It is largely the same as using the CUPS web interface for configuring printers, but 
+has the advantage of being a native application rather than a web page.
+
+%prep
+%setup -q -n %{name}-%{version}
+%patch01 -p0
+%patch02 -p0
+%patch03 -p0
+
+%build
+intltoolize --force --copy
+aclocal
+automake -a -c -f
+autoconf
+./configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc
+make install DESTDIR=$RPM_BUILD_ROOT
+
+%install
+python setup.py install --prefix=%{_prefix} --root=$RPM_BUILD_ROOT
+
+# move private directory from /usr/share to /usr/lib
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/%{name}
+mv $RPM_BUILD_ROOT%{_datadir}/%{name}/*.py \
+   $RPM_BUILD_ROOT%{_libdir}/%{name}
+mv $RPM_BUILD_ROOT%{_datadir}/%{name}/troubleshoot \
+   $RPM_BUILD_ROOT%{_libdir}/%{name}
+
+# Move system-config-printer-applet to /usr/lib/%{name}
+mv $RPM_BUILD_ROOT%{_bindir}/system-config-printer-applet \
+   $RPM_BUILD_ROOT%{_libdir}/%{name}
+
+# do not deliver my-default-printer
+rm $RPM_BUILD_ROOT%{_bindir}/my-default-printer
+rm $RPM_BUILD_ROOT%{_libdir}/%{name}/my-default-printer.py
+
+# Don't need desktop files as they are shared and managed by sym links
+rm -rf $RPM_BUILD_ROOT%{_datadir}/applications
+rm -rf $RPM_BUILD_ROOT/etc/xdg
+
+# move to vendor-packages
+mkdir -p $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/vendor-packages
+mv $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages/* \
+   $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/vendor-packages/
+rmdir $RPM_BUILD_ROOT%{_libdir}/python%{pythonver}/site-packages
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%changelog
+* Wed Nov 05 2008 - [email protected]
+- initial version