diff --git a/README.md b/README.md index b6335a1..ec32b35 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ # hplip +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. + diff --git a/hplip-3.11.7-cups-1.5.patch b/hplip-3.11.7-cups-1.5.patch new file mode 100644 index 0000000..a6e95f1 --- /dev/null +++ b/hplip-3.11.7-cups-1.5.patch @@ -0,0 +1,11 @@ +diff -up hplip-3.11.5/prnt/hpps/hppsfilter.c.cups15 hplip-3.11.5/prnt/hpps/hppsfilter.c +--- hplip-3.11.5/prnt/hpps/hppsfilter.c.cups15 2011-06-10 11:44:25.933781345 +0100 ++++ hplip-3.11.5/prnt/hpps/hppsfilter.c 2011-06-10 11:46:24.474510996 +0100 +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + #include + #include + diff --git a/hplip-3.12.9-cups-1.6.patch b/hplip-3.12.9-cups-1.6.patch new file mode 100644 index 0000000..d390df1 --- /dev/null +++ b/hplip-3.12.9-cups-1.6.patch @@ -0,0 +1,392 @@ +diff -up hplip-3.12.6/prnt/cupsext/cupsext.c.ipp_accessors hplip-3.12.6/prnt/cupsext/cupsext.c +--- hplip-3.12.6/prnt/cupsext/cupsext.c.ipp_accessors 2012-06-18 12:41:19.000000000 +0200 ++++ hplip-3.12.6/prnt/cupsext/cupsext.c 2012-07-19 17:11:47.606524137 +0200 +@@ -87,6 +87,46 @@ typedef int Py_ssize_t; + #define PY_SSIZE_T_MIN INT_MIN + #endif + ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ ++#ifndef HAVE_CUPS_1_6 ++#define ippGetCount(attr) attr->num_values ++#define ippGetGroupTag(attr) attr->group_tag ++#define ippGetValueTag(attr) attr->value_tag ++#define ippGetName(attr) attr->name ++#define ippGetBoolean(attr, element) attr->values[element].boolean ++#define ippGetInteger(attr, element) attr->values[element].integer ++#define ippGetStatusCode(ipp) ipp->request.status.status_code ++#define ippGetString(attr, element, language) attr->values[element].string.text ++ ++static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp ) ++{ ++ if (!ipp) ++ return (NULL); ++ return (ipp->current = ipp->attrs); ++} ++ ++static ipp_attribute_t * ippNextAttribute( ipp_t *ipp ) ++{ ++ if (!ipp || !ipp->current) ++ return (NULL); ++ return (ipp->current = ipp->current->next); ++} ++ ++static int ippSetOperation( ipp_t *ipp, ipp_op_t op ) ++{ ++ ipp->request.op.operation_id = op; ++ return (1); ++} ++ ++static int ippSetRequestId( ipp_t *ipp, int request_id ) ++{ ++ ipp->request.any.request_id = request_id; ++ return (1); ++} ++#endif + + int g_num_options = 0; + cups_option_t * g_options; +@@ -333,8 +373,8 @@ PyObject * getPrinters( PyObject * self, + request = ippNew(); + language = cupsLangDefault(); + +- request->request.op.operation_id = CUPS_GET_PRINTERS; +- request->request.any.request_id = 1; ++ ippSetOperation( request, CUPS_GET_PRINTERS ); ++ ippSetRequestId ( request, 1); + + ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, + "attributes-charset", NULL, cupsLangEncoding( language ) ); +@@ -378,10 +418,10 @@ PyObject * getPrinters( PyObject * self, + ipp_pstate_t state; + int i = 0; + +- for ( attr = response->attrs; attr != NULL; attr = attr->next ) ++ for ( attr = ippFirstAttribute( response ); attr != NULL; attr = ippNextAttribute( response ) ) + { +- while ( attr != NULL && attr->group_tag != IPP_TAG_PRINTER ) +- attr = attr->next; ++ while ( attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER ) ++ attr = ippNextAttribute( response ); + + if ( attr == NULL ) + break; +@@ -390,41 +430,41 @@ PyObject * getPrinters( PyObject * self, + state = IPP_PRINTER_IDLE; + accepting = 0; + +- while ( attr != NULL && attr->group_tag == IPP_TAG_PRINTER ) ++ while ( attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER ) + { +- if ( strcmp( attr->name, "printer-name" ) == 0 && +- attr->value_tag == IPP_TAG_NAME ) +- name = attr->values[ 0 ].string.text; +- +- else if ( strcmp( attr->name, "device-uri" ) == 0 && +- attr->value_tag == IPP_TAG_URI ) +- device_uri = attr->values[ 0 ].string.text; +- +- else if ( strcmp( attr->name, "printer-uri-supported" ) == 0 && +- attr->value_tag == IPP_TAG_URI ) +- printer_uri = attr->values[ 0 ].string.text; +- +- else if ( strcmp( attr->name, "printer-info" ) == 0 && +- attr->value_tag == IPP_TAG_TEXT ) +- info = attr->values[ 0 ].string.text; +- +- else if ( strcmp( attr->name, "printer-location" ) == 0 && +- attr->value_tag == IPP_TAG_TEXT ) +- location = attr->values[ 0 ].string.text; +- +- else if ( strcmp( attr->name, "printer-make-and-model" ) == 0 && +- attr->value_tag == IPP_TAG_TEXT ) +- make_model = attr->values[ 0 ].string.text; +- +- else if ( strcmp( attr->name, "printer-state" ) == 0 && +- attr->value_tag == IPP_TAG_ENUM ) +- state = ( ipp_pstate_t ) attr->values[ 0 ].integer; +- +- else if (!strcmp(attr->name, "printer-is-accepting-jobs") && +- attr->value_tag == IPP_TAG_BOOLEAN) +- accepting = attr->values[ 0 ].boolean; ++ if ( strcmp( ippGetName( attr ), "printer-name" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_NAME ) ++ name = ippGetString( attr, 0, NULL ); ++ ++ else if ( strcmp( ippGetName( attr ), "device-uri" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_URI ) ++ device_uri = ippGetString( attr, 0, NULL ); ++ ++ else if ( strcmp( ippGetName( attr ), "printer-uri-supported" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_URI ) ++ printer_uri = ippGetString( attr, 0, NULL ); ++ ++ else if ( strcmp( ippGetName( attr ), "printer-info" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_TEXT ) ++ info = ippGetString( attr, 0, NULL ); ++ ++ else if ( strcmp( ippGetName( attr ), "printer-location" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_TEXT ) ++ location = ippGetString( attr, 0, NULL ); ++ ++ else if ( strcmp( ippGetName( attr ), "printer-make-and-model" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_TEXT ) ++ make_model = ippGetString( attr, 0, NULL ); ++ ++ else if ( strcmp( ippGetName( attr ), "printer-state" ) == 0 && ++ ippGetValueTag( attr ) == IPP_TAG_ENUM ) ++ state = ( ipp_pstate_t ) ippGetInteger( attr, 0 ); ++ ++ else if (!strcmp(ippGetName( attr ), "printer-is-accepting-jobs") && ++ ippGetValueTag( attr ) == IPP_TAG_BOOLEAN) ++ accepting = ippGetBoolean( attr, 0 ); + +- attr = attr->next; ++ attr = ippNextAttribute( response ); + } + + if ( device_uri == NULL ) +@@ -522,8 +562,8 @@ PyObject * addPrinter( PyObject * self, + request = ippNew(); + language = cupsLangDefault(); + +- request->request.op.operation_id = CUPS_ADD_PRINTER; +- request->request.any.request_id = 1; ++ ippSetOperation( request, CUPS_ADD_PRINTER ); ++ ippSetRequestId ( request, 1 ); + + ippAddString( request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, + "attributes-charset", NULL, cupsLangEncoding( language ) ); +@@ -568,7 +608,7 @@ PyObject * addPrinter( PyObject * self, + } + else + { +- status = response->request.status.status_code; ++ status = ippGetStatusCode( response ); + //ippDelete( response ); + r = 1; + } +@@ -631,8 +671,8 @@ PyObject * delPrinter( PyObject * self, + */ + request = ippNew(); + +- request->request.op.operation_id = CUPS_DELETE_PRINTER; +- request->request.op.request_id = 1; ++ ippSetOperation( request, CUPS_DELETE_PRINTER ); ++ ippSetRequestId ( request, 1 ); + + language = cupsLangDefault(); + +@@ -650,7 +690,7 @@ PyObject * delPrinter( PyObject * self, + */ + response = cupsDoRequest( http, request, "/admin/" ); + +- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) ) ++ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) ) + { + r = 1; + } +@@ -721,8 +761,8 @@ PyObject * setDefaultPrinter( PyObject * + + request = ippNew(); + +- request->request.op.operation_id = CUPS_SET_DEFAULT; +- request->request.op.request_id = 1; ++ ippSetOperation( request, CUPS_SET_DEFAULT ); ++ ippSetRequestId ( request, 1 ); + + language = cupsLangDefault(); + +@@ -743,7 +783,7 @@ PyObject * setDefaultPrinter( PyObject * + + response = cupsDoRequest( http, request, "/admin/" ); + +- if ( ( response != NULL ) && ( response->request.status.status_code <= IPP_OK_CONFLICT ) ) ++ if ( ( response != NULL ) && ( ippGetStatusCode( response ) <= IPP_OK_CONFLICT ) ) + { + r = 1; + } +@@ -797,8 +837,8 @@ PyObject * controlPrinter( PyObject * se + + request = ippNew(); + +- request->request.op.operation_id = op; +- request->request.op.request_id = 1; ++ ippSetOperation( request, op ); ++ ippSetRequestId ( request, 1 ); + + language = cupsLangDefault(); + +@@ -822,7 +862,7 @@ PyObject * controlPrinter( PyObject * se + + response = cupsDoRequest(http, request, "/admin/"); + +- if (( response != NULL ) && (response->request.status.status_code <= IPP_OK_CONFLICT)) ++ if (( response != NULL ) && (ippGetStatusCode( response ) <= IPP_OK_CONFLICT)) + { + r = 1; + } +@@ -837,7 +877,7 @@ abort: + if ( response != NULL ) + ippDelete( response ); + +- return Py_BuildValue( "i", r );; ++ return Py_BuildValue( "i", r ); + } + + +@@ -1116,8 +1156,8 @@ PyObject * getPPDList( PyObject * self, + + request = ippNew(); + +- request->request.op.operation_id = CUPS_GET_PPDS; +- request->request.op.request_id = 1; ++ ippSetOperation( request, CUPS_GET_PPDS ); ++ ippSetRequestId ( request, 1 ); + + language = cupsLangDefault(); + +@@ -1143,43 +1183,43 @@ PyObject * getPPDList( PyObject * self, + if ((response = cupsDoRequest(http, request, "/")) != NULL) + { + +- for (attr = response->attrs; attr; attr = attr->next) ++ for (attr = ippFirstAttribute( response ); attr; attr = ippNextAttribute( response )) + { + PyObject *dict; + char *ppdname = NULL; + +- while (attr && attr->group_tag != IPP_TAG_PRINTER) +- attr = attr->next; ++ while (attr && ippGetGroupTag( attr ) != IPP_TAG_PRINTER) ++ attr = ippNextAttribute( response ); + + if (!attr) + break; + + dict = PyDict_New (); + +- for (; attr && attr->group_tag == IPP_TAG_PRINTER; attr = attr->next) ++ for (; attr && ippGetGroupTag( attr ) == IPP_TAG_PRINTER; attr = ippNextAttribute( response )) + { + PyObject *val = NULL; + +- if (!strcmp (attr->name, "ppd-name") && attr->value_tag == IPP_TAG_NAME) ++ if (!strcmp (ippGetName( attr ), "ppd-name") && ippGetValueTag( attr ) == IPP_TAG_NAME) + { +- ppdname = attr->values[0].string.text; ++ ppdname = ippGetString( attr, 0, NULL ); + + //sprintf( buf, "print '%s'", ppdname); + //PyRun_SimpleString( buf ); + } + +- else if (attr->value_tag == IPP_TAG_TEXT || attr->value_tag == IPP_TAG_NAME || attr->value_tag == IPP_TAG_KEYWORD) +- //else if ((!strcmp (attr->name, "ppd-natural-language") && attr->value_tag == IPP_TAG_LANGUAGE) || +- // (!strcmp (attr->name, "ppd-make-and-model") && attr->value_tag == IPP_TAG_TEXT) || +- // (!strcmp (attr->name, "ppd-make") && attr->value_tag == IPP_TAG_TEXT) || +- // (!strcmp (attr->name, "ppd-device-id") && attr->value_tag == IPP_TAG_TEXT)) ++ else if (ippGetValueTag( attr ) == IPP_TAG_TEXT || ippGetValueTag( attr ) == IPP_TAG_NAME || ippGetValueTag( attr ) == IPP_TAG_KEYWORD) ++ //else if ((!strcmp (ippGetName( attr ), "ppd-natural-language") && ippGetValueTag( attr ) == IPP_TAG_LANGUAGE) || ++ // (!strcmp (ippGetName( attr ), "ppd-make-and-model") && ippGetValueTag( attr ) == IPP_TAG_TEXT) || ++ // (!strcmp (ippGetName( attr ), "ppd-make") && ippGetValueTag( attr ) == IPP_TAG_TEXT) || ++ // (!strcmp (ippGetName( attr ), "ppd-device-id") && ippGetValueTag( attr ) == IPP_TAG_TEXT)) + { +- val = PyObj_from_UTF8(attr->values[0].string.text); ++ val = PyObj_from_UTF8(ippGetString( attr, 0, NULL )); + } + + if (val) + { +- PyDict_SetItemString (dict, attr->name, val); ++ PyDict_SetItemString (dict, ippGetName( attr ), val); + Py_DECREF (val); + } + } +diff -up hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors hplip-3.12.6/scan/sane/hpaio.c +--- hplip-3.12.6/scan/sane/hpaio.c.ipp_accessors 2012-06-18 12:42:51.000000000 +0200 ++++ hplip-3.12.6/scan/sane/hpaio.c 2012-07-19 17:12:34.557848760 +0200 +@@ -47,6 +47,43 @@ + #define DEBUG_DECLARE_ONLY + #include "sanei_debug.h" + ++#if (CUPS_VERSION_MAJOR > 1) || (CUPS_VERSION_MINOR > 5) ++#define HAVE_CUPS_1_6 1 ++#endif ++ ++#ifndef HAVE_CUPS_1_6 ++#define ippGetGroupTag(attr) attr->group_tag ++#define ippGetValueTag(attr) attr->value_tag ++#define ippGetName(attr) attr->name ++#define ippGetString(attr, element, language) attr->values[element].string.text ++ ++static ipp_attribute_t * ippFirstAttribute( ipp_t *ipp ) ++{ ++ if (!ipp) ++ return (NULL); ++ return (ipp->current = ipp->attrs); ++} ++ ++static ipp_attribute_t * ippNextAttribute( ipp_t *ipp ) ++{ ++ if (!ipp || !ipp->current) ++ return (NULL); ++ return (ipp->current = ipp->current->next); ++} ++ ++static int ippSetOperation( ipp_t *ipp, ipp_op_t op ) ++{ ++ ipp->request.op.operation_id = op; ++ return (1); ++} ++ ++static int ippSetRequestId( ipp_t *ipp, int request_id ) ++{ ++ ipp->request.any.request_id = request_id; ++ return (1); ++} ++#endif ++ + static SANE_Device **DeviceList = NULL; + + static int AddDeviceList(char *uri, char *model, SANE_Device ***pd) +@@ -186,8 +223,8 @@ static int GetCupsPrinters(char ***print + /* Assemble the IPP request */ + request = ippNew(); + +- request->request.op.operation_id = CUPS_GET_PRINTERS; +- request->request.any.request_id = 1; ++ ippSetOperation( request, CUPS_GET_PRINTERS ); ++ ippSetRequestId( request, 1 ); + + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8"); + ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en"); +@@ -197,20 +234,20 @@ static int GetCupsPrinters(char ***print + if ((response = cupsDoRequest(http, request, "/")) == NULL) + goto bugout; + +- for (attr = response->attrs; attr != NULL; attr = attr->next) ++ for (attr = ippFirstAttribute ( response ); attr != NULL; attr = ippNextAttribute( response )) + { + /* Skip leading attributes until we hit a printer. */ +- while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER) +- attr = attr->next; ++ while (attr != NULL && ippGetGroupTag( attr ) != IPP_TAG_PRINTER) ++ attr = ippNextAttribute( response ); + + if (attr == NULL) + break; + +- while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER) ++ while (attr != NULL && ippGetGroupTag( attr ) == IPP_TAG_PRINTER) + { +- if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0) ++ if (strcmp(ippGetName( attr ), "device-uri") == 0 && ippGetValueTag( attr ) == IPP_TAG_URI && AddCupsList(ippGetString( attr, 0, NULL ), printer) == 0) + cnt++; +- attr = attr->next; ++ attr = ippNextAttribute( response ); + } + + if (attr == NULL) diff --git a/hplip-3.14.4-openmamba-AUTH_TYPES-warning.patch b/hplip-3.14.4-openmamba-AUTH_TYPES-warning.patch new file mode 100644 index 0000000..fef6320 --- /dev/null +++ b/hplip-3.14.4-openmamba-AUTH_TYPES-warning.patch @@ -0,0 +1,11 @@ +diff -Nru hplip-3.14.4.orig/base/password.py hplip-3.14.4/base/password.py +--- hplip-3.14.4.orig/base/password.py 2014-04-04 12:42:20.000000000 +0200 ++++ hplip-3.14.4/base/password.py 2014-04-11 14:12:17.316274627 +0200 +@@ -35,6 +35,7 @@ + 'suse':'su', + 'mandriva':'su', + 'fedora':'su', ++ 'openmamba':'su', + 'redhat':'su', + 'rhel':'su', + 'slackware':'su', diff --git a/hplip-3.14.4-systray-hide-when-inactive.patch b/hplip-3.14.4-systray-hide-when-inactive.patch new file mode 100644 index 0000000..6a253e6 --- /dev/null +++ b/hplip-3.14.4-systray-hide-when-inactive.patch @@ -0,0 +1,12 @@ +diff -Nru hplip-3.14.4.orig/ui4/ui_utils.py hplip-3.14.4/ui4/ui_utils.py +--- hplip-3.14.4.orig/ui4/ui_utils.py 2014-04-04 12:40:22.000000000 +0200 ++++ hplip-3.14.4/ui4/ui_utils.py 2014-04-11 14:42:20.298791428 +0200 +@@ -108,7 +108,7 @@ + else: + QSettings.__init__(self, os.path.join(prop.user_dir, 'hplip.conf'), QSettings.IniFormat) + +- self.systray_visible = SYSTRAY_VISIBLE_SHOW_ALWAYS ++ self.systray_visible = SYSTRAY_VISIBLE_HIDE_WHEN_INACTIVE + self.systray_messages = SYSTRAY_MESSAGES_SHOW_ALL + self.last_used_device_uri = '' + self.last_used_printer = '' diff --git a/hplip.spec b/hplip.spec new file mode 100644 index 0000000..8f346d9 --- /dev/null +++ b/hplip.spec @@ -0,0 +1,335 @@ +%define lp_uid 9 +%define lp_gid 9 +%define cups_ver %(cups-config --api-version) +Name: hplip +Version: 3.14.4 +Release: 2mamba +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 +Patch0: %{name}-3.11.7-cups-1.5.patch +Patch1: %{name}-3.12.9-cups-1.6.patch +Patch2: hplip-3.14.4-openmamba-AUTH_TYPES-warning.patch +Patch3: hplip-3.14.4-systray-hide-when-inactive.patch +License: BSD, LGPL +## AUTOBUILDREQ-BEGIN +BuildRequires: cups +BuildRequires: glibc-devel +BuildRequires: libcups-devel +BuildRequires: libdbus-devel +BuildRequires: libgcc +BuildRequires: libjpeg-devel +BuildRequires: libnetsnmp-devel +BuildRequires: libopenssl-devel +BuildRequires: libpython-devel +BuildRequires: libsane-backends-devel +BuildRequires: libstdc++6-devel +BuildRequires: libusb-devel +BuildRequires: perl-devel +BuildRequires: python-Imaging +## 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. + +%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 + +%build +%configure \ + --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 + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%makeinstall + +# 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 + +%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 + /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 +[ -e %{_sysconfdir}/sane.d/dll.conf ] || exit 1 +grep hpaio %{_sysconfdir}/sane.d/dll.conf >/dev/null || + echo "hpaio" >> %{_sysconfdir}/sane.d/dll.conf +/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 +%{_prefix}/lib/systemd/system/hplip-printer@.service +%{_libdir}/libhpip.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 + +%files devel +%defattr(-,root,root) +%{_libdir}/libhpip.la +%{_libdir}/libhpip.so +%{_libdir}/libhpmud.la +%{_libdir}/libhpmud.so +%{_libdir}/sane/libsane-hpaio.la +%{_datadir}/doc/* + +%changelog +* 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