yazıcı için paketler

This commit is contained in:
alihanozturk
2016-01-09 23:55:25 +02:00
parent 83b09584be
commit 858643879e
76 changed files with 11967 additions and 13 deletions
@@ -0,0 +1,28 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU General Public License, version 3.
# See the file http://www.gnu.org/licenses/gpl.txt
from pisi.actionsapi import get
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
def setup():
# we are using different paths
pisitools.dosed("cupshelpers/cupshelpers.py", "\/lib64\/", "\/lib\/")
pisitools.dosed("troubleshoot/CheckUSBPermissions.py", "\/usr\/bin\/getfacl", "\/bin\/getfacl")
pisitools.dosed("Makefile.in", "xmlto man", "xmlto --skip-validation man")
autotools.configure("--with-udev-rules \
--sysconfdir=/etc")
def build():
autotools.make()
def install():
autotools.rawInstall("DESTDIR=%s udevrulesdir=/lib/udev/rules.d udevhelperdir=/lib/udev" % get.installDIR())
pisitools.dodir("/run/udev-configure-printer")
pisitools.dodoc("README", "AUTHORS", "NEWS", "COPYING", "ChangeLog")
@@ -0,0 +1,12 @@
diff -Nur -x '*.orig' -x '*~' a/scp-dbus-service.py b/scp-dbus-service.py
--- a/scp-dbus-service.py 2013-09-20 22:26:27.000000000 +0200
+++ b/scp-dbus-service.py 2013-10-24 13:12:44.998717234 +0200
@@ -367,7 +367,7 @@
pass
@dbus.service.signal(dbus_interface=CONFIG_NEWPRINTERDIALOG_IFACE,
- signature='a{s}')
+ signature='a(s)')
def DriverDownloadChecked(self, installed_files):
pass
@@ -0,0 +1,13 @@
Index: system-config-printer-1.1.11/system-config-printer.py
===================================================================
--- system-config-printer-1.1.11.orig/system-config-printer.py
+++ system-config-printer-1.1.11/system-config-printer.py
@@ -1428,7 +1428,7 @@ class GUI(GtkGUI, monitor.Watcher):
def_emblem = None
emblem = None
if name == self.default_printer:
- def_emblem = 'emblem-default'
+ def_emblem = 'dialog-ok'
elif name == userdef:
def_emblem = 'emblem-favorite'
@@ -0,0 +1,126 @@
diff -up system-config-printer-1.5.7/cupshelpers/cupshelpers.py.device-sorting system-config-printer-1.5.7/cupshelpers/cupshelpers.py
--- system-config-printer-1.5.7/cupshelpers/cupshelpers.py.device-sorting 2015-04-23 16:05:58.000000000 +0100
+++ system-config-printer-1.5.7/cupshelpers/cupshelpers.py 2015-05-26 09:57:43.583569255 +0100
@@ -547,68 +547,68 @@ class Device:
Compare devices by order of preference.
"""
if other == None:
- return 1
+ return True
if self.is_class != other.is_class:
if other.is_class:
- return 1
- return -1
+ return True
+ return False
if not self.is_class and (self.type != other.type):
# "hp"/"hpfax" before "usb" before * before "parallel" before
# "serial"
if other.type == "serial":
- return 1
+ return True
if self.type == "serial":
- return -1
+ return False
if other.type == "parallel":
- return 1
+ return True
if self.type == "parallel":
- return -1
+ return False
if other.type == "hp":
- return -1
+ return False
if self.type == "hp":
- return 1
+ return True
if other.type == "hpfax":
- return -1
+ return False
if self.type == "hpfax":
- return 1
+ return True
if other.type == "dnssd":
- return -1
+ return False
if self.type == "dnssd":
- return 1
+ return True
if other.type == "socket":
- return -1
+ return False
if self.type == "socket":
- return 1
+ return True
if other.type == "lpd":
- return -1
+ return False
if self.type == "lpd":
- return 1
+ return True
if other.type == "ipps":
- return -1
+ return False
if self.type == "ipps":
- return 1
+ return True
if other.type == "ipp":
- return -1
+ return False
if self.type == "ipp":
- return 1
+ return True
if other.type == "usb":
- return -1
+ return False
if self.type == "usb":
- return 1
+ return True
if self.type == "dnssd" and other.type == "dnssd":
if other.uri.find("._pdl-datastream") != -1: # Socket
- return -1
+ return False
if self.uri.find("._pdl-datastream") != -1:
- return 1
+ return True
if other.uri.find("._printer") != -1: # LPD
- return -1
+ return False
if self.uri.find("._printer") != -1:
- return 1
+ return True
if other.uri.find("._ipp") != -1: # IPP
- return -1
+ return False
if self.uri.find("._ipp") != -1:
- return 1
+ return True
result = bool(self.id) < bool(other.id)
if not result:
result = self.info < other.info
diff -up system-config-printer-1.5.7/test_PhysicalDevice.py.device-sorting system-config-printer-1.5.7/test_PhysicalDevice.py
--- system-config-printer-1.5.7/test_PhysicalDevice.py.device-sorting 2015-04-23 16:22:28.000000000 +0100
+++ system-config-printer-1.5.7/test_PhysicalDevice.py 2015-05-26 09:57:43.583569255 +0100
@@ -49,3 +49,21 @@ def run_test():
phys.add_device (device)
devices = phys.get_devices ()
assert devices[0].uri.startswith ("hp")
+
+ dev1 = cupshelpers.Device("hp:/usb/HP_Color_LaserJet_CP3525?serial=CNCTC8G0QX",
+ **{'device-id':'MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PJL,PCLXL,PCL,POSTSCRIPT,PDF;MDL:HP Color LaserJet CP3525;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP3525;',
+ 'device-make-and-model':'HP Color LaserJet CP3525',
+ 'device-class':'direct'})
+ phys = PhysicalDevice (dev1)
+ dev2 = cupshelpers.Device('usb://HP/Color%20LaserJet%20CP3525?serial=CNCTC8G0QX',
+ **{'device-id':'MFG:Hewlett-Packard;CMD:PJL,MLC,BIDI-ECP,PJL,PCLXL,PCL,POSTSCRIPT,PDF;MDL:HP Color LaserJet CP3525;CLS:PRINTER;DES:Hewlett-Packard Color LaserJet CP3525;',
+ 'device-make-and-model':'HP Color LaserJet CP3525',
+ 'device-class':'direct'})
+
+ # hp device should sort < usb device
+ assert dev1 < dev2
+
+ phys.add_device (dev2)
+ devices = phys.get_devices ()
+ assert devices[0] < devices[1]
+ assert devices[0].uri.startswith ("hp")
@@ -0,0 +1,9 @@
diff -up system-config-printer-1.5.7/udev/udev-add-printer.shbang system-config-printer-1.5.7/udev/udev-add-printer
--- system-config-printer-1.5.7/udev/udev-add-printer.shbang 2015-04-23 16:05:58.000000000 +0100
+++ system-config-printer-1.5.7/udev/udev-add-printer 2015-05-26 09:15:43.761220755 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python3 -s -B
+#!/usr/bin/python3 -sB
## udev-add-printer
@@ -0,0 +1 @@
d /run/udev-configure-printer 0755 root root
File diff suppressed because it is too large Load Diff
+158
View File
@@ -0,0 +1,158 @@
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM 'http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd'>
<PISI>
<Source>
<Name>system-config-printer</Name>
<Homepage>http://cyberelk.net/tim/software/system-config-printer</Homepage>
<Packager>
<Name>PisiLinux Community</Name>
<Email>admins@pisilinux.org</Email>
</Packager>
<License>GPLv2</License>
<IsA>app:console</IsA>
<Summary>A printer administration tool</Summary>
<Description>system-config-printer is a graphical user interface that allows the user to configure a CUPS print server.</Description>
<Archive sha1sum="bd79f87de9576a13c2d099181fea01a63b9f19cc" type="tarxz">http://cyberelk.net/tim/data/system-config-printer/1.5/system-config-printer-1.5.7.tar.xz</Archive>
<AdditionalFiles>
<AdditionalFile target="po/tr.po">tr.po</AdditionalFile>
</AdditionalFiles>
<BuildDependencies>
<Dependency>util-linux</Dependency>
<Dependency>xmlto</Dependency>
<Dependency>libxslt-devel</Dependency>
<Dependency>intltool</Dependency>
<Dependency>python3-devel</Dependency>
<Dependency>cups-devel</Dependency>
<Dependency>eudev-devel</Dependency>
<Dependency>glib2-devel</Dependency>
<Dependency>libusb-devel</Dependency>
<Dependency>libgnome-keyring-devel</Dependency>
<Dependency>desktop-file-utils</Dependency>
</BuildDependencies>
<Patches>
<!-- <Patch level="1">40_scp-dbus-service-fix-dbus-signature-typo.patch</Patch> -->
<!-- Replace emblem-default by dialog-ok -->
<Patch level="1">fix-icon.patch</Patch>
<!-- <Patch level="1">system-config-printer-device-sorting.patch</Patch> -->
<Patch level="1">system-config-printer-shbang.patch</Patch>
<!-- Improvements for check-device-ids from upstream -->
<!--Patch level="1">system-config-printer-check-device-ids.patch</Patch-->
<!-- Fixed traceback in newprinter.py -->
<!--Patch level="1">system-config-printer-self.printers.patch</Patch-->
</Patches>
</Source>
<Package>
<Name>system-config-printer</Name>
<RuntimeDependencies>
<Dependency>eudev</Dependency>
<Dependency>glib2</Dependency>
<Dependency>libusb</Dependency>
<Dependency>libgnome-keyring</Dependency>
<Dependency>python-cups</Dependency>
<Dependency>python-smbc</Dependency>
<Dependency>dbus-python</Dependency>
<Dependency>python-pygobject3</Dependency>
<Dependency>cups</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="library">/usr/lib</Path>
<Path fileType="config">/etc/dbus-1</Path>
<Path fileType="data">/etc/cupshelpers</Path>
<Path fileType="doc">/usr/share/doc</Path>
<Path fileType="data">/lib/udev/rules.d</Path>
<Path fileType="data">/usr/share/dbus-1</Path>
<Path fileType="data">/usr/share/system-config-printer/debug.py</Path>
<Path fileType="data">/usr/share/appdata/system-config-printer.appdata.xml</Path>
<Path fileType="data">/usr/share/system-config-printer/smburi.py</Path>
<Path fileType="data">/usr/share/system-config-printer/config.py</Path>
<Path fileType="data">/usr/share/system-config-printer/ppdippstr.py</Path>
<Path fileType="library">/lib/systemd/system/configure-printer@.service</Path>
<Path fileType="data">/run/udev-configure-printer</Path>
<Path fileType="executable">/lib/udev</Path>
<Path fileType="executable">/usr/libexec</Path>
<Path fileType="config">/usr/lib/tmpfiles.d/system-config-printer.conf</Path>
</Files>
<AdditionalFiles>
<AdditionalFile owner="root" permission="0644" target="/usr/lib/tmpfiles.d/system-config-printer.conf">tmpfiles.conf</AdditionalFile>
</AdditionalFiles>
</Package>
<Package>
<Name>system-config-printer-gtk</Name>
<Summary>GTK+ frontend of system-config-printer</Summary>
<RuntimeDependencies>
<Dependency>python-gtk</Dependency>
<Dependency>notify-python</Dependency>
<Dependency>python-pygobject</Dependency>
<Dependency>python-pygobject3</Dependency>
<Dependency>system-config-printer</Dependency>
</RuntimeDependencies>
<Files>
<Path fileType="doc">/usr/share/man</Path>
<Path fileType="data">/usr/share/system-config-printer</Path>
<Path fileType="data">/etc/xdg/autostart</Path>
<Path fileType="data">/usr/share/applications</Path>
<Path fileType="executable">/usr/bin</Path>
<Path fileType="localedata">/usr/share/locale</Path>
</Files>
</Package>
<History>
<Update release="8">
<Date>2016-01-09</Date>
<Version>1.5.7</Version>
<Comment>Version bump.</Comment>
<Name>Alihan Öztürk</Name>
<Email>alihan@pisilinux.org</Email>
</Update>
<Update release="7">
<Date>2014-01-31</Date>
<Version>1.4.3</Version>
<Comment>Fix dbus signature typo.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="6">
<Date>2014-01-10</Date>
<Version>1.4.3</Version>
<Comment>Add tmpfiles.conf</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
<Update release="5">
<Date>2013-12-31</Date>
<Version>1.4.3</Version>
<Comment>Version bump.</Comment>
<Name>Marcin Bojara</Name>
<Email>marcin@pisilinux.org</Email>
</Update>
<Update release="4">
<Date>2013-11-26</Date>
<Version>1.4.2</Version>
<Comment>Fix dep.</Comment>
<Name>Richard de Bruin</Name>
<Email>richdb@pisilinux.org</Email>
</Update>
<Update release="3">
<Date>2013-10-07</Date>
<Version>1.4.2</Version>
<Comment>Version bump.</Comment>
<Name>Yusuf Aydemir</Name>
<Email>yusuf.aydemir@pisilinux.org</Email>
</Update>
<Update release="2">
<Date>2013-04-16</Date>
<Version>1.4.0</Version>
<Comment>Version bump</Comment>
<Name>Serdar Soytetir</Name>
<Email>kaptan@pisilinux.org</Email>
</Update>
<Update release="1">
<Date>2012-10-29</Date>
<Version>1.3.12</Version>
<Comment>First release</Comment>
<Name>Osman Erkan</Name>
<Email>osman.erkan@pisilinux.org</Email>
</Update>
</History>
</PISI>
+13
View File
@@ -0,0 +1,13 @@
<?xml version="1.0" ?>
<PISI>
<Source>
<Name>system-config-printer</Name>
<Summary xml:lang="tr">Yazıcı yapılandırma altyapısı</Summary>
<Description xml:lang="tr">system-config-printer, Python ile yazılmış ve otomatik yazıcı tanıma sürecinde kullanılan altyapıyı oluşturan bir kütüphanedir.</Description>
</Source>
<Package>
<Name>system-config-printer-gtk</Name>
<Summary xml:lang="tr">system-config-printer için GTK+ önyüzü</Summary>
</Package>
</PISI>