diff --git a/.gitignore b/.gitignore index 9f66f9c..bd2fe06 100644 --- a/.gitignore +++ b/.gitignore @@ -225,3 +225,4 @@ pycups-1.9.51.tar.bz2 /pysmbc-1.0.9.tar.bz2 /system-config-printer-1.2.4.tar.xz /system-config-printer-1.2.5.tar.xz +/system-config-printer-1.2.95.tar.xz diff --git a/pysmbc-doczip.patch b/pysmbc-doczip.patch deleted file mode 100644 index 0918409..0000000 --- a/pysmbc-doczip.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up pysmbc-1.0.9/Makefile.doczip pysmbc-1.0.9/Makefile ---- pysmbc-1.0.9/Makefile.doczip 2010-06-29 06:18:10.000000000 +0100 -+++ pysmbc-1.0.9/Makefile 2010-08-22 15:42:14.085916441 +0100 -@@ -9,6 +9,8 @@ smbc.so: force - doc: smbc.so - rm -rf html - epydoc -o html --html $< -+ -+doczip: doc - cd html && zip ../smbc-html.zip * - - clean: diff --git a/sources b/sources index e8aa7d9..0c3dec4 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ -7e9de64bce9496ce2d36ab513dd69dd5 pycups-1.9.51.tar.bz2 -32b995dbf8419128f652279881b9023d pysmbc-1.0.9.tar.bz2 -600a231216fb7bde061ef753db9a7e54 system-config-printer-1.2.5.tar.xz +42bc90e9b2d558b332b03eb7b112fb94 system-config-printer-1.2.95.tar.xz diff --git a/system-config-printer-1.2.5.tar.xz.sig b/system-config-printer-1.2.5.tar.xz.sig deleted file mode 100644 index e55367a..0000000 Binary files a/system-config-printer-1.2.5.tar.xz.sig and /dev/null differ diff --git a/system-config-printer-1.2.95.tar.xz.sig b/system-config-printer-1.2.95.tar.xz.sig new file mode 100644 index 0000000..4c40407 Binary files /dev/null and b/system-config-printer-1.2.95.tar.xz.sig differ diff --git a/system-config-printer-InstallPrinterDrivers-debug.patch b/system-config-printer-InstallPrinterDrivers-debug.patch deleted file mode 100644 index d1df4ac..0000000 --- a/system-config-printer-InstallPrinterDrivers-debug.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -up system-config-printer-1.2.5/installdriver.py.InstallPrinterDrivers-debug system-config-printer-1.2.5/installdriver.py ---- system-config-printer-1.2.5/installdriver.py.InstallPrinterDrivers-debug 2010-10-12 17:03:22.000000000 +0100 -+++ system-config-printer-1.2.5/installdriver.py 2010-10-14 14:09:49.205869035 +0100 -@@ -22,6 +22,7 @@ - import dbus - import dbus.glib - import dbus.service -+from debug import debugprint - - class PrinterDriversInstaller(dbus.service.Object): - DBUS_PATH = "/com/redhat/PrinterDriversInstaller" -@@ -43,8 +44,12 @@ class PrinterDriversInstaller(dbus.servi - obj = bus.get_object ("org.freedesktop.PackageKit", - "/org/freedesktop/PackageKit") - proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") -- proxy.InstallPrinterDrivers (0, ["MFG:%s;MDL:%s;" % (mfg, mdl)], -- "hide-finished", -+ xid = 0 -+ resources = ["MFG:%s;MDL:%s;" % (mfg, mdl)] -+ interaction = "hide-finished" -+ debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % -+ (repr (xid), repr (resources), repr (interaction))) -+ proxy.InstallPrinterDrivers (xid, resources, interaction, - reply_handler=reply_handler, - error_handler=error_handler, - timeout=3600) -diff -up system-config-printer-1.2.5/ppdsloader.py.InstallPrinterDrivers-debug system-config-printer-1.2.5/ppdsloader.py ---- system-config-printer-1.2.5/ppdsloader.py.InstallPrinterDrivers-debug 2010-10-13 13:11:16.000000000 +0100 -+++ system-config-printer-1.2.5/ppdsloader.py 2010-10-14 14:09:49.207994422 +0100 -@@ -163,8 +163,11 @@ class PPDsLoader: - obj = self._bus.get_object ("org.freedesktop.PackageKit", - "/org/freedesktop/PackageKit") - proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") -- proxy.InstallPrinterDrivers (xid, [self._device_id], -- "hide-finished", -+ resources = [self._device_id] -+ interaction = "hide-finished" -+ debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % -+ (repr (xid), repr (resources), repr (interaction))) -+ proxy.InstallPrinterDrivers (xid, resources, interaction, - reply_handler=self._packagekit_reply, - error_handler=self._packagekit_error, - timeout=3600) diff --git a/system-config-printer-NPTLpdQueue.patch b/system-config-printer-NPTLpdQueue.patch deleted file mode 100644 index 4302015..0000000 --- a/system-config-printer-NPTLpdQueue.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -up system-config-printer-1.2.5/system-config-printer.py.NPTLpdQueue system-config-printer-1.2.5/system-config-printer.py ---- system-config-printer-1.2.5/system-config-printer.py.NPTLpdQueue 2010-10-22 11:18:13.000000000 +0200 -+++ system-config-printer-1.2.5/system-config-printer.py 2010-10-22 11:18:13.000000000 +0200 -@@ -6083,6 +6083,9 @@ class NewPrinterGUI(GtkGUI): - self.btnNPTLpdProbe.set_sensitive (len (hostname) > 0) - self.setNPButtons() - -+ def on_cmbentNPTLpdQueue_changed(self, cmbent): -+ self.setNPButtons() -+ - def on_btnNPTLpdProbe_clicked(self, button): - # read hostname, probe, fill printer names - hostname = self.cmbentNPTLpdHost.get_active_text() -diff -up system-config-printer-1.2.5/ui/NewPrinterWindow.glade.NPTLpdQueue system-config-printer-1.2.5/ui/NewPrinterWindow.glade ---- system-config-printer-1.2.5/ui/NewPrinterWindow.glade.NPTLpdQueue 2010-10-12 18:03:22.000000000 +0200 -+++ system-config-printer-1.2.5/ui/NewPrinterWindow.glade 2010-10-22 11:19:51.000000000 +0200 -@@ -752,7 +752,7 @@ ipp://printer.mydomain/ipp - - - -- -+ - - - 1 diff --git a/system-config-printer-mfg-mdl.patch b/system-config-printer-mfg-mdl.patch deleted file mode 100644 index 301e1a1..0000000 --- a/system-config-printer-mfg-mdl.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff -up system-config-printer-1.2.5/ppdsloader.py.mfg-mdl system-config-printer-1.2.5/ppdsloader.py ---- system-config-printer-1.2.5/ppdsloader.py.mfg-mdl 2010-10-14 14:09:49.207994422 +0100 -+++ system-config-printer-1.2.5/ppdsloader.py 2010-10-14 16:21:15.821926650 +0100 -@@ -133,6 +133,8 @@ class PPDsLoader: - if (status != ppds.STATUS_SUCCESS and - self._packagekit_queried == False and - self._local_cups == True): -+ self._gpk_device_id = "MFG:%s;MDL:%s;" % (devid_dict["MFG"], -+ devid_dict["MDL"]) - self._query_packagekit () - self._packagekit_queried = True - return -@@ -163,7 +165,7 @@ class PPDsLoader: - obj = self._bus.get_object ("org.freedesktop.PackageKit", - "/org/freedesktop/PackageKit") - proxy = dbus.Interface (obj, "org.freedesktop.PackageKit.Modify") -- resources = [self._device_id] -+ resources = [self._gpk_device_id] - interaction = "hide-finished" - debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % - (repr (xid), repr (resources), repr (interaction))) diff --git a/system-config-printer-statusicon.patch b/system-config-printer-statusicon.patch deleted file mode 100644 index aeab7af..0000000 --- a/system-config-printer-statusicon.patch +++ /dev/null @@ -1,382 +0,0 @@ -diff -up system-config-printer-1.2.5/applet.py.statusicon system-config-printer-1.2.5/applet.py ---- system-config-printer-1.2.5/applet.py.statusicon 2010-10-12 17:03:22.000000000 +0100 -+++ system-config-printer-1.2.5/applet.py 2010-11-22 13:19:08.690523505 +0000 -@@ -80,7 +80,7 @@ class NewPrinterNotification(dbus.servic - pass - runloop = gobject.MainLoop () - viewer = jobviewer.JobViewer(bus=bus, loop=runloop, -- trayicon=trayicon, -+ applet=applet, - suppress_icon_hide=True) - - @dbus.service.method(PDS_IFACE, in_signature='', out_signature='') -@@ -292,7 +292,7 @@ def show_version (): - - global waitloop, runloop, viewer - --trayicon = True -+applet = True - waitloop = runloop = None - viewer = None - -@@ -316,7 +316,7 @@ if __name__ == '__main__': - show_version () - sys.exit (0) - if opt == "--no-tray-icon": -- trayicon = False -+ applet = False - elif opt == "--debug": - set_debugging (True) - -@@ -328,7 +328,7 @@ if __name__ == '__main__': - except: - pass - -- if trayicon: -+ if applet: - # Stop running when the session ends. - def monitor_session (*args): - pass -@@ -352,7 +352,7 @@ if __name__ == '__main__': - finally: - sys.exit (1) - -- if trayicon: -+ if applet: - try: - NewPrinterNotification(bus) - except: -@@ -374,7 +374,7 @@ if __name__ == '__main__': - except: - pass - -- if trayicon and get_debugging () == False: -+ if applet and get_debugging () == False: - # Start off just waiting for print jobs. - def any_jobs (): - try: -@@ -437,7 +437,7 @@ if __name__ == '__main__': - runloop = gobject.MainLoop () - gtk.window_set_default_icon_name ('printer') - viewer = jobviewer.JobViewer(bus=bus, loop=runloop, -- trayicon=trayicon) -+ applet=applet) - - try: - runloop.run() -diff -up system-config-printer-1.2.5/jobviewer.py.statusicon system-config-printer-1.2.5/jobviewer.py ---- system-config-printer-1.2.5/jobviewer.py.statusicon 2010-10-13 13:11:15.000000000 +0100 -+++ system-config-printer-1.2.5/jobviewer.py 2010-11-22 13:22:40.847137433 +0000 -@@ -277,15 +277,18 @@ class JobViewer (GtkGUI, monitor.Watcher - 'time-at-creation']) - - def __init__(self, bus=None, loop=None, -- trayicon=False, suppress_icon_hide=False, -+ applet=False, suppress_icon_hide=False, - my_jobs=True, specific_dests=None, exit_handler=None, - parent=None): - self.loop = loop -- self.trayicon = trayicon -+ self.applet = applet - self.suppress_icon_hide = suppress_icon_hide - self.my_jobs = my_jobs - self.specific_dests = specific_dests - self.exit_handler = exit_handler -+ notify_caps = pynotify.get_server_caps () -+ self.notify_has_actions = "actions" in notify_caps -+ self.notify_has_persistence = "persistence" in notify_caps - - self.jobs = {} - self.jobiters = {} -@@ -403,8 +406,8 @@ class JobViewer (GtkGUI, monitor.Watcher - (False, True, _("Document"), self._set_job_document_text), - (False, True, _("Printer"), self._set_job_printer_text), - (False, False, _("Size"), self._set_job_size_text)]: -- if trayicon and skip: -- # Skip the user column for the trayicon. -+ if applet and skip: -+ # Skip the user column when running as applet. - continue - - cell = gtk.CellRendererText() -@@ -493,7 +496,7 @@ class JobViewer (GtkGUI, monitor.Watcher - 1.0, 1.0, - gtk.gdk.INTERP_BILINEAR, - 127) -- if self.trayicon: -+ if self.applet and not self.notify_has_persistence: - self.statusicon = gtk.StatusIcon () - pixbuf = load_icon (theme, ICON) - self.statusicon.set_from_pixbuf (pixbuf) -@@ -514,7 +517,7 @@ class JobViewer (GtkGUI, monitor.Watcher - host=self.host, port=self.port, - encryption=self.encryption) - -- if not self.trayicon: -+ if not self.applet: - self.JobsWindow.show () - - self.JobsAttributesWindow = gtk.Window() -@@ -583,6 +586,9 @@ class JobViewer (GtkGUI, monitor.Watcher - - # Handle "special" status icon - def set_special_statusicon (self, iconname, tooltip=None): -+ if self.notify_has_persistence: -+ return -+ - self.special_status_icon = True - self.statusicon.set_from_icon_name (iconname) - self.set_statusicon_visibility () -@@ -590,6 +596,9 @@ class JobViewer (GtkGUI, monitor.Watcher - self.set_statusicon_tooltip (tooltip=tooltip) - - def unset_special_statusicon (self): -+ if self.notify_has_persistence: -+ return -+ - self.special_status_icon = False - self.statusicon.set_from_pixbuf (self.saved_statusicon_pixbuf) - self.set_statusicon_visibility () -@@ -600,7 +609,9 @@ class JobViewer (GtkGUI, monitor.Watcher - notification.set_data ('printer-name', printer) - notification.connect ('closed', self.on_new_printer_notification_closed) - self.set_statusicon_visibility () -- notification.attach_to_status_icon (self.statusicon) -+ if not self.notify_has_persistence: -+ notification.attach_to_status_icon (self.statusicon) -+ - try: - notification.show () - except gobject.GError: -@@ -617,7 +628,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.statusicon.set_from_pixbuf (pb) - - def on_delete_event(self, *args): -- if self.trayicon or not self.loop: -+ if self.applet or not self.loop: - self.JobsWindow.hide () - self.JobsWindow.set_data ('visible', False) - if not self.loop: -@@ -642,25 +653,31 @@ class JobViewer (GtkGUI, monitor.Watcher - if force_show: - visible = False - -- if visible: -- w = self.JobsWindow.window -- aw = self.JobsAttributesWindow.window -- (s, area, o) = self.statusicon.get_geometry () -- w.set_skip_taskbar_hint (True) -- if aw != None: -- aw.set_skip_taskbar_hint (True) -- -- w.property_change ("_NET_WM_ICON_GEOMETRY", -- "CARDINAL", 32, -- gtk.gdk.PROP_MODE_REPLACE, -- list (area)) -- self.JobsWindow.iconify () -+ if self.notify_has_persistence: -+ if visible: -+ self.JobsWindow.hide () -+ else: -+ self.JobsWindow.show () - else: -- self.JobsWindow.present () -- self.JobsWindow.window.set_skip_taskbar_hint (False) -- aw = self.JobsAttributesWindow.window -- if aw != None: -- aw.set_skip_taskbar_hint (False) -+ if visible: -+ w = self.JobsWindow.window -+ aw = self.JobsAttributesWindow.window -+ (s, area, o) = self.statusicon.get_geometry () -+ w.set_skip_taskbar_hint (True) -+ if aw != None: -+ aw.set_skip_taskbar_hint (True) -+ -+ w.property_change ("_NET_WM_ICON_GEOMETRY", -+ "CARDINAL", 32, -+ gtk.gdk.PROP_MODE_REPLACE, -+ list (area)) -+ self.JobsWindow.iconify () -+ else: -+ self.JobsWindow.present () -+ self.JobsWindow.window.set_skip_taskbar_hint (False) -+ aw = self.JobsAttributesWindow.window -+ if aw != None: -+ aw.set_skip_taskbar_hint (False) - - self.JobsWindow.set_data ('visible', not visible) - -@@ -857,7 +874,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.treeview.queue_draw () - - # Check whether authentication is required. -- if self.trayicon: -+ if self.applet: - job_requires_auth = (s == cups.IPP_JOB_HELD and - data.get ('job-hold-until', 'none') == - 'auth-info-required') -@@ -1041,7 +1058,7 @@ class JobViewer (GtkGUI, monitor.Watcher - dialog.destroy () - - def set_statusicon_visibility (self): -- if not self.trayicon: -+ if not self.applet: - return - - if self.suppress_icon_hide: -@@ -1061,6 +1078,9 @@ class JobViewer (GtkGUI, monitor.Watcher - debugprint ("num_jobs: %d" % num_jobs) - debugprint ("num_jobs_when_hidden: %d" % self.num_jobs_when_hidden) - -+ if self.notify_has_persistence: -+ return -+ - self.statusicon.set_visible (self.special_status_icon or - open_notifications > 0 or - num_jobs > self.num_jobs_when_hidden) -@@ -1495,7 +1515,7 @@ class JobViewer (GtkGUI, monitor.Watcher - return pixbuf - - def get_icon_pixbuf (self, have_jobs=None): -- if not self.trayicon: -+ if not self.applet: - return - - if have_jobs == None: -@@ -1519,7 +1539,7 @@ class JobViewer (GtkGUI, monitor.Watcher - return pixbuf - - def set_statusicon_tooltip (self, tooltip=None): -- if not self.trayicon: -+ if not self.applet: - return - - if tooltip == None: -@@ -1577,7 +1597,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.statusbar.pop (0) - self.statusbar_set = False - -- if self.trayicon: -+ if self.applet: - pixbuf = self.get_icon_pixbuf (have_jobs=have_jobs) - self.set_statusicon_from_pixbuf (pixbuf) - self.set_statusicon_visibility () -@@ -1623,13 +1643,15 @@ class JobViewer (GtkGUI, monitor.Watcher - notification = pynotify.Notification (title, text, 'printer') - reason.user_notified = True - notification.set_urgency (urgency) -- if "actions" in pynotify.get_server_caps(): -+ if self.notify_has_actions: - notification.set_timeout (pynotify.EXPIRES_NEVER) - notification.connect ('closed', - self.on_state_reason_notification_closed) - self.state_reason_notifications[reason.get_tuple ()] = notification - self.set_statusicon_visibility () -- notification.attach_to_status_icon (self.statusicon) -+ if not self.notify_has_persistence: -+ notification.attach_to_status_icon (self.statusicon) -+ - try: - notification.show () - except gobject.GError: -@@ -1685,7 +1707,9 @@ class JobViewer (GtkGUI, monitor.Watcher - notification.set_data ('jobid', jobid) - self.completed_job_notifications[jobid] = notification - self.set_statusicon_visibility () -- notification.attach_to_status_icon (self.statusicon) -+ if not self.notify_has_persistence: -+ notification.attach_to_status_icon (self.statusicon) -+ - try: - notification.show () - except gobject.GError: -@@ -1755,7 +1779,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.active_jobs.remove (jobid) - - self.update_status (have_jobs=True) -- if self.trayicon: -+ if self.applet: - if not self.job_is_active (jobdata): - return - -@@ -1792,9 +1816,9 @@ class JobViewer (GtkGUI, monitor.Watcher - jobdata = self.jobs[jobid] - - # If the job has finished, let the user know. -- if self.trayicon and (eventname == 'job-completed' or -- (eventname == 'job-state-changed' and -- event['job-state'] == cups.IPP_JOB_COMPLETED)): -+ if self.applet and (eventname == 'job-completed' or -+ (eventname == 'job-state-changed' and -+ event['job-state'] == cups.IPP_JOB_COMPLETED)): - reasons = event['job-state-reasons'] - if type (reasons) != list: - reasons = [reasons] -@@ -1809,7 +1833,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.notify_completed_job (jobid) - - # Look out for stopped jobs. -- if (self.trayicon and -+ if (self.applet and - (eventname == 'job-stopped' or - (eventname == 'job-state-changed' and - event['job-state'] in [cups.IPP_JOB_STOPPED, -@@ -1869,7 +1893,7 @@ class JobViewer (GtkGUI, monitor.Watcher - - if may_be_problem: - debugprint ("Problem detected") -- self.toggle_window_display (self.statusicon, force_show=True) -+ self.toggle_window_display (None, force_show=True) - dialog = gtk.Dialog (_("Print Error"), self.JobsWindow, 0, - (_("_Diagnose"), gtk.RESPONSE_NO, - gtk.STOCK_OK, gtk.RESPONSE_OK)) -@@ -1913,9 +1937,9 @@ class JobViewer (GtkGUI, monitor.Watcher - monitor.Watcher.job_removed (self, mon, jobid, eventname, event) - - # If the job has finished, let the user know. -- if self.trayicon and (eventname == 'job-completed' or -- (eventname == 'job-state-changed' and -- event['job-state'] == cups.IPP_JOB_COMPLETED)): -+ if self.applet and (eventname == 'job-completed' or -+ (eventname == 'job-state-changed' and -+ event['job-state'] == cups.IPP_JOB_COMPLETED)): - reasons = event['job-state-reasons'] - debugprint (reasons) - if type (reasons) != list: -@@ -1960,7 +1984,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.update_status () - self.treeview.queue_draw () - -- if not self.trayicon: -+ if not self.applet: - return - - # Find out if the user has jobs queued for that printer. -@@ -1993,7 +2017,7 @@ class JobViewer (GtkGUI, monitor.Watcher - self.update_status () - self.treeview.queue_draw () - -- if not self.trayicon: -+ if not self.applet: - return - - tuple = reason.get_tuple () -@@ -2014,7 +2038,7 @@ class JobViewer (GtkGUI, monitor.Watcher - - def still_connecting (self, mon, reason): - monitor.Watcher.still_connecting (self, mon, reason) -- if not self.trayicon: -+ if not self.applet: - return - - self.notify_printer_state_reason (reason) -@@ -2022,7 +2046,7 @@ class JobViewer (GtkGUI, monitor.Watcher - def now_connected (self, mon, printer): - monitor.Watcher.now_connected (self, mon, printer) - -- if not self.trayicon: -+ if not self.applet: - return - - # Find the connecting-to-device state reason. diff --git a/system-config-printer-uint32.patch b/system-config-printer-uint32.patch deleted file mode 100644 index b008907..0000000 --- a/system-config-printer-uint32.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff -up system-config-printer-1.2.5/installdriver.py.uint32 system-config-printer-1.2.5/installdriver.py ---- system-config-printer-1.2.5/installdriver.py.uint32 2010-10-29 14:42:04.310843583 +0100 -+++ system-config-printer-1.2.5/installdriver.py 2010-10-29 15:30:47.524996563 +0100 -@@ -49,7 +49,8 @@ class PrinterDriversInstaller(dbus.servi - interaction = "hide-finished" - debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % - (repr (xid), repr (resources), repr (interaction))) -- proxy.InstallPrinterDrivers (xid, resources, interaction, -+ proxy.InstallPrinterDrivers (dbus.UInt32 (xid), -+ resources, interaction, - reply_handler=reply_handler, - error_handler=error_handler, - timeout=3600) -diff -up system-config-printer-1.2.5/ppdsloader.py.uint32 system-config-printer-1.2.5/ppdsloader.py ---- system-config-printer-1.2.5/ppdsloader.py.uint32 2010-10-29 14:42:04.323844010 +0100 -+++ system-config-printer-1.2.5/ppdsloader.py 2010-10-29 15:30:47.525996440 +0100 -@@ -169,7 +169,8 @@ class PPDsLoader: - interaction = "hide-finished" - debugprint ("Calling InstallPrinterDrivers (%s, %s, %s)" % - (repr (xid), repr (resources), repr (interaction))) -- proxy.InstallPrinterDrivers (xid, resources, interaction, -+ proxy.InstallPrinterDrivers (dbus.UInt32 (xid), -+ resources, interaction, - reply_handler=self._packagekit_reply, - error_handler=self._packagekit_error, - timeout=3600) diff --git a/system-config-printer.spec b/system-config-printer.spec index 1bfc2de..498c784 100644 --- a/system-config-printer.spec +++ b/system-config-printer.spec @@ -1,35 +1,21 @@ -%global pycups_version 1.9.51 -%global pysmbc_version 1.0.9 %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?pyver: %global pyver %(%{__python} -c "import sys ; print sys.version[:3]")} Summary: A printer administration tool Name: system-config-printer -Version: 1.2.5 -Release: 8%{?dist} +Version: 1.2.95 +Release: 1%{?dist} License: GPLv2+ URL: http://cyberelk.net/tim/software/system-config-printer/ Group: System Environment/Base Source0: http://cyberelk.net/tim/data/system-config-printer/1.2/%{name}-%{version}.tar.xz -# Python bindings for libcups -Source1: http://cyberelk.net/tim/data/pycups/pycups-%{pycups_version}.tar.bz2 -# Python bindings for libsmbclient -Source2: http://pypi.python.org/packages/source/p/pysmbc/pysmbc-%{pysmbc_version}.tar.bz2 -Patch1: system-config-printer-InstallPrinterDrivers-debug.patch -Patch2: system-config-printer-mfg-mdl.patch -Patch3: system-config-printer-NPTLpdQueue.patch -Patch4: system-config-printer-uint32.patch -Patch5: system-config-printer-statusicon.patch -Patch101: pysmbc-doczip.patch BuildRequires: cups-devel >= 1.2 -BuildRequires: python-devel >= 2.4 -BuildRequires: libsmbclient-devel >= 3.2 BuildRequires: desktop-file-utils >= 0.2.92 BuildRequires: gettext-devel BuildRequires: intltool BuildRequires: libusb-devel, libudev-devel, glib2-devel -BuildRequires: epydoc, xmlto +BuildRequires: xmlto BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -44,6 +30,7 @@ Requires: desktop-notification-daemon Requires: notify-python Requires: gnome-python2-gnomekeyring Requires: libxml2-python +Requires: python-smbc Obsoletes: system-config-printer-gui <= 0.6.152 Provides: system-config-printer-gui = 0.6.152 @@ -59,8 +46,7 @@ the user to configure a CUPS print server. Summary: Libraries and shared code for printer administration tool Group: System Environment/Base Requires: python -Provides: pycups = %{pycups_version} -Provides: pysmbc = %{pysmbc_version} +Requires: python-cups %description libs The common code used by both the graphical and non-graphical parts of @@ -78,55 +64,17 @@ The udev rules and helper programs for automatically configuring USB printers. %prep -%setup -q -a 1 -a 2 - -# Show debug output whenever InstallPrinterDrivers is called. -%patch1 -p1 -b .InstallPrinterDrivers-debug - -# Always use MFG and MDL fields for InstallPrinterDrivers interface -# (bug #643073). -%patch2 -p1 -b .mfg-mdl - -# Don't check ComboBoxEntry for allowed characters (bug #644131). -%patch3 -p1 -b .NPTLpdQueue - -# Make sure InstallPrinterDrivers gets correctly typed values (bug #647270). -%patch4 -p1 -b .uint32 - -# Don't use status icon if notification server supports persistence. -%patch5 -p1 -b .statusicon - -pushd pysmbc-%{pysmbc_version} -%patch101 -p1 -b .doczip -popd +%setup -q %build %configure --with-udev-rules -pushd pycups-%{pycups_version} -make -make doc -popd - -pushd pysmbc-%{pysmbc_version} -make -make doc -popd - %install rm -rf %buildroot make DESTDIR=%buildroot install \ udevrulesdir=/lib/udev/rules.d \ udevhelperdir=/lib/udev -pushd pycups-%{pycups_version} -make DESTDIR=%buildroot install -popd - -pushd pysmbc-%{pysmbc_version} -make DESTDIR=%buildroot install -popd - %{__mkdir_p} %buildroot%{_localstatedir}/run/udev-configure-printer touch %buildroot%{_localstatedir}/run/udev-configure-printer/usb-uris @@ -138,19 +86,18 @@ rm -rf %buildroot %files libs -f system-config-printer.lang %defattr(-,root,root,-) %doc COPYING -%doc --parents pycups-%{pycups_version}/{COPYING,ChangeLog,README,NEWS,TODO,examples,html} -%doc --parents pysmbc-%{pysmbc_version}/{COPYING,README,NEWS,TODO,html} -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/newprinternotification.conf -%config(noreplace) %{_sysconfdir}/dbus-1/system.d/printerdriversinstaller.conf -%{python_sitearch}/cups.so -%{python_sitearch}/pycups-%{pycups_version}-py%{pyver}.egg-info -%{python_sitearch}/smbc.so -%{python_sitearch}/pysmbc-%{pysmbc_version}-py%{pyver}.egg-info +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.NewPrinterNotification.conf +%config(noreplace) %{_sysconfdir}/dbus-1/system.d/com.redhat.PrinterDriversInstaller.conf +%dir %{_sysconfdir}/cupshelpers +%config(noreplace) %{_sysconfdir}/cupshelpers/preferreddrivers.xml %dir %{python_sitelib}/cupshelpers %{python_sitelib}/cupshelpers/__init__.py* +%{python_sitelib}/cupshelpers/config.py* %{python_sitelib}/cupshelpers/cupshelpers.py* +%{python_sitelib}/cupshelpers/installdriver.py* %{python_sitelib}/cupshelpers/openprinting.py* %{python_sitelib}/cupshelpers/ppds.py* +%{python_sitelib}/cupshelpers/xmldriverprefs.py* %{python_sitelib}/*.egg-info %files udev @@ -165,8 +112,10 @@ rm -rf %buildroot %doc ChangeLog README %{_bindir}/%{name} %{_bindir}/%{name}-applet +%{_bindir}/scp-dbus-service +%{_datadir}/dbus-1/interfaces/*.xml +%{_datadir}/dbus-1/services/*.service %dir %{_datadir}/%{name} -%{_datadir}/%{name}/AdvancedServerSettings.py* %{_datadir}/%{name}/asyncconn.py* %{_datadir}/%{name}/asyncipp.py* %{_datadir}/%{name}/asyncpk1.py* @@ -184,18 +133,22 @@ rm -rf %buildroot %{_datadir}/%{name}/gtkspinner.py* %{_datadir}/%{name}/gui.py* %{_datadir}/%{name}/HIG.py* -%{_datadir}/%{name}/installdriver.py* %{_datadir}/%{name}/installpackage.py* %{_datadir}/%{name}/jobviewer.py* %{_datadir}/%{name}/monitor.py* +%{_datadir}/%{name}/newprinter.py* %{_datadir}/%{name}/options.py* %{_datadir}/%{name}/optionwidgets.py* %{_datadir}/%{name}/PhysicalDevice.py* +%{_datadir}/%{name}/ppdcache.py* %{_datadir}/%{name}/ppdippstr.py* %{_datadir}/%{name}/ppdsloader.py* +%{_datadir}/%{name}/printerproperties.py* %{_datadir}/%{name}/probe_printer.py* %{_datadir}/%{name}/pysmb.py* +%{_datadir}/%{name}/scp-dbus-service.py* %{_datadir}/%{name}/SearchCriterion.py* +%{_datadir}/%{name}/serversettings.py* %{_datadir}/%{name}/smburi.py* %{_datadir}/%{name}/statereason.py* %{_datadir}/%{name}/system-config-printer.py* @@ -207,10 +160,12 @@ rm -rf %buildroot %{_datadir}/%{name}/applet.py* %{_datadir}/%{name}/troubleshoot %{_datadir}/%{name}/icons +%dir %{_datadir}/%{name}/xml +%{_datadir}/%{name}/xml/*.rng +%{_datadir}/%{name}/xml/validate.py* %dir %{_datadir}/%{name}/ui %{_datadir}/%{name}/ui/*.glade %{_datadir}/applications/system-config-printer.desktop -%{_datadir}/applications/manage-print-jobs.desktop %{_sysconfdir}/xdg/autostart/print-applet.desktop %{_mandir}/man1/* @@ -219,6 +174,11 @@ rm -rf %buildroot exit 0 %changelog +* Thu Nov 25 2010 Tim Waugh - 1.2.95-1 +- 1.2.95. +- Removed pycups and pysmbc tarballs as they are now packaged + separately as python-cups and python-smbc. + * Mon Nov 22 2010 Tim Waugh - 1.2.5-8 - Added in missing part of patch for last change (bug #655317).