adding spec switch hpplugincheck - for testing if new hp plugin is available
This commit is contained in:
parent
8e32fb1008
commit
95f6d6f12c
26
hplip.spec
26
hplip.spec
@ -4,10 +4,16 @@
|
|||||||
%filter_setup
|
%filter_setup
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Hp-plugin-check is a switch, which allows testing if new hp-plugin is already available - this should be set to 1 only for local builds
|
||||||
|
# when you rebase package to new version (lately HP ships new plugins a few days after new release, which makes hp-plugin non-functional
|
||||||
|
# during this time). Any other time it should be set to 0.
|
||||||
|
%define hpplugincheck 0
|
||||||
|
%define urlplugin http://www.openprinting.org/download/printdriver/auxfiles/HP/plugins/%{name}-%{version}-plugin.run
|
||||||
|
|
||||||
Summary: HP Linux Imaging and Printing Project
|
Summary: HP Linux Imaging and Printing Project
|
||||||
Name: hplip
|
Name: hplip
|
||||||
Version: 3.16.11
|
Version: 3.16.11
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
License: GPLv2+ and MIT and BSD
|
License: GPLv2+ and MIT and BSD
|
||||||
|
|
||||||
Url: http://hplip.sourceforge.net/
|
Url: http://hplip.sourceforge.net/
|
||||||
@ -42,7 +48,11 @@ Patch25: hplip-badwhitespace.patch
|
|||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
Requires: python3-pillow
|
Requires: python3-pillow
|
||||||
Requires: cups
|
Requires: cups
|
||||||
|
%if "%{hpplugincheck}" == "1"
|
||||||
|
BuildRequires: wget
|
||||||
|
%else
|
||||||
Requires: wget
|
Requires: wget
|
||||||
|
%endif
|
||||||
Requires: python3-dbus
|
Requires: python3-dbus
|
||||||
Requires: gnupg
|
Requires: gnupg
|
||||||
# /usr/lib/udev/rules.d
|
# /usr/lib/udev/rules.d
|
||||||
@ -328,6 +338,17 @@ rm -f %{buildroot}%{_unitdir}/hplip-printer@.service
|
|||||||
# window), so don't ship the launcher yet.
|
# window), so don't ship the launcher yet.
|
||||||
rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
||||||
|
|
||||||
|
%check
|
||||||
|
%if "%{hpplugincheck}" == "1"
|
||||||
|
wget -O hp-plugin.run %{urlplugin}
|
||||||
|
%if "$?" == "0"
|
||||||
|
echo "New plugin is not available yet. Rerun build later."
|
||||||
|
rm hp-plugin.run
|
||||||
|
exit 1
|
||||||
|
%endif
|
||||||
|
rm hp-plugin.run
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc COPYING doc/*
|
%doc COPYING doc/*
|
||||||
# ex-hpijs
|
# ex-hpijs
|
||||||
@ -466,6 +487,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
|||||||
%postun libs -p /sbin/ldconfig
|
%postun libs -p /sbin/ldconfig
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Nov 28 2016 Zdenek Dohnal <zdohnal@redhat.com> - 3.16.11-2
|
||||||
|
- adding spec switch hpplugincheck - for testing if new hp plugin is available
|
||||||
|
|
||||||
* Fri Nov 25 2016 Zdenek Dohnal <zdohnal@redhat.com> - 3.16.11-1
|
* Fri Nov 25 2016 Zdenek Dohnal <zdohnal@redhat.com> - 3.16.11-1
|
||||||
- rebase to 3.16.11
|
- rebase to 3.16.11
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user