<?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>
        <Summary>HP Linux Imaging and Printing System</Summary>
        <Description>HP Linux Imaging and Printing (HPLIP) System includes printer and scanner drivers and related service tools.</Description>
        <Archive sha1sum="59264a6668ab37871fd007fcee70d4932f11f9d7" type="targz">mirrors://sourceforge/hplip/hplip/3.16.5/hplip-3.16.5.tar.gz</Archive>
        <AdditionalFiles>
            <!-- PPD patcher -->
            <AdditionalFile permission="0755" target="patch-ppds">patch-ppds.sh</AdditionalFile>
            <AdditionalFile permission="0755" target="copy-deviceids">fedora/copy-deviceids.py</AdditionalFile>

            <!-- PPD patches -->
            <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-device-reconnected.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>
            <!-- The pstotiff filter is rubbish so replace it -->    
<!--             <Patch level="1">fedora/hplip-pstotiff-is-rubbish.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>
            <!-- Make utils.checkPyQtImport() look for the gui sub-package -->
<!--             <Patch level="1">fedora/hplip-ui-optional.patch</Patch> -->
            <!-- Make sure to avoid handwritten asm -->
            <!-- PisiLinuX patches -->
            <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>    

            <!-- Suppress module warnings when the command is run as root -->
            <Patch level="1">pisilinux/suppress-module-warnings.patch</Patch>

            <!-- Consume session parameter from systray as it avoids startup -->
            <Patch level="1">pisilinux/hp-systray-consume-session-param.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>
<!--             <Dependency>usb-modeswitch</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>
        <Summary>A set of useful utilities written in Qt for managing HP devices</Summary>
        <RuntimeDependencies>
            <Dependency release="current">hplip</Dependency>
<!--             <Dependency>python-reportlab</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>
        <Summary>Documentation files for HPLIP</Summary>
        <RuntimeDependencies>
            <Dependency release="current">hplip</Dependency>
        </RuntimeDependencies>
        <Files>
            <Path fileType="doc">/usr/share/doc</Path>
        </Files>
    </Package>

    <History>
        <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>
