code:
#!/bin/bash

PATCH=$1

# Decompress the relevant PPD files
for ppd_file in $(grep '^diff' $PATCH | cut -d " " -f 4);
do
  gunzip ${ppd_file#*/}.gz
done

# Patch the PPD files
patch -p1 < $PATCH

# Recompress back
for ppd_file in $(grep '^diff' $PATCH | cut -d " " -f 4);
do
  gzip -n ${ppd_file#*/}
done

repo_name: ayhanyalcinsoy/main


code:
diff -Nuar a/installer/distros.dat b/installer/distros.dat
--- a/installer/distros.dat	2014-01-08 11:29:27.000000000 +0200
+++ b/installer/distros.dat	2014-01-17 11:36:40.776456834 +0200
@@ -92,7 +92,7 @@
 # ****************************************

 [distros]
-distros=unknown,mepis,debian,suse,mandriva,fedora,redhat,rhel,slackware,gentoo,redflag,ubuntu,xandros,freebsd,linspire,ark,pclinuxos,centos,igos,linuxmint,linpus,gos,boss,lfs
+distros=unknown,mepis,debian,suse,mandriva,fedora,redhat,rhel,slackware,gentoo,redflag,ubuntu,xandros,freebsd,linspire,ark,pclinuxos,centos,igos,linuxmint,linpus,gos,boss,lfs,pisilinux

 # ****************************************

@@ -5957,3 +5957,25 @@

 [lfs:6:avahi-utils]
 packages=avahi
+
+# ****************************************
+[PiSilinux]
+index=51
+versions=1.0
+display=1
+display_name=Pisi
+package_mgrs=pisi
+package_mgr_cmd=su -c "pisi install $packages_to_install"
+hplip_remove_cmd=su -c "pisi remove hplip hplip-gui"
+su_sudo=su
+ppd_install=drv
+udev_mode_fix=1
+ppd_dir=/usr/share/cups/model/HP
+drv_dir=/usr/share/cups/drv/HP
+fix_ppd_symlink=0
+package_available=1
+add_user_to_group=
+policykit=1
+native_cups=1
+ui_toolkit=qt4
+acl_rules=1
\ Dosya sonunda yenisatır yok.


code:
--- hplip-systray.desktop.in.OSmanOS	2013-02-13 18:38:51.000000000 +0200
+++ hplip-systray.desktop.in	2013-03-03 13:23:27.618733314 +0200
@@ -2,8 +2,11 @@
 Version=0.6
 Type=Application
 Name=HP System Tray Service
+Name[tr]=HP Sistem Çekmecesi Hizmeti
 GenericName=Printer Status Applet
+GenericName[tr]=Yazıcı Programcığı
 Comment=HP System Tray Service
+Comment[tr]=HP Sistem Çekmecesi Hizmeti
 Exec=hp-systray -x
 Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png
 Terminal=false


code:
Index: hplip-3.9.6/hplip.desktop.in
===================================================================
--- hplip-3.9.6.orig/hplip.desktop.in
+++ hplip-3.9.6/hplip.desktop.in
@@ -2,8 +2,11 @@
 Encoding=UTF-8
 Type=Application
 Name=HP Device Manager
+Name[tr]=HP Aygıt Yöneticisi
 GenericName=Printer Management Application
+GenericName[tr]=Yazıcı Yönetim Uygulaması
 Comment=View device status, ink levels and perform maintenance.
+Comment[tr]=Aygıt durumunu, mürekkep seviyelerini gözleyin.
 Exec=hp-toolbox
 Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png
 Terminal=false


code:
Index: hplip-3.9.10/configure.in
===================================================================
--- hplip-3.9.10.orig/configure.in
+++ hplip-3.9.10/configure.in
@@ -438,9 +438,7 @@ AM_CONDITIONAL(POLICYKIT_INSTALL, test x

 # Determine where the PolicyKit policy file goes
 if test "$policykit" = "yes"; then
-   if test -d /usr/share/polkit-1; then
-      policykit_dir=/usr/share/polkit-1/actions
-   elif test -d /usr/share/PolicyKit; then
+   if test -d /usr/share/PolicyKit; then
       policykit_dir=/usr/share/PolicyKit/policy
    else
       policykit_dir=/usr/share/PolicyKit/policy


code:
Index: hplip-3.10.5/systray.py
===================================================================
--- hplip-3.10.5.orig/systray.py
+++ hplip-3.10.5/systray.py
@@ -48,6 +48,10 @@ if __name__ == '__main__':
     if os.getpgid(os.getpid()) != os.getpid():
         os.setsid()

+    if "-session" in sys.argv:
+        si = sys.argv.index("-session")
+        del sys.argv[si:si+2]
+
     mod = module.Module(__mod__, __title__, __version__, __doc__, None,
                        (GUI_MODE,), (UI_TOOLKIT_QT4, UI_TOOLKIT_QT3))


code:
Index: hplip-3.9.6b/base/module.py
===================================================================
--- hplip-3.9.6b.orig/base/module.py
+++ hplip-3.9.6b/base/module.py
@@ -149,8 +149,8 @@ class Module(object):
         #log.debug("Default ui-toolkit: %s" % self.default_ui_toolkit)
         #log.debug("Default mode: %s" % self.default_mode)

-        if os.getuid() == 0 and not run_as_root_ok:
-            log.warn("%s should not be run as root/superuser." % mod)
+        #if os.getuid() == 0 and not run_as_root_ok:
+        #    log.warn("%s should not be run as root/superuser." % mod)

     def setUsage(self, include_flags=0, extra_options=None,


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>hplip</Name>
        <Homepage>http://hplip.sourceforge.net/</Homepage>
        <Packager>
            <Name>Pisi Linux Admins</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2+</License>
        <License>MIT</License>
        HP Linux Imaging and Printing System
        <Description>HP Linux Imaging and Printing (HPLIP) System includes printer and scanner drivers and related service tools.</Description>
        <Archive sha1sum="177252a6c3e508b6d4f9d02663fe3556f37de71e" type="targz">mirrors://sourceforge/hplip/hplip-3.16.11.tar.gz</Archive>
        <AdditionalFiles>

            <AdditionalFile permission="0755" target="patch-ppds">patch-ppds.sh</AdditionalFile>
            <AdditionalFile permission="0755" target="copy-deviceids">fedora/copy-deviceids.py</AdditionalFile>

            <AdditionalFile target="ppd-patches/001-hplip-deviceIDs-ppd.patch">fedora/hplip-deviceIDs-ppd.patch</AdditionalFile>
            <AdditionalFile target="ppd-patches/002-hplip-ppd-ImageableArea.patch">fedora/hplip-ppd-ImageableArea.patch</AdditionalFile>
        </AdditionalFiles>
        <BuildDependencies>
            <Dependency>libjpeg-turbo-devel</Dependency>
            <Dependency>foomatic-db</Dependency>
            <Dependency>net-snmp-devel</Dependency>
            <Dependency>sane-backends-devel</Dependency>
            <Dependency>cups-devel</Dependency>
            <Dependency>python3-devel</Dependency>
            <Dependency>python-devel</Dependency>
            <Dependency>libusb-devel</Dependency>
            <Dependency>dbus-devel</Dependency>
            <Dependency>desktop-file-utils</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">fedora/hplip-avahi-parsing.patch</Patch>
            <Patch level="1">fedora/hplip-bad-low-ink-warning.patch</Patch>
            <Patch level="1">fedora/hplip-clear-old-state-reasons.patch</Patch>

            <Patch level="1">fedora/hplip-deviceIDs-drv.patch</Patch>
            <Patch level="1">fedora/hplip-dj990c-margin.patch</Patch>
            <Patch level="1">fedora/hplip-hpcups-sigpipe.patch</Patch>
            <Patch level="1">fedora/hplip-hpijs-marker-supply.patch</Patch>
            <Patch level="1">fedora/hplip-lineart.patch</Patch>
            <Patch level="1">fedora/hplip-log-stderr.patch</Patch>
	    <Patch level="1">fedora/hplip-logdir.patch</Patch>
            <Patch level="1">fedora/hplip-no-asm.patch</Patch>
            <Patch level="1">fedora/hplip-no-write-bytecode.patch</Patch>

            <Patch level="1">fedora/hplip-retry-open.patch</Patch>
            <Patch level="1">fedora/hplip-scan-tmp.patch</Patch>
            <Patch level="1">fedora/hplip-silence-ioerror.patch</Patch>
            <Patch level="1">fedora/hplip-snmp-quirks.patch</Patch>
            <Patch level="1">fedora/hplip-strncpy.patch</Patch>
	    <Patch level="1">fedora/hplip-udev-rules.patch</Patch>
            <Patch level="1">fedora/hplip-strstr-const.patch</Patch>

            <Patch level="1">pisilinux/desktop-i18n.patch</Patch>
            <Patch level="0">pisilinux/desktop-i18n-1.patch</Patch>
            <Patch level="1">pisilinux/add-pisilinux-support.patch</Patch>
            <Patch level="1">pisilinux/fix-polkit-directory.patch</Patch>

            <Patch level="1">pisilinux/suppress-module-warnings.patch</Patch>

            <Patch level="1">pisilinux/hp-systray-consume-session-param.patch</Patch>
            <Patch level="1">Add-include-cups-ppd.h-in-various-places-as-CUPS-2.2.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>hplip</Name>
        <IsA>app:console</IsA>
        <IsA>library</IsA>
        <IsA>driver</IsA>
        <RuntimeDependencies>
            <Dependency>libjpeg-turbo</Dependency>
            <Dependency>net-snmp</Dependency>
            <Dependency>foomatic-db</Dependency>
            <Dependency>sane-backends</Dependency>
            <Dependency>cups</Dependency>
            <Dependency>dbus</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>libusb</Dependency>
            <Dependency>openssl</Dependency>

        </RuntimeDependencies>
        <Files>
            <Path fileType="data">/etc/sane.d/dll.d</Path>
            <Path fileType="config">/etc/hp/hplip.conf</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/lib/cups/backend</Path>
            <Path fileType="executable">/usr/lib/cups/filter</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="data">/var/lib/hp</Path>
            <Path fileType="data">/usr/share/cups</Path>
            <Path fileType="data">/usr/share/hplip</Path>
            <Path fileType="data">/usr/share/dbus-1</Path>
            <Path fileType="data">/usr/share/PolicyKit</Path>
            <Path fileType="data">/usr/share/hplip/prnt/plugins</Path>
            <Path fileType="data">/var/log/hp</Path>
            <Path fileType="data">/lib/udev/rules.d</Path>
            <Path fileType="config">/etc/cron.daily/</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0755" target="/usr/bin/hpcups-update-ppds">fedora/hpcups-update-ppds.sh</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/etc/sane.d/dll.d/hpaio">hpaio</AdditionalFile>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/hplip/data/localization/hplip_tr.qm">hplip_tr.qm</AdditionalFile>
        </AdditionalFiles>
        <Provides>
            <COMAR script="package.py">System.Package</COMAR>
        </Provides>
    </Package>

    <Package>
        <Name>hplip-gui</Name>
        <Icon>hplip</Icon>
        <IsA>app:gui</IsA>
        A set of useful utilities written in Qt for managing HP devices
        <RuntimeDependencies>
            <Dependency release="current">hplip</Dependency>

            <Dependency>python-pygobject</Dependency>
            <Dependency>python-qt5</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/bin/hp-toolbox</Path>
            <Path fileType="executable">/usr/bin/hp-systray</Path>
            <Path fileType="executable">/usr/bin/hp-print</Path>
            <Path fileType="data">/usr/share/hplip/toolbox.py</Path>
            <Path fileType="data">/usr/share/hplip/systray.py</Path>
            <Path fileType="data">/usr/share/hplip/print.py</Path>

            <Path fileType="data">/etc/xdg/autostart</Path>
            <Path fileType="data">/usr/share/applications/*.desktop</Path>
            <Path fileType="data">/usr/share/hplip/data/images</Path>
            <Path fileType="data">/usr/share/hplip/plugins</Path>
            <Path fileType="data">/usr/share/hplip/ui4</Path>
            <Path fileType="data">/usr/share/pixmaps</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/usr/share/pixmaps/hplip.png">hplip.png</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <Package>
        <Name>hplip-docs</Name>
        <IsA>data:doc</IsA>
        Documentation files for HPLIP
        <RuntimeDependencies>
            <Dependency release="current">hplip</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <Update release="4">
            <Date>2017-04-09</Date>
            <Version>3.16.11</Version>
            <Comment>Version Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="3">
            <Date>2016-06-09</Date>
            <Version>3.16.5</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-05-09</Date>
            <Version>3.16.5</Version>
            <Comment>Version bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-05-08</Date>
            <Version>3.15.11</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>hplip</Name>
        HP Linux yazıcı ve tarayıcı sistemi
        <Description xml:lang="tr">HP yazıcı ve tarayıcıları için sürücüler, yazılım eklentileri ve yönetim araçları</Description>
    </Source>

    <Package>
        <Name>hplip-gui</Name>
        Qt ile yazılmış, HP cihazları yönetmek için kullanılan bir dizi kullanışlı araç
    </Package>

    <Package>
        <Name>hplip-doc</Name>
        HPLIP için belgelendirme dosyaları
    </Package>
</PISI>


code:
#!/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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools

def setup():
    autotools.configure('--disable-static')

    # Disable rpath
    pisitools.dosed("libtool", "^hardcode_libdir_flag_spec=.*", "hardcode_libdir_flag_spec=\"\"")
    pisitools.dosed("libtool", "^runpath_var=LD_RUN_PATH", "runpath_var=DIE_RPATH_DIE")

def build():
    autotools.make()

def install():
    autotools.install()

    for lang in shelltools.ls("debian/po/*.po"):
        pisitools.domo(lang, shelltools.baseName(lang).replace(".po", ""), "libpaper.mo")

    pisitools.dodoc("README", "ChangeLog")


code:
diff -ru libpaper-1.1.23.orig/lib/paper.c libpaper-1.1.23/lib/paper.c
--- libpaper-1.1.23.orig/lib/paper.c	2008-08-12 13:20:48.000000000 +0100
+++ libpaper-1.1.23/lib/paper.c	2008-08-12 14:26:44.000000000 +0100
@@ -22,6 +22,9 @@

 #include <stdlib.h>

+#include <locale.h>
+#include <langinfo.h>
+
 #include "paper.h"

 struct paper {
@@ -110,6 +113,27 @@
 }

 const char* defaultpapername(void) {
+#if defined(LC_PAPER) && defined(_GNU_SOURCE)
+
+#define NL_PAPER_GET(x)         \
+  ((union { char *string; unsigned int word; })nl_langinfo(x)).word
+
+#define PT_TO_MM(v) (unsigned int)((v * 2.54 * 10 / 72) + 0.5)
+
+    const struct paper* pp;
+
+    unsigned int w = NL_PAPER_GET(_NL_PAPER_WIDTH);
+    unsigned int h = NL_PAPER_GET(_NL_PAPER_HEIGHT);
+
+    for (pp = paperfirst(); pp; pp = papernext(pp)) {
+	if (
+             PT_TO_MM(pp->pswidth) == w &&
+             PT_TO_MM(pp->psheight) == h
+           ) {
+	    return pp->name;
+	}
+    }
+#endif
     return PAPERSIZE;
 }

diff -ru libpaper-1.1.23.orig/man/paperconf.1.in libpaper-1.1.23/man/paperconf.1.in
--- libpaper-1.1.23.orig/man/paperconf.1.in	2008-08-12 13:20:48.000000000 +0100
+++ libpaper-1.1.23/man/paperconf.1.in	2008-08-12 14:34:06.000000000 +0100
@@ -48,10 +48,12 @@
 .B @PAPERSIZEVAR@
 environment variable, at the contents of the file specified by the
 .B @PAPERCONFVAR@
-environment variable, at the contects of
+environment variable, at the contents of the file
 .B @PAPERCONF@
-or by using
-.B letter
+, consulting the values controlled by the
+.B LC_PAPER
+locale setting, or by using
+.B @PAPERSIZE@
 as a fall-back value if none of the other alternatives are successful.
 By default, width and height of the paper are printed in PostScript points.
 .SH OPTIONS
diff -ru libpaper-1.1.23.orig/src/paperconf.c libpaper-1.1.23/src/paperconf.c
--- libpaper-1.1.23.orig/src/paperconf.c	2008-08-12 13:20:48.000000000 +0100
+++ libpaper-1.1.23/src/paperconf.c	2008-08-12 14:13:33.000000000 +0100
@@ -13,6 +13,7 @@
 #include <errno.h>

 #include <paper.h>
+#include <locale.h>

 /* needed for GNU/Hurd */
@@ -99,6 +100,8 @@

     const char* progname;

+    setlocale(LC_ALL, "");
+
     progname = strrchr(*argv, '/');
     if (progname) {
 	++progname;


code:
# this is the default papersize for libpaper
a4


code:
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>libpaper</Name>
        <Homepage>http://packages.debian.org/unstable/source/libpaper</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>library</IsA>
        Library for handling paper characteristics
        <Description>Libpaper is a programming library for handling paper characteristics.</Description>
        <Archive sha1sum="830c7e5c0f77d4f8a314ba3ea93dfd954bdd3a4e" type="targz">http://ftp.debian.org/debian/pool/main/libp/libpaper/libpaper_1.1.24+nmu4.tar.gz</Archive>
        <Patches>

        </Patches>
    </Source>

    <Package>
        <Name>libpaper</Name>
        <Files>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="executable">/usr/sbin</Path>
            <Path fileType="library">/usr/lib</Path>
            <Path fileType="config">/etc/</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="localedata">/usr/share/locale</Path>
        </Files>
        <AdditionalFiles>
            <AdditionalFile owner="root" permission="0644" target="/etc/papersize">papersize</AdditionalFile>
        </AdditionalFiles>
    </Package>

    <Package>
        <Name>libpaper-devel</Name>
        Development files for libpaper
        <RuntimeDependencies>
            <Dependency release="current">libpaper</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="header">/usr/include</Path>
            <Path fileType="man">/usr/share/man/man3</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-02-05</Date>
            <Version>1.1.24</Version>
            <Comment>Rebuild</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>1.1.24</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-03-23</Date>
            <Version>1.1.24</Version>
            <Comment>First release</Comment>
            <Name>Ayhan Yalçınsoy</Name>
            <Email>ayhanyalcinsoy@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>libpaper</Name>
        Kağıt özelliklerini düzenlemek için kitaplık
        <Description xml:lang="tr">libpaper, kağıt özelliklerini düzenlemek için bir programlama kitaplığıdır.</Description>
        <Description xml:lang="es">Libpaper es una librería de programación para manejar características de papel.</Description>
    </Source>

    <Package>
        <Name>libpaper-devel</Name>
        libpaper için geliştirme dosyaları
    </Package>
</PISI>


code:
#!/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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

def setup():
    autotools.configure("--sysconfdir=/etc")

def build():
    shelltools.export("CFLAGS", "-DNDEBUG %s" % get.CFLAGS())
    autotools.make('CC="%s" CFLAGS="%s -DLANG_EN"' % (get.CC(), get.CFLAGS()))
    autotools.make('-C ppa_protocol CC="%s" CFLAGS="%s"' % (get.CC(), get.CFLAGS()))

def install():
    autotools.install("BINDIR=%(install)s/usr/bin \
                       CONFDIR=%(install)s/etc    \
                       MANDIR=%(install)s/usr/share/man/man1" % { "install": get.installDIR()})

    pisitools.dobin("utils/Linux/detect_ppa")
    pisitools.dobin("utils/Linux/test_ppa")

    pisitools.insinto("/usr/share/pnm2ppa/lpd", "lpd/*")
    pisitools.insinto("/usr/share/pnm2ppa/pdq", "pdq/*")

    pisitools.doexe("lpd/lpdsetup", "/usr/share/pnm2ppa/lpd")
    pisitools.doexe("sample_scripts/*", "/usr/share/pnm2ppa/sample_scripts")

    pisitools.doexe("pdq/gs-pnm2ppa", "/etc/pdq/drivers/ghostscript")
    pisitools.doexe("pdq/dummy", "/etc/pdq/interfaces")

    pisitools.dohtml("*")

    shelltools.cd("docs/en")
    pisitools.dodoc("CALIBRATION*txt", "COLOR*txt", "PPA*txt", "RELEASE*", "CREDITS", "LICENSE", "README", "TODO")


code:
diff -ur pnm2ppa-1.12/Makefile pnm2ppa-1.12.new/Makefile
--- Makefile	2002-11-15 18:29:29.000000000 -0500
+++ Makefile	2002-12-11 17:39:27.000000000 -0500
@@ -5,13 +5,13 @@
 # paths to locations where the pnm2ppa binary, the configuration file,
 # and the man page should be installed.   On some systems (like Solaris)
 # the install command requires the syntax BINDIR="-f /usr/local/bin".
-BINDIR="/usr/local/bin"
+BINDIR="/usr/bin"
 CONFDIR="/etc"
-MANDIR="/usr/local/man/man1"
+MANDIR="/usr/share/man/man1"

 #compiler and linker options:
 CC=gcc
-CFLAGS=-Wall -pedantic -O2
+CFLAGS=-Wall -pedantic -O3
 LDFLAGS=-lm

 INSTALL=install
diff -ur pnm2ppa-1.12/lpd/ascii.if pnm2ppa-1.12.new/lpd/ascii.if
--- lpd/ascii.if	2000-10-28 10:58:07.000000000 -0400
+++ lpd/ascii.if	2002-12-11 17:39:55.000000000 -0500
@@ -1,6 +1,6 @@
 #! /bin/sh
 # for printing black and white text (ascii) files.
-FILTER="/usr/local/bin/bw.if"
+FILTER="/usr/bin/bw.if"
 #FILTER="/usr/local/bin/bweco.if"
 #------enscript command line--------------------------
 enscript -2rj -p- | $FILTER
diff -ur pnm2ppa-1.12/lpd/bw.if pnm2ppa-1.12.new/lpd/bw.if
--- lpd/bw.if	2000-10-28 10:58:07.000000000 -0400
+++ lpd/bw.if	2002-12-11 17:40:14.000000000 -0500
@@ -6,7 +6,7 @@
 #PAPER=a4
 #PAPER=a3
 #PPAOPTS="-B 2"
-PNM2PPA="/usr/local/bin/pnm2ppa"
+PNM2PPA="/usr/bin/pnm2ppa"
 #------------------dont change below this line----------------------
 gs -sDEVICE=pbmraw -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=- - | \
 $PNM2PPA --bw $PPAOPTS -i - -o -
diff -ur pnm2ppa-1.12/lpd/bweco.if pnm2ppa-1.12.new/lpd/bweco.if
--- lpd/bweco.if	2000-10-28 10:58:07.000000000 -0400
+++ lpd/bweco.if	2002-12-11 17:40:23.000000000 -0500
@@ -6,7 +6,7 @@
 #PAPER=a4
 #PAPER=a3
 #PPAOPTS="-B 2"
-PNM2PPA="/usr/local/bin/pnm2ppa"
+PNM2PPA="/usr/bin/pnm2ppa"
 #------------------dont change below this line----------------------
 gs -sDEVICE=pbmraw -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=- - | \
 $PNM2PPA --bw --eco $PPAOPTS -i - -o -
diff -ur pnm2ppa-1.12/lpd/color.if pnm2ppa-1.12.new/lpd/color.if
--- lpd/color.if	2000-10-28 10:58:07.000000000 -0400
+++ lpd/color.if	2002-12-11 17:40:31.000000000 -0500
@@ -6,7 +6,7 @@
 #PAPER=a4
 #PAPER=a3
 #PPAOPTS="-p"
-PNM2PPA="/usr/local/bin/pnm2ppa"
+PNM2PPA="/usr/bin/pnm2ppa"
 #------------------dont change below this line----------------------
 gs -sDEVICE=ppmraw -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=- - | \
 $PNM2PPA $PPAOPTS -i - -o -
diff -ur pnm2ppa-1.12/lpd/coloreco.if pnm2ppa-1.12.new/lpd/coloreco.if
--- lpd/coloreco.if	2000-10-28 10:58:07.000000000 -0400
+++ lpd/coloreco.if	2002-12-11 17:40:45.000000000 -0500
@@ -6,7 +6,7 @@
 #PAPER=a4
 #PAPER=a3
 #PPAOPTS="--fd"
-PNM2PPA="/usr/local/bin/pnm2ppa"
+PNM2PPA="/usr/bin/pnm2ppa"
 #------------------dont change below this line----------------------
 gs -sDEVICE=ppmraw -sPAPERSIZE=$PAPER -q -dNOPAUSE -r600 -sOutputFile=- - | \
 $PNM2PPA --eco $PPAOPTS -i - -o -
diff -ur pnm2ppa-1.12/lpd/printcap pnm2ppa-1.12.new/lpd/printcap
--- lpd/printcap	2000-10-27 14:12:23.000000000 -0400
+++ lpd/printcap	2002-12-11 17:41:35.000000000 -0500
@@ -6,7 +6,7 @@
         :sd=/var/spool/lpd/coloreco:\
         :lf=/var/spool/lpd/coloreco/log:\
         :af=/var/spool/lpd/coloreco/acct:\
-        :if=/usr/local/bin/coloreco.if:\
+        :if=/usr/bin/coloreco.if:\
         :la:mx#0:\
         :sh:sf:

@@ -16,7 +16,7 @@
         :sd=/var/spool/lpd/color:\
         :lf=/var/spool/lpd/color/log:\
         :af=/var/spool/lpd/color/acct:\
-        :if=/usr/local/bin/color.if:\
+        :if=/usr/bin/color.if:\
         :la:mx#0:\
         :sh:sf:

@@ -26,7 +26,7 @@
         :sd=/var/spool/lpd/bw:\
         :lf=/var/spool/lpd/bw/log:\
         :af=/var/spool/lpd/bw/acct:\
-        :if=/usr/local/bin/bw.if:\
+        :if=/usr/bin/bw.if:\
         :la:mx#0:\
         :sh:sf:

@@ -36,7 +36,7 @@
         :sd=/var/spool/lpd/bweco:\
         :lf=/var/spool/lpd/bweco/log:\
         :af=/var/spool/lpd/bweco/acct:\
-        :if=/usr/local/bin/bweco.if:\
+        :if=/usr/bin/bweco.if:\
         :la:mx#0:\
         :sh:sf:

@@ -46,7 +46,7 @@
         :sd=/var/spool/lpd/ascii:\
         :lf=/var/spool/lpd/ascii/log:\
         :af=/var/spool/lpd/ascii/acct:\
-        :if=/usr/local/bin/ascii.if:\
+        :if=/usr/bin/ascii.if:\
         :la:mx#0:\
         :sh:sf:


code:
diff -Nur pnm2ppa-1.12-old/pnm2ppa.conf pnm2ppa-1.12/pnm2ppa.conf
--- pnm2ppa-1.12-old/pnm2ppa.conf	2005-12-31 01:54:54.000000000 +0200
+++ pnm2ppa-1.12/pnm2ppa.conf	2005-12-31 01:55:36.000000000 +0200
@@ -15,8 +15,8 @@
 # will be used.   The printer version can also be set with the command line
 # option e.g., "-v 720".

-version 0       # REMOVE THIS ENTRY to make 720 the default printer model!!!
-#version  720	# 710, 712, 722 also acceptable
+# version 0       # REMOVE THIS ENTRY to make 720 the default printer model!!!
+version  720	# 710, 712, 722 also acceptable
 #version  820
 #version 1000


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>pnm2ppa</Name>
        <Homepage>http://pnm2ppa.sourceforge.net</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>app:console</IsA>
        <Summary>Driver addons for some Hp Deskjet printers</Summary>
        <Description>Tool to convert pnm data to ppa data for Hp Deskjet 710, 712, 720, 722, 820, 1000 series printer drivers.</Description>
        <Archive type="targz" sha1sum="3de33786e9d3f35a73d7e4acb5281f30654cef7c">mirrors://sourceforge/pnm2ppa/pnm2ppa-1.13.tar.gz</Archive>
        <Patches>
            <Patch level="1">pnm2ppa-default_config.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>pnm2ppa</Name>
        <RuntimeDependencies>
            <Dependency>enscript</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="config">/etc</Path>
            <Path fileType="config">/etc/pdq</Path>
            <Path fileType="executable">/usr/bin</Path>
            <Path fileType="doc">/usr/share/doc</Path>
            <Path fileType="man">/usr/share/man</Path>
            <Path fileType="data">/usr/share/pnm2ppa</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-03-01</Date>
            <Version>1.13</Version>
            <Comment>Rebuild for new toolchain.</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>1.13</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2016-03-23</Date>
            <Version>1.13</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>pnm2ppa</Name>
        <Summary xml:lang="tr">Bazı Hp Deskjet yazıcılar için sürücü eklentileri</Summary>
        <Description xml:lang="tr">Hp Deskjet 710, 712, 720, 722, 820, 1000 serisi yazıcı sürücüleri için pnm verisini ppa verisine dönüştüren araçlar</Description>
    </Source>
</PISI>


code:
#!/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 shelltools
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get

WorkDir = "splix"

def build():
    shelltools.export("OS_CFLAGS", get.CFLAGS())
    shelltools.export("OS_LDFLAGS", get.LDFLAGS())
    shelltools.export("OS_CXXFLAGS", "%s -fno-strict-aliasing" % get.CXXFLAGS())

    shelltools.makedirs("ppd")
    autotools.make("-C ppd")

    autotools.make("V=1")

def install():
    autotools.install("DESTDIR=%s CUPSPPD=/usr/share/cups/model/splix" % get.installDIR())

    # Install color profiles
    pisitools.insinto("/usr/share/cups/model/samsung/cms", "cms/*")

    pisitools.dodoc("AUTHORS", "ChangeLog", "COPYING", "README", "THANKS", "TODO")


code:
Index: ppd/Makefile
===================================================================
--- ppd/Makefile.orig
+++ ppd/Makefile
@@ -75,25 +75,16 @@ install:
 	$(Q)install -d -m 755 ${DESTDIR}${CUPSPPD}/samsung
 	$(Q)for filename in ${SAMSUNG}; do \
 		install -m 644 $$filename.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/samsung;\
-		for lang in ${LANGUAGES}; do \
-			install -m 644 $$filename$$lang.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/samsung;\
-		done; \
 	done;
 	$(call printCmd, $(cmd_install_xerox))
 	$(Q)install -d -m 755 ${DESTDIR}${CUPSPPD}/xerox
 	$(Q)for filename in ${XEROX}; do \
 		install -m 644 $$filename.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/xerox;\
-		for lang in ${LANGUAGES}; do \
-			install -m 644 $$filename$$lang.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/xerox;\
-		done; \
 	done;
 	$(call printCmd, $(cmd_install_dell))
 	$(Q)install -d -m 755 ${DESTDIR}${CUPSPPD}/dell
 	$(Q)for filename in ${DELL}; do \
 		install -m 644 $$filename.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/dell;\
-		for lang in ${LANGUAGES}; do \
-			install -m 644 $$filename$$lang.${DRIVERSEXT} ${DESTDIR}${CUPSPPD}/dell;\
-		done; \
 	done;

 .PHONY: clean distclean


code:
Index: splix-2.0.0/Makefile
===================================================================
--- splix-2.0.0.orig/Makefile
+++ splix-2.0.0/Makefile
@@ -55,8 +55,6 @@
 # +--------------------------------------------------------------------------+
 LANGUAGES	:= cpp c

-CC		:= gcc
-CXX		:= g++
 RM		:= rm -f
 AR		:= ar crs
 LEX		:= flex
@@ -72,10 +70,10 @@ empty           :=
 space           := $(empty) $(empty)
 comma           := ,

-DEBUG_CFLAGS    := -O0 -g
-DEBUG_CXXFLAGS  := -O0 -g
-OPTIM_CFLAGS	:= -O2
-OPTIM_CXXFLAGS	:= -O2
+DEBUG_CFLAGS    := $(OS_CFLAGS)
+DEBUG_CXXFLAGS  := $(OS_CXXFLAGS)
+OPTIM_CFLAGS	:= $(OS_CFLAGS)
+OPTIM_CXXFLAGS	:= $(OS_CXXFLAGS)

 ARCHI           := $(shell uname -s)

Index: splix-2.0.0/module.mk
===================================================================
--- splix-2.0.0.orig/module.mk
+++ splix-2.0.0/module.mk
@@ -26,13 +26,13 @@ DISABLE_BLACKOPTIM	?= 0

 # Flags
-CXXFLAGS		+= `cups-config --cflags` -Iinclude -Wall -I/opt/local/include
-DEBUG_CXXFLAGS		+= -DDEBUG  -DDUMP_CACHE
-OPTIM_CXXFLAGS 		+= -g
-rastertoqpdl_LDFLAGS	:= `cups-config --ldflags` -L/opt/local/lib
-rastertoqpdl_LIBS	:= `cups-config --libs` -lcupsimage
-pstoqpdl_LDFLAGS	:= `cups-config --ldflags`
-pstoqpdl_LIBS		:= `cups-config --libs` -lcupsimage
+CXXFLAGS		+=  `cups-config --cflags` -Iinclude $(OS_CXXFLAGS)
+DEBUG_CXXFLAGS		+=  $(OS_CXXFLAGS)
+OPTIM_CXXFLAGS 		+=  $(OS_CXXFLAGS)
+rastertoqpdl_LDFLAGS    :=  `cups-config --ldflags` $(OS_LDFLAGS) -L/opt/local/lib
+rastertoqpdl_LIBS  := `cups-config --libs` -lcupsimage
+pstoqpdl_LDFLAGS   := `cups-config --ldflags` $(OS_LDFLAGS)
+pstoqpdl_LIBS   := `cups-config --libs` -lcupsimage

 # Update compilation flags with defined options


code:
diff -up splix/ppd/samsung.drv.in.deviceID splix/ppd/samsung.drv.in
--- splix/ppd/samsung.drv.in.deviceID	2013-08-26 21:45:31.000000000 +0200
+++ splix/ppd/samsung.drv.in	2013-09-02 13:56:57.002669362 +0200
@@ -39,6 +39,7 @@ Manufacturer "Samsung"
             Resolution k 1 0 0 0 "300dpi/300 DPI"

             ModelName "SCX-4200"
+            Attribute "1284DeviceID" "" "MFG:Samsung;MDL:SCX-4200 Series;CMD:GDI;"
             PCFileName "scx4200.ppd"
         } {
             Resolution k 1 0 0 0 "300dpi/300 DPI"
@@ -83,6 +84,7 @@ Manufacturer "Samsung"
                     PCFileName "ml1520.ppd"
                 } {
                     ModelName "ML-1610"
+                    Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-1610;CMD:GDI;"
                     PCFileName "ml1610.ppd"
                 } {
                     ModelName "ML-1710"
@@ -121,6 +123,7 @@ Manufacturer "Samsung"
                     Throughput 22
     		{
                     	ModelName "ML-2250"
+                        Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-2250;"
     	                PCFileName "ml2250.ppd"
     		} {
                     	ModelName "ML-2251"
@@ -166,6 +169,7 @@ Manufacturer "Samsung"
                     PCFileName "ml1640.ppd"
                 } {
                     ModelName "ML-2010"
+                    Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-2010;CMD:GDI;"
                     PCFileName "ml2010.ppd"
                 } {
                     ModelName "ML-2015"
@@ -177,6 +181,7 @@ Manufacturer "Samsung"
                     #import "srtmode.defs"

                     ModelName "ML-2510"
+                    Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-2510 Series;CMD:GDI;"
                     PCFileName "ml2510.ppd"
                 }
             }
@@ -193,15 +198,18 @@ Manufacturer "Samsung"

                 {
                     ModelName "ML-1660"
+                    Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-1660 Series;CMD:GDI,FWV,EXT;"
                     PCFileName "ml1660.ppd"
                 } {
                     ModelName "ML-1910"
                     PCFileName "ml1910.ppd"
                 } {
                     ModelName "ML-2525"
+                    Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-2525 Series;CMD:GDI,FWV,EXT;"
                     PCFileName "ml2525.ppd"
                 } {
                     ModelName "ML-2525W"
+                    Attribute "1284DeviceID" "" "MFG:Samsung;MDL:ML-2525W Series;CMD:GDI,FWV,EXT;"
                     PCFileName "ml2525w.ppd"
                 }
             } {
@@ -465,6 +473,7 @@ Manufacturer "Samsung"
         Attribute General CMSFile "CLP-310"

         ModelName "CLP-310"
+        Attribute "1284DeviceID" "" "MFG:Samsung;MDL:CLP-310 Series;CMD:SPLC,FWV;"
         PCFileName "clp310.ppd"
     }{
         Attribute General CMSFile "CLP-315"
diff -up splix/ppd/xerox.drv.in.deviceID splix/ppd/xerox.drv.in
--- splix/ppd/xerox.drv.in.deviceID	2013-08-26 17:22:00.000000000 +0200
+++ splix/ppd/xerox.drv.in	2013-09-02 13:55:22.634957854 +0200
@@ -66,6 +66,7 @@ Manufacturer "Xerox"
                 } {
                     #import "manualduplex.defs"
                     ModelName "Phaser 3120"
+                    Attribute "1284DeviceID" "" "MFG:Xerox;MDL:Phaser 3120;CMD:GDI;"
                     PCFileName "ph3120.ppd"
                 } {
                     #import "manualduplex.defs"
@@ -74,6 +75,7 @@ Manufacturer "Xerox"
                 } {
                     #import "manualduplex.defs"
                     ModelName "Phaser 3130"
+                    Attribute "1284DeviceID" "" "MFG:Xerox;MDL:Phaser 3130;CMD:PCL5E,PCL6;"
                     PCFileName "ph3130.ppd"
                 } {
                     // Multi-tray
@@ -118,6 +120,7 @@ Manufacturer "Xerox"

             {
                 ModelName "Phaser 3117"
+                Attribute "1284DeviceID" "" "MFG:Xerox;MDL:Phaser 3117;CMD:GDI;"
                 PCFileName "ph3117.ppd"
             } {
                 Resolution k 1 0 0 0 "1200x600dpi/1200x600 DPI"
@@ -131,6 +134,7 @@ Manufacturer "Xerox"

                 {
                     ModelName "Phaser 3124"
+                    Attribute "1284DeviceID" "" "MFG:Xerox;MDL:Phaser 3124;CMD:GDI;"
                     PCFileName "ph3124.ppd"
                 }
             }


code:
diff -up splix/rules.mk.nostrip splix/rules.mk
--- splix/rules.mk.nostrip	2011-06-27 20:38:45.000000000 +0200
+++ splix/rules.mk	2011-11-18 18:09:14.438351922 +0100
@@ -21,9 +21,9 @@ cmd_install_cms		= INSTALL           col
 install: $(rastertoqpdl_TARGET) $(pstoqpdl_TARGET)
 	$(Q)mkdir -p $(DESTDIR)${CUPSFILTER}
 	$(call printCmd, $(cmd_install_raster))
-	$(Q)install -m 755 -s $(rastertoqpdl_TARGET) $(DESTDIR)${CUPSFILTER}
+	$(Q)install -m 755 $(rastertoqpdl_TARGET) $(DESTDIR)${CUPSFILTER}
 	$(call printCmd, $(cmd_install_ps))
-	$(Q)install -m 755 -s $(pstoqpdl_TARGET) $(DESTDIR)${CUPSFILTER}
+	$(Q)install -m 755 $(pstoqpdl_TARGET) $(DESTDIR)${CUPSFILTER}
 	$(Q)$(MAKE) --no-print-directory -C ppd install Q=$(Q) \
 		DESTDIR=$(abspath $(DESTDIR)) DISABLE_JBIG=$(DISABLE_JBIG)
 	@echo ""


code:
<?xml version="1.0" ?>
<!DOCTYPE PISI SYSTEM "http://www.pisilinux.org/projeler/pisi/pisi-spec.dtd">
<PISI>
    <Source>
        <Name>splix</Name>
        <Homepage>http://splix.sf.net/</Homepage>
        <Packager>
            <Name>PisiLinux Community</Name>
            <Email>admins@pisilinux.org</Email>
        </Packager>
        <License>GPLv2</License>
        <IsA>data</IsA>
        <IsA>app:console</IsA>
        <Summary>A set of CUPS printer drivers for SPL (Samsung Printer Language) printers</Summary>
        <Description>The Splix drivers are usable by all printer devices which understand the SPL II language. It covers several Samsung, Xerox, Dell and Ricoh printers.</Description>
        <Archive sha1sum="26452d2111a56cdf89c1e752739a64ce7dd82700" type="targz">https://sourceforge.net/projects/pisilinux/files/source/splix-2.0.1.tar.gz</Archive>
        <Archive sha1sum="b854cdc4647043e7aae1a4affa5a1813a4d04613" type="tarbz2" target="splix">http://splix.ap2c.org/samsung_cms.tar.bz2</Archive>
        <BuildDependencies>
            <Dependency>cups-devel</Dependency>
            <Dependency>jbigkit-devel</Dependency>
        </BuildDependencies>
        <Patches>
            <Patch level="1">splix-1.1.0-fix-makefile.patch</Patch>
<!--             <Patch level="1">splix-nostrip.patch</Patch> -->
            <Patch level="0">install-english-only.patch</Patch>
            <Patch>splix-deviceID.patch</Patch>
        </Patches>
    </Source>

    <Package>
        <Name>splix</Name>
        <RuntimeDependencies>
            <Dependency>cups</Dependency>
            <Dependency>libgcc</Dependency>
            <Dependency>jbigkit</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="executable">/usr/lib/cups</Path>
            <Path fileType="data">/usr/share/cups</Path>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <Update release="3">
            <Date>2017-04-09</Date>
            <Version>2.0.1</Version>
            <Comment>Version Bump</Comment>
            <Name>Kamil Atlı</Name>
            <Email>suvari@pisilinux.org</Email>
        </Update>
        <Update release="2">
            <Date>2016-06-09</Date>
            <Version>2.0.0_20110720</Version>
            <Comment>Release Bump</Comment>
            <Name>Pisi Linux Community</Name>
            <Email>admin@pisilinux.org</Email>
        </Update>
        <Update release="1">
            <Date>2015-01-10</Date>
            <Version>2.0.0_20110720</Version>
            <Comment>First release</Comment>
            <Name>Alihan Öztürk</Name>
            <Email>alihan@pisilinux.org</Email>
        </Update>
    </History>
</PISI>


code:
<?xml version="1.0" ?>
<PISI>
    <Source>
        <Name>splix</Name>
        <Summary xml:lang="tr">SPL (Samsung Yazıcı Dili) için CUPS sürücüleri</Summary>
        <Description xml:lang="tr">splix, SPL II dilini anlayabilen tüm yazıcılar tarafından kullanılabilen sürücüleri içerir. Bu sürücü bazı Samsung, Xerox, Dell ve Ricoh yazıcıları desteklemektedir.</Description>
    </Source>
</PISI>


code:
#!/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
from pisi.actionsapi import shelltools

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.am", "xmlto man", "xmlto --skip-validation man")
    for i in ["README", "ChangeLog"]:
        shelltools.touch(i)
    autotools.autoreconf("-fi")
    autotools.configure("--with-udev-rules \
                         --with-systemdsystemunitdir=no \
                         --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")


code:
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


code:
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.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'


code:
--- system-config-printer-1.5.9/jobviewer.py	2017-01-09 12:38:09.000000000 +0100
+++ system-config-printer-1.5.9/jobviewer.py.new	2017-01-27 08:14:00.163315284 +0100
@@ -59,6 +59,8 @@
     USE_KEYRING=True
 except ImportError:
     USE_KEYRING=False
+except ValueError:
+    USE_KEYRING=False

 import gettext
 gettext.install(domain=config.PACKAGE, localedir=config.localedir)


code:
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")


code:
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


code:
[Desktop Entry]
Name=Print Settings
Name[ar]=إعدادات الطباعة
Name[as]=প্ৰিন্ট সংহতিসমূহ
Name[bg]=Принтерни настройки
Name[bn_IN]=প্রিন্ট সংক্রান্ত বৈশিষ্ট্য
Name[ca]=Ajustos d'impressió
Name[cs]=Nastavení tisku
Name[da]=Udskriftsindstillinger
Name[de]=Druckeinstellungen
Name[el]=Ρυθμίσεις εκτύπωσης
Name[en_GB]=Print Settings
Name[es]=Configuración de impresión
Name[et]=Trükkimise seaded
Name[fi]=Tulostusasetukset
Name[fr]=Configuration de l'impression
Name[gu]=પ્રિન્ટ સુયોજનો
Name[hi]=छपाई सेटिंग
Name[hu]=Nyomtatási beállítások
Name[it]=Impostazioni di stampa
Name[ja]=印刷設定
Name[kn]=ಮುದ್ರಣದ ಸಿದ್ಧತೆಗಳು
Name[ko]=인쇄 설정
Name[lt]=Spausdinimo nustatymai
Name[lv]=Drukāšanas iestatījumi
Name[ml]=പ്രിന്റ് സജ്ജീകരണങ്ങള്
Name[mr]=छपाई सेटिंग्स्
Name[nb]=Innstillinger for utskrift
Name[nl]=Afdrukinstellingen
Name[nn]=Utskriftoppsett
Name[or]=ମୂଦ୍ରଣୀ ସଂରଚନା
Name[pa]=ਪਰਿੰਟ ਸੈਟਿੰਗ
Name[pl]=Ustawienia drukowania
Name[pt]=Configurações da Impressora
Name[pt_BR]=Configurações da impressora
Name[ru]=Настройки принтера
Name[sk]=Nastavenia tlače
Name[sl]=Nastavitve tiskanja
Name[sr]=Подешавања штампе
Name[sv]=Skrivarinställningar
Name[ta]=அச்சு அமைவுகள்
Name[te]=ముద్రణ అమరికలు
Name[tr]=Yazıcı Ayarları
Name[uk]=Параметри друку
Name[zh_CN]=打印设置
Name[zh_TW]=列印設定值
Comment=Configure printers
Comment[ar]=اضبط الطابعات
Comment[as]=মুদ্ৰকৰ বিন্যাস কৰক
Comment[bg]=Настройка на принтерите
Comment[bn]=প্রিন্টার কনফিগার করুন
Comment[bn_IN]=প্রিন্টার কনফিগার করুন
Comment[br]=Kefluniañ ar voullerezed
Comment[bs]=Konfiguriranje pisača
Comment[ca]=Configureu les impressores
Comment[cs]=Nastavit tiskárny
Comment[da]=Indstil printere
Comment[de]=Drucker konfigurieren
Comment[el]=Διαμόρφωση εκτυπωτών
Comment[en_GB]=Configure printers
Comment[es]=Configurar impresoras
Comment[et]=Printerite seadistamine
Comment[fa]=پیکربندی چاپگرها
Comment[fi]=Muokkaa tulostimien asetuksia
Comment[fr]=Configurer les imprimantes
Comment[gu]=પ્રિન્ટરો રૂપરેખાંકિત કરો
Comment[he]=הגדרת מדפסות
Comment[hi]=मुद्रक विन्यस्त करें
Comment[hr]=Konfiguriranje pisača
Comment[hu]=Nyomtatók beállítása
Comment[id]=Konfigurasi pencetak
Comment[is]=Stilla prentara
Comment[it]=Configura le stampanti
Comment[ja]=プリンターの設定
Comment[kn]=ಮುದ್ರಕವನ್ನು ಸ್ವರೂಪಿಸು
Comment[ko]=프린터 설정
Comment[lt]=Konfigūruokite spausdintuvus
Comment[lv]=Konfigurēt printerus
Comment[ml]=പ്രിന്‍ററുകള് സജ്ജമാക്കുക
Comment[mr]=मुद्रक व्यूहरचित करा
Comment[ms]=Tetapkan pencetak
Comment[nb]=Konfigurer skrivere
Comment[nl]=Printers configureren
Comment[nn]=Set opp skrivarar
Comment[or]=ମୁଦ୍ରଣୀ ମାନଙ୍କୁ ବିନ୍ଯାସ କରନ୍ତୁ
Comment[pa]=ਪਰਿੰਟਰ ਸੰਰਚਨਾ
Comment[pl]=Konfiguracja drukarek
Comment[pt]=Configurar impressoras
Comment[pt_BR]=Configure impressoras
Comment[ro]=Configurează imprimantele
Comment[ru]=Настроить принтеры
Comment[si]=මුද්‍රකයන් මානකරන්න
Comment[sk]=Konfigurovať tlačiarne
Comment[sl]=Konfiguracija tiskalnikov
Comment[sr]=Подешавање штампача
Comment[sr@latin]=Podešavanje štampača
Comment[sv]=Konfigurera skrivare
Comment[ta]=அச்சடிப்பிகளை கட்டமைக்கவும்
Comment[te]=ముద్రకాలను ఆకృతీకరించు
Comment[th]=ตั้งค่าเครื่องพิมพ์
Comment[tr]=Yazıcıları yapılandır
Comment[uk]=Налаштовування принтерів
Comment[vi]=Cấu hình máy in
Comment[zh_CN]=配置打印机
Comment[zh_TW]=設定印表機
Exec=system-config-printer
Terminal=false
Type=Application
Icon=printer
StartupNotify=true
Categories=Settings;System


code: d /run/udev-configure-printer 0755 root root