%define lp_uid 9 %define lp_gid 9 %define cups_ver %(cups-config --api-version) Name: hplip Version: 3.18.6 Release: 1mamba Summary: A printer driver for HP inkjet devices Group: System/Spooling Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://hplipopensource.com/hplip-web/index.html 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.3-openmamba-AUTH_TYPES-warning.patch Patch3: hplip-3.16.5-systray-hide-when-inactive.patch License: BSD, LGPL ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libcups-devel BuildRequires: libdbus-devel BuildRequires: libgcc BuildRequires: libjpeg-devel BuildRequires: libnetsnmp-devel BuildRequires: libopenssl-devel BuildRequires: libperl BuildRequires: libpython-devel BuildRequires: libsane-backends-devel BuildRequires: libstdc++6-devel BuildRequires: libusbx-devel BuildRequires: perl-devel ## AUTOBUILDREQ-END BuildRequires: gcc-fortran >= 4.0.1 BuildRequires: libieee1284-devel BuildRequires: libgphoto-devel BuildRequires: libavahi-devel BuildRequires: libssp-devel BuildRequires: libudev-devel Obsoletes: hpijs Requires: cups Requires: python-Imaging BuildRoot: %{_tmppath}/%{name}-%{version}-root Requires(pre): libsane-backends >= 1.0.16 Provides: hpijs = %{version} %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. %prep %setup -q #%patch0 -p1 #%patch1 -p1 %patch2 -p1 %patch3 -p1 #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 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 %build %configure \ --enable-qt5 \ --disable-qt4 \ --enable-foomatic-drv-install \ --enable-foomatic-ppd-install \ --enable-foomatic-rip-hplip-install \ --enable-hpijs-install \ --enable-hpcups-install \ --enable-cups-drv-install \ --enable-cups-ppd-install \ --with-hpppddir=%{_datadir}/cups/model/HP \ PYTHON=%{__python} # \ # --disable-foomatic_install %make -j1 rulessystemdir=%{_unitdir} %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" %makeinstall rulessystemdir=%{_unitdir} # 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 %ifarch %{ix86} _arch='x86_32' %endif %ifarch x86_64 _arch='x86_64' %endif %ifarch arm _arch='arm32' %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 %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 %post if [ $1 -ge 1 ]; then systemctl -q daemon-reload fi : %preun # erase if [ $1 -eq 0 ]; then /sbin/chkconfig --del hplip /usr/sbin/groupdel lp &>/dev/null /usr/sbin/userdel lp &>/dev/null # service hplip stop # service cups restart fi /sbin/ldconfig : %postun # update #if [ $1 -eq 1 ]; then # service hplip restart # service cups restart #fi 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 #%{_sysconfdir}/cron.daily/hplip_cron %{_bindir}/hp-* %{_bindir}/hpijs %{_prefix}/lib/cups/backend/hp* %{_prefix}/lib/cups/filter/foomatic-rip-hplip #%{_prefix}/lib/cups/filter/hpcac %{_prefix}/lib/cups/filter/hpcups %{_prefix}/lib/cups/filter/hpcupsfax #%{_prefix}/lib/cups/filter/hplipjs %{_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 #%{_libdir}/menu/hplip %{python_sitearch}/*.so %{python_sitearch}/cupsext.la %{python_sitearch}/hpmudext.la %{python_sitearch}/scanext.la %{python_sitearch}/pcardext.la %{_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 #%config(noreplace) /var/lib/hp/hplip.state #%dir %attr(0774,root,lp) /var/log/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.la %{_libdir}/libhpdiscovery.so %{_libdir}/libhpip.la %{_libdir}/libhpip.so %{_libdir}/libhpipp.la %{_libdir}/libhpipp.so %{_libdir}/libhpmud.la %{_libdir}/libhpmud.so %{_libdir}/sane/libsane-hpaio.la %{_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 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 * Sun 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