%define lp_uid 9 %define lp_gid 9 %define cups_ver %(cups-config --api-version) Name: hplip Version: 3.23.3 Release: 1mamba Summary: A printer driver for HP inkjet devices Group: System/Spooling Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://developers.hp.com/hp-linux-imaging-and-printing Source: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz Source1: http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/hplip-%{version}-plugin.run Patch0: %{name}-3.11.7-cups-1.5.patch Patch1: %{name}-3.12.9-cups-1.6.patch Patch2: hplip-3.18.12-openmamba-AUTH_TYPES-warning.patch Patch6: hplip-3.22.4-ui5-systray-hide-when-inactive.patch Patch7: hplip-3.22.4-python3.patch Patch8: hplip-3.22.4-configure-python.patch Patch9: hplip-3.22.4-disable_upgrade.patch Patch10: hplip-3.22.4-fix-possible-stack-buffer.overflows.patch Patch11: hplip-3.22.4-Remove-all-ImageProcessor-functionality.patch License: BSD, LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libavahi-devel BuildRequires: libcups-devel BuildRequires: libdbus-devel BuildRequires: libgcc BuildRequires: libjpeg-devel BuildRequires: libnetsnmp-devel BuildRequires: libnsl-devel BuildRequires: libopenssl-devel BuildRequires: libpython3-devel BuildRequires: libstdc++6-devel BuildRequires: libsystemd-devel BuildRequires: libudev-devel BuildRequires: libusb-compat-devel BuildRequires: libusb-devel BuildRequires: libz-devel BuildRequires: sane-backends-devel ## AUTOBUILDREQ-END BuildRequires: libnetsnmp-devel >= 5.9-1mamba BuildRequires: gcc-fortran >= 4.0.1 BuildRequires: libieee1284-devel BuildRequires: libgphoto-devel Requires: cups Requires: PyQt5-py3 Requires: python-Pillow-py3 Provides: hpijs = %{version} Obsoletes: hpijs < 3.21.4 Requires(pre): libsane-backends >= 1.0.16 %description A printer driver for HP inkjet devices. Provides printing support for more than 300 printer models, including, DeskJet, OfficeJet, Photosmart, Business Inkjet and some LaserJet. %package devel Group: Development/Libraries Summary: Static libraries and headers for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description devel A printer driver for HP inkjet devices. This package contains static libraries and header files need for development. %package plugin Group: System/Libraries Summary: Proprietary plugins for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description plugin A printer driver for HP inkjet devices. This package contains the proprietary plugins needed by some printers. %debug_package %prep %setup -q #%patch 2 -p1 %patch 6 -p1 -b .ui5-systray-hide-when-inactive %patch 7 -p1 -b .python3 %patch 8 -p1 -b .configure-python %patch 9 -p0 -b .disable_upgrade #%patch10 -p1 -b .fix-possible-stack-buffer.overflows %patch 11 -p1 -b .Remove-all-ImageProcessor-functionality #sed -i "s|SYSFS{|ATTRS{|g" data/rules/55-hpmud.rules data/rules/56-hpmud_support.rules #sed -i "s|sysfs{|ATTR{|g" data/rules/55-hpmud.rules data/rules/56-hpmud_support.rules # Complete remove of libImageProcessor #rm -f prnt/hpcups/HPCupsFilter.cpp rm prnt/hpcups/libImageProcessor-x86* sed -i "s|chgrp \"lp\"|/bin/true \"lp\"|" Makefile.in sed -i "s|chmod 774|/bin/true 774|" Makefile.in sh %{SOURCE1} --target hplip-%{version}-plugin --noexec #replace shebang lines to python3 interpreter (from hplip-install) PAT1="#!\/usr\/bin\/(env )?python$" PAT2="#!\/usr\/bin\/env python3" for pyfile in `find . -maxdepth 1 -name "*.py"`; do sed -i -r "0,/$PAT1/s//$PAT2/" $pyfile done for pyfile in `find . -type f \( -iname hpps -o -iname hpfax.py -o -iname pstotiff \)`; do sed -i -r "0,/$PAT1/s//$PAT2/" $pyfile done export AUTOMAKE='automake --foreign' autoreconf -f -i %build %configure \ --enable-qt5 \ --disable-qt4 \ --enable-hpcups-install \ --enable-cups-drv-install \ --disable-imageProcessor-build \ --enable-pp-build \ --with-hpppddir=%{_datadir}/cups/model/HP \ PYTHON=%{__python3} sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool %make #-j1 rulessystemdir=%{_unitdir} \ # SNMPLIB="netsnmp -DNETSNMP_ATTRIBUTE_DEPRECATED=" %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall rulessystemdir=%{_unitdir} libdir=%{_libdir} # remove conflict with libsane-backends rm -f %{buildroot}%{_sysconfdir}/sane.d/dll.conf # remove udev automatic printer configuration conflicting with system-config-printer rm -f %{buildroot}%{_sysconfdir}/udev/rules.d/56-hpmud_add_printer.rules # install plugin install -d -m0755 %{buildroot}/var/lib/hp cd hplip-%{version}-plugin _arch='%{_target_cpu}' %ifarch %{ix86} _arch='x86_32' %endif %ifarch arm _arch='arm32' %endif %ifarch aarch64 _arch='arm64' %endif # Create folders install -d %{buildroot}%{_datadir}/hplip/data/firmware install -d %{buildroot}%{_datadir}/hplip/fax/plugins install -d %{buildroot}%{_datadir}/hplip/prnt/plugins install -d %{buildroot}%{_datadir}/hplip/scan/plugins install -d %{buildroot}%{_datadir}/licenses/hplip-plugin install -d %{buildroot}/var/lib/hp # Copy files install -m644 plugin.spec %{buildroot}%{_datadir}/hplip/ install -m644 hp_laserjet_*.fw.gz %{buildroot}%{_datadir}/hplip/data/firmware/ install -m755 fax_marvell-${_arch}.so %{buildroot}%{_datadir}/hplip/fax/plugins/ install -m755 hbpl1-${_arch}.so %{buildroot}%{_datadir}/hplip/prnt/plugins/ install -m755 lj-${_arch}.so %{buildroot}%{_datadir}/hplip/prnt/plugins/ install -m755 bb_*-${_arch}.so %{buildroot}%{_datadir}/hplip/scan/plugins/ install -m644 license.txt %{buildroot}%{_datadir}/licenses/hplip-plugin/ # Create hplip.state used by hplip-tools cat > %{buildroot}/var/lib/hp/hplip.state << _EOF [plugin] installed = 1 eula = 1 version = %{version} _EOF # Create symlinks find %{buildroot}%{_datadir}/hplip -type f -name "*.so" | while read f; do lib_dir="${f%/*}" lib_name="${f##*/}" ln -vsf $lib_name $lib_dir/${lib_name%%-*}.so done rm -f %{buildroot}%{_datadir}/applications/hp-uiscan.desktop %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %pre if [ $1 -ge 1 ]; then /usr/sbin/groupadd lp -g %{lp_gid} &>/dev/null /usr/sbin/useradd lp -d /dev/null -s /bin/false \ -u %{lp_uid} -g %{lp_gid} &>/dev/null fi exit 0 %preun # erase if [ $1 -eq 0 ]; then /usr/sbin/groupdel lp &>/dev/null /usr/sbin/userdel lp &>/dev/null fi /sbin/ldconfig : %postun # update if [ -e %{_sysconfdir}/sane.d/dll.conf ]; then grep hpaio %{_sysconfdir}/sane.d/dll.conf >/dev/null || echo "hpaio" >> %{_sysconfdir}/sane.d/dll.conf fi /sbin/ldconfig : %files %defattr(-,root,root) %{_sysconfdir}/udev/rules.d/56-hpmud.rules %{_sysconfdir}/xdg/autostart/hplip-systray.desktop %dir %{_sysconfdir}/hp %{_sysconfdir}/hp/hplip.conf %{_bindir}/hp-* #%{_bindir}/hpijs %{_prefix}/lib/cups/backend/hp* #%{_prefix}/lib/cups/filter/foomatic-rip-hplip %{_prefix}/lib/cups/filter/hpcdmfax %{_prefix}/lib/cups/filter/hpcups %{_prefix}/lib/cups/filter/hpcupsfax %{_prefix}/lib/cups/filter/hpps %{_prefix}/lib/cups/filter/pstotiff %{_unitdir}/hplip-printer@.service %{_libdir}/libhpdiscovery.so.* %{_libdir}/libhpip.so.* %{_libdir}/libhpipp.so.* %{_libdir}/libhpmud.so.* %{_libdir}/sane/libsane-hpaio.so.* %{_libdir}/sane/libsane-hpaio.so %{python3_sitearch}/*.so %{_datadir}/applications/hplip.desktop #%{_datadir}/cups/drv/hp/hpijs.drv %{_datadir}/cups/drv/hp/hpcups.drv %if "%{cups_ver}" == "1.4" %{_sysconfdir}/cups/pstotiff.* %else %{_datadir}/cups/mime/pstotiff.* %endif %dir %{_datadir}/hplip %{_datadir}/hplip/* %{_datadir}/cups/model/HP/* %{_datadir}/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi %dir %attr(0755,root,lp) /var/lib/hp %exclude %{_datadir}/hplip/plugin.spec %exclude %{_datadir}/hplip/data/firmware/hp_laserjet_*.fw.gz %exclude %{_datadir}/hplip/fax/plugins/fax_marvell*.so %exclude %{_datadir}/hplip/prnt/plugins/hbpl1*.so %exclude %{_datadir}/hplip/prnt/plugins/lj*.so %exclude %{_datadir}/hplip/scan/plugins/bb*.so %files devel %defattr(-,root,root) %{_libdir}/libhpdiscovery.so %{_libdir}/libhpip.so %{_libdir}/libhpipp.so %{_libdir}/libhpmud.so %{_datadir}/doc/* %files plugin %defattr(-,root,root) %{_datadir}/hplip/plugin.spec %{_datadir}/hplip/data/firmware/hp_laserjet_*.fw.gz %{_datadir}/hplip/fax/plugins/fax_marvell*.so %{_datadir}/hplip/prnt/plugins/hbpl1*.so %{_datadir}/hplip/prnt/plugins/lj*.so %{_datadir}/hplip/scan/plugins/bb*.so %{_datadir}/licenses/hplip-plugin/license.txt %{_localstatedir}/lib/hp/hplip.state %changelog * Tue Apr 25 2023 Automatic Build System 3.23.3-1mamba - automatic version update by autodist * Sun Nov 13 2022 Automatic Build System 3.22.10-1mamba - automatic version update by autodist * Sat Jul 09 2022 Automatic Build System 3.22.6-1mamba - automatic version update by autodist * Sat Jun 25 2022 Silvan Calarco 3.22.4-3mamba - remove broken and unuseful hp-uiscan.desktop * Mon Jun 20 2022 Silvan Calarco 3.22.4-2mamba - fix ui5-systray-hide-when-inactive patch * Sat May 21 2022 Automatic Build System 3.22.4-1mamba - automatic version update by autodist * Wed Sep 08 2021 Automatic Build System 3.21.8-1mamba - automatic version update by autodist * Sun Jul 25 2021 Silvan Calarco 3.21.6-1mamba - update to 3.21.6 * Mon Jun 21 2021 Silvan Calarco 3.21.4-2mamba - readd patch to disable libImageProcessor * Sat May 22 2021 Automatic Build System 3.21.4-1mamba - automatic version update by autodist * Tue Dec 08 2020 Silvan Calarco 3.20.11-2mamba - rebuilt by autoport with build requirements: libnetsnmp-devel>=5.9-1mamba * Sun Dec 06 2020 Automatic Build System 3.20.11-1mamba - automatic version update by autodist * Sat Nov 07 2020 Silvan Calarco 3.20.9-3mamba - fix shebangs for python3 * Mon Nov 02 2020 Silvan Calarco 3.20.9-2mamba - rebuilt with python3 * Wed Oct 07 2020 Automatic Build System 3.20.9-1mamba - automatic version update by autodist * Thu Jun 25 2020 Automatic Build System 3.20.6-1mamba - automatic version update by autodist * Wed May 20 2020 Automatic Build System 3.20.5-1mamba - automatic version update by autodist * Wed May 13 2020 Silvan Calarco 3.20.3-2mamba - replace shebang to work with python36 * Fri Mar 13 2020 Automatic Build System 3.20.3-1mamba - automatic version update by autodist * Sun Jul 21 2019 Silvan Calarco 3.19.6-3mamba - added a patch to remove closed source libImageProcessor and fix build on arm * Sat Jul 20 2019 Silvan Calarco 3.19.6-2mamba - rebuilt with python 3.6 * Sat Jun 29 2019 Automatic Build System 3.19.6-1mamba - automatic version update by autodist * Fri May 17 2019 Automatic Build System 3.19.5-1mamba - automatic version update by autodist * Fri May 03 2019 Silvan Calarco 3.19.3-1mamba - update to 3.19.3 * Sat Feb 02 2019 Automatic Build System 3.19.1-1mamba - automatic version update by autodist * Tue Jun 26 2018 Automatic Build System 3.18.6-1mamba - automatic version update by autodist * Thu Jun 07 2018 Automatic Build System 3.18.5-1mamba - automatic version update by autodist * Thu May 03 2018 Automatic Build System 3.18.4-1mamba - automatic version update by autodist * Thu Mar 22 2018 Automatic Build System 3.18.3-1mamba - automatic version update by autodist * Wed Feb 14 2018 Silvan Calarco 3.17.11-2mamba - rebuilt with --enable-qt5 * Wed Dec 20 2017 Automatic Build System 3.17.11-1mamba - automatic version update by autodist * Wed Nov 01 2017 Automatic Build System 3.17.10-1mamba - automatic version update by autodist * Mon Oct 30 2017 Automatic Build System 3.17.9-1mamba - automatic version update by autodist * Sun Jun 25 2017 Automatic Build System 3.17.6-1mamba - automatic version update by autodist * Mon Apr 24 2017 Automatic Build System 3.17.4-1mamba - automatic version update by autodist * Wed Apr 19 2017 Silvan Calarco 3.16.11-3mamba - move plugin symlinks from hplip to hplip-plugin * Tue Apr 18 2017 Silvan Calarco 3.16.11-2mamba - addded proprietary plugins package * Sat Dec 03 2016 Automatic Build System 3.16.11-1mamba - automatic version update by autodist * Sat Nov 05 2016 Automatic Build System 3.16.10-1mamba - automatic version update by autodist * Fri Jul 22 2016 Automatic Build System 3.16.7-1mamba - automatic version update by autodist * Fri Jul 08 2016 Silvan Calarco 3.16.5-3mamba - fix exiting with error in postun script * Mon Jul 04 2016 Silvan Calarco 3.16.5-2mamba - fix patch systray-hide-when-inactive * Sat May 07 2016 Automatic Build System 3.16.5-1mamba - automatic version update by autodist * Fri Mar 18 2016 Automatic Build System 3.16.3-1mamba - automatic version update by autodist * Thu Feb 11 2016 Automatic Build System 3.16.2-1mamba - automatic version update by autodist * Mon Nov 23 2015 Automatic Build System 3.15.11-1mamba - automatic version update by autodist * Sun Sep 20 2015 Automatic Build System 3.15.9-1mamba - automatic version update by autodist * Wed Aug 05 2015 Automatic Build System 3.15.7-1mamba - automatic version update by autodist * Wed Jun 17 2015 Automatic Build System 3.15.6-6mamba - automatic version update by autodist * Tue Jun 16 2015 Automatic Build System 3.15.6-5mamba - automatic version update by autodist * Tue Jun 16 2015 Automatic Build System 3.15.6-4mamba - automatic version update by autodist * Mon Jun 15 2015 Automatic Build System 3.15.6-3mamba - automatic version update by autodist * Sun Jun 14 2015 Automatic Build System 3.15.6-2mamba - automatic version update by autodist * Sat Jun 13 2015 Automatic Build System 3.15.6-1mamba - automatic version update by autodist * Sun Apr 26 2015 Automatic Build System 3.15.4-1mamba - automatic version update by autodist * Fri Feb 06 2015 Automatic Build System 3.15.2-1mamba - automatic version update by autodist * Fri Oct 17 2014 Automatic Build System 3.14.10-1mamba - automatic version update by autodist * Wed Jun 11 2014 Silvan Calarco 3.14.6-2mamba - fix systemd service file installation path * Sun Jun 08 2014 Automatic Build System 3.14.6-1mamba - automatic version update by autodist * Fri Apr 11 2014 Silvan Calarco 3.14.4-2mamba - patch to suppress 'warning: openmamba distro is not found in AUTH_TYPES' - patch to hide from systray when inactive by default * Thu Apr 10 2014 Automatic Build System 3.14.4-1mamba - automatic version update by autodist * Mon Mar 17 2014 Automatic Build System 3.14.3-1mamba - automatic version update by autodist * Fri Jan 17 2014 Automatic Build System 3.14.1-1mamba - automatic version update by autodist * Sat Nov 09 2013 Automatic Build System 3.13.11-1mamba - automatic version update by autodist * Tue Oct 29 2013 Automatic Build System 3.13.10-1mamba - automatic version update by autodist * Sun Sep 15 2013 Automatic Build System 3.13.9-1mamba - automatic version update by autodist * Mon Aug 19 2013 Automatic Build System 3.13.8-1mamba - automatic version update by autodist * Sun Jul 28 2013 Automatic Build System 3.13.7-1mamba - automatic version update by autodist * Sun Jun 30 2013 Automatic Build System 3.13.6-1mamba - automatic version update by autodist * Mon May 20 2013 Automatic Build System 3.13.5-1mamba - automatic version update by autodist * Fri Apr 12 2013 Automatic Build System 3.13.4-1mamba - automatic version update by autodist * Sat Mar 09 2013 Automatic Build System 3.13.3-1mamba - automatic version update by autodist * Sun Feb 17 2013 Automatic Build System 3.13.2-1mamba - automatic version update by autodist * Tue Jan 15 2013 Automatic Build System 3.12.11-1mamba - automatic version update by autodist * Wed Oct 03 2012 Automatic Build System 3.12.9-1mamba - automatic version update by autodist * Tue Aug 21 2012 Silvan Calarco 3.12.6-4mamba - remove udev automatic printer configuration file conflicting with system-config-printer (causes a add remove problem) - added patch to build with cups 1.6 * Mon Aug 06 2012 Silvan Calarco 3.12.6-3mamba - fix bad owner of /var/log/hp and /var/lib/hp set in 3.12.6-2mamba * Mon Aug 06 2012 Silvan Calarco 3.12.6-2mamba - install /var/log/hplip and /var/lib/hplip and fix Makefile to avoid runnning chgrp and chmod * Sun Aug 05 2012 Silvan Calarco 3.12.6-1mamba - update to 3.12.6 * Wed Nov 02 2011 Silvan Calarco 3.11.10-1mamba - update to 3.11.10 * Mon Aug 22 2011 Silvan Calarco 3.11.7-1mamba - update to 3.11.7 * Fri Mar 04 2011 Automatic Build System 3.11.1-1mamba - automatic update by autodist * Tue Dec 14 2010 Automatic Build System 3.10.9-1mamba - automatic update by autodist * Thu Oct 21 2010 Davide Madrisan 3.10.6-2mamba - rebuilt againt latest net-snmp * Fri Oct 01 2010 Automatic Build System 3.10.6-1mamba - automatic update by autodist * Sun Aug 08 2010 Automatic Build System 3.10.5-3mamba - automatic rebuild by autodist * Wed Jul 21 2010 Silvan Calarco 3.10.5-2mamba - replace udev deprecated SYSFS{} and sysfs{} entries with ATTRS{} and ATTR{} * Sat Jun 05 2010 Automatic Build System 3.10.5-1mamba - automatic update by autodist * Sat Jan 02 2010 Silvan Calarco 3.9.12-1mamba - update to 3.9.12 - added requirement for python-Imaging * Wed Dec 16 2009 Silvan Calarco 3.9.10-3mamba - rebuilt with foomatic-rip-hplip * Sat Dec 05 2009 Silvan Calarco 3.9.10-2mamba - enabled build of all ppd packages (both hplip and hpcups) - install ppds under /usr/share/cups/models * Fri Dec 04 2009 Silvan Calarco 3.9.10-1mamba - update to 3.9.10 * Mon Aug 10 2009 Automatic Build System 3.9.8-1mamba - automatic update by autodist * Tue Jul 14 2009 Silvan Calarco 3.9.6b-2mamba - enabled legacy hpijs support * Fri Jul 10 2009 Automatic Build System 3.9.6b-1mamba - automatic update by autodist * Fri Dec 05 2008 Silvan Calarco 2.8.10-1mamba - update to 2.8.10 * Wed Mar 26 2008 Silvan Calarco 2.8.2-1mamba - update to 2.8.2 * Tue Mar 25 2008 Silvan Calarco 1.7.4a-2mamba - rebuild * Tue Jun 12 2007 Silvan Calarco 1.7.4a-1mamba - update to 1.7.4a * Fri Jan 19 2007 Silvan Calarco 1.6.12-1qilnx - update to version 1.6.12 by autospec * Mon Jul 10 2006 Silvan Calarco 1.6.6a-1qilnx - update to version 1.6.6a by autospec - added build requirement for libusb-devel * Tue Jun 20 2006 Stefano Cotta Ramusino 1.6.6-1qilnx - update to version 1.6.6 by autospec * Sat Jan 07 2006 Silvan Calarco 0.9.7-1qilnx - renamed from hpijs to hplip - foomatic files install remove (already provided by foomatic) * Mon Nov 28 2005 Stefano Cotta Ramusino 2.1.4-1qilnx - update to version 2.1.4 by autospec * Mon May 02 2005 Silvan Calarco 1.7.1-2qilnx - foomatic files install remove (already provided by foomatic) * Mon May 02 2005 Silvan Calarco 1.7.1-1qilnx - package created by autospec