[hplip] Move PPDs requiring hpps to the main package along with the filter itself (bug #1194186).

Tim Waugh twaugh at fedoraproject.org
Tue Mar 3 13:48:21 UTC 2015


commit b39bba9f08d7055c55e5a486909f02f584e0bf51
Author: Tim Waugh <twaugh at redhat.com>
Date:   Tue Mar 3 13:12:24 2015 +0000

    Move PPDs requiring hpps to the main package along with the filter itself (bug #1194186).
    
    Resolves: rhbz#1194186

 hplip.spec | 26 ++++++++++++++++++++++----
 1 file changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/hplip.spec b/hplip.spec
index 0e5012d..8ebae72 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -324,7 +324,24 @@ rm -f %{buildroot}%{_datadir}/hplip/fax/pstotiff*
 # window), so don't ship the launcher yet.
 rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
 
-%files
+# Sort out which PPDs go into which subpackage.
+# The ones that use hpps have to go into the main package (bug #1194186).
+find %{buildroot}%{_datadir}/ppd -type f | \
+    (while read fname
+     do
+         if zgrep -q '^\*cupsFilter.* hpps' "$fname"
+         then
+	     which=0
+         else
+	     which=1
+         fi
+         printf "$which %s\n" "$fname"
+     done) > ppds-all
+sed -ne "s,^0 %{buildroot},,p" ppds-all > ppds-hpps
+sed -ne "s,^1 %{buildroot},,p" ppds-all > ppds-nohpps
+rm -f ppds-all
+
+%files -f ppds-hpps
 %doc COPYING doc/*
 %{_bindir}/hp-align
 %{_bindir}/hp-clean
@@ -354,6 +371,7 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
 %{_bindir}/hp-wificonfig
 %{_cups_serverbin}/backend/hp
 %{_cups_serverbin}/backend/hpfax
+%{_cups_serverbin}/filter/hpps
 %{_cups_serverbin}/filter/pstotiff
 %{_datadir}/cups/mime/pstotiff.convs
 # Files
@@ -435,15 +453,13 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
 %{_datadir}/hplip/data/images
 %{_datadir}/hplip/ui4
 
-%files -n hpijs
+%files -n hpijs -f ppds-nohpps
 %{_bindir}/hpijs
 %{_bindir}/hpcups-update-ppds
 %dir %{_datadir}/ppd/HP
-%{_datadir}/ppd/HP/*.ppd.gz
 %{_datadir}/cups/drv/*
 %{_cups_serverbin}/filter/hpcups
 %{_cups_serverbin}/filter/hpcupsfax
-%{_cups_serverbin}/filter/hpps
 
 %files -n libsane-hpaio
 %{_libdir}/sane/libsane-*.so*
@@ -458,6 +474,8 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
 
 %changelog
 * Tue Mar  3 2015 Tim Waugh <twaugh at redhat.com> - 3.15.2-3
+- Move PPDs requiring hpps to the main package along with the filter
+  itself (bug #1194186).
 - Don't try to write bytecode cache for hpfax backend (bug #1192761).
 
 * Thu Feb 12 2015 Tim Waugh <twaugh at redhat.com> - 3.15.2-2


More information about the scm-commits mailing list