]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blobdiff - hplip/hplip.nm
libpng: Update to 1.6.10.
[people/ms/ipfire-3.x.git] / hplip / hplip.nm
index cd3a8a2f65ed164a6ea21d6ec4c4157f6d84294c..b09973a8ac89cc11dd2267a4099e17903657f152 100644 (file)
@@ -5,7 +5,7 @@
 
 name       = hplip
 version    = 3.10.9
-release    = 1
+release    = 3
 
 groups     = Applications/Printing
 url        = http://hplipopensource.com/hplip-web/index.html
@@ -13,14 +13,14 @@ license    = GPLv2*
 summary    = HP Printer/Scanner Library (full version).
 
 description
-       HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed \
-       olution for printing, scanning, and faxing with HP inkjet and laser based \
-       printers in Linux. The HPLIP project provides printing support for 1,924 \
-       printer models. \
+       HPLIP (Hewlett-Packard Linux Imaging & Printing) is an HP-developed
+       olution for printing, scanning, and faxing with HP inkjet and laser based
+       printers in Linux. The HPLIP project provides printing support for 1,924
+       printer models.
        This is the full version including printer/scanner support.
 end
 
-source_dl  =
+source_dl  = http://sourceforge.net/projects/%{name}/files/%{name}/%{version}/
 
 build
        requires
@@ -33,17 +33,81 @@ build
                libtool
                libusb-compat-devel
                net-snmp-devel
+               openssl-devel
                pkg-config
                python-devel
                sane-devel
        end
 
        configure_options += \
-               --sysconfdir=/etc
+               --sysconfdir=%{sysconfdir} \
+               --disable-gui-build \
+               --disable-qt4
+
+       install_cmds
+               # Remove unwanted files.
+               rm -rvf %{BUILDROOT}%{bindir}/hp-systray
+               rm -rvf %{BUILDROOT}%{sysconfdir}/sane.d/
+               rm -rvf %{BUILDROOT}%{datadir}/installer
+
+               # Remove files for HAL.
+               rm -rvf %{BUILDROOT}%{datadir}/hal
+
+               # Remove X11 relevated files.
+               rm -rvf %{BUILDROOT}%{datadir}/applications/
+
+               # Remove xdg files.
+               rm -rvf %{BUILDROOT}%{sysconfdir}/xdg/
+       end
 end
 
 packages
        package %{name}
+               requires
+                       %{name}-common=%{thisver}
+                       cups
+               end
+       end
+
+       package %{name}-common
+               summary = Files needed by the HPLIP printer and scanner drivers.
+               description = %{summary}
+
+               files
+                       %{libdir}/udev/
+                       %{libdir}/python*/
+                       %{sysconfdir}/udev/
+                       %{datadir}/hplip
+               end
+       end
+
+       package %{name}-libs
+               template LIBS
+       end
+       
+       package %{name}-devel
+               template DEVEL
+       end
+
+       package libsane-hpaio
+               summary = SANE driver for scanners in HP's multi-function devices.
+               description = %{summary}
+
+               prerequires += sane
+
+               files
+                       %{libdir}/sane/*
+               end
+
+               script postin
+                       # Add hplip scanner support to sane.
+                       echo "hpaio" >> %{sysconfdir}/sane.d/dll.conf
+               end
+
+               script postun
+                       # Remove hplip scanner support from sane.
+                       sed -i "/^hpaio$/d" %{sysconfdir}/sane.d/dll.conf
+               end
        end
 
        package %{name}-debuginfo