From c0c8581f3d14ec9a3614bd74d0d6a3dc9220d628f3d91622d969284115d0a252 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
Date: Wed, 9 Dec 2015 10:56:41 +0000
Subject: [PATCH] - Fix build on SLE11 by removing not required and wrongly
 installed   selinux support config - Remove another nested conditions that
 are the same - remove patch104: do_not_open_mdns_port.diff, no more needed  
 because since HPLIP 3.15.11 there is no longer "open_mdns_port=..."   in
 distros.dat for any "SUSE" distribution

OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=124
---
 hplip.changes | 11 ++++++++++-
 hplip.spec    |  8 ++++----
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/hplip.changes b/hplip.changes
index f610918..3ca66fa 100644
--- a/hplip.changes
+++ b/hplip.changes
@@ -1,3 +1,10 @@
+-------------------------------------------------------------------
+Wed Dec  9 10:55:45 UTC 2015 - tchvatal@suse.com
+
+- Fix build on SLE11 by removing not required and wrongly installed
+  selinux support config
+- Remove another nested conditions that are the same
+
 -------------------------------------------------------------------
 Tue Dec  8 20:09:01 UTC 2015 - tchvatal@suse.com
 
@@ -86,7 +93,9 @@ Thu Nov 19 11:25:19 UTC 2015 - ecsos@opensuse.org
     - Provided knowledge base article to unblock the ports and 
       enable SLP and mDNS services using opensuse firewall utility 
       at http://hplipopensource.com/node/375
-- remove patch104: do_not_open_mdns_port.diff, no more need
+- remove patch104: do_not_open_mdns_port.diff, no more needed
+  because since HPLIP 3.15.11 there is no longer "open_mdns_port=..."
+  in distros.dat for any "SUSE" distribution
 - insert check for Leap so Leap can use his own cups
 - insert check for 13.2 and Leap for udev-dirs because of 
   rpmlint-error: directory not owned by package
diff --git a/hplip.spec b/hplip.spec
index 538b00b..2043644 100644
--- a/hplip.spec
+++ b/hplip.spec
@@ -468,6 +468,10 @@ rm %{buildroot}%{_datadir}/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi
 # while in contrast manual printer setup via hp-setup usually "just works"
 # and it is clear for the user what goes on and in case of failure what went wrong.
 rm %{buildroot}%{_libexecdir}/systemd/system/hplip-printer@.service
+# Remove selinux configurations we are not supporting on SUSE
+# force for not on all distributions the files were installed
+# Can't be disabled during configure
+rm -f %{buildroot}/%{name}.{fc,if,pp,te}
 # Begin "General tests and adjustments for all PPDs" (see manufacturer-PPDs.spec):
 pushd %{buildroot}%{_datadir}/cups/model/manufacturer-PPDs/%{name}
 # Do not pollute the build log file with zillions of meaningless messages:
@@ -575,11 +579,7 @@ install -m 644 %{SOURCE102} %{buildroot}%{_mandir}/man1/
 %post -p /bin/bash
 %if 0%{?suse_version} > 1130
 %udev_rules_update
-%endif
-%if 0%{?suse_version} >= 1140
 %desktop_database_post
-%endif
-%if 0%{?suse_version} > 1130
 %icon_theme_cache_post
 %else
 gtk-update-icon-cache %{_datadir}/icons/hicolor || true