gutenprint.spec: use bcond instead of OS conditions
This commit is contained in:
parent
1a5c5b428d
commit
86f460b8a6
@ -5,6 +5,12 @@
|
|||||||
#%%global majminver 5.3
|
#%%global majminver 5.3
|
||||||
%global majminver $(echo %{version} | sed -E 's/\.[0-9]+$//')
|
%global majminver $(echo %{version} | sed -E 's/\.[0-9]+$//')
|
||||||
|
|
||||||
|
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
||||||
|
%bcond_without plugin
|
||||||
|
%else
|
||||||
|
%bcond_with plugin
|
||||||
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} <= 9 || 0%{?fedora}
|
%if 0%{?rhel} <= 9 || 0%{?fedora}
|
||||||
%bcond_without gtk2
|
%bcond_without gtk2
|
||||||
%else
|
%else
|
||||||
@ -72,7 +78,7 @@ BuildRequires: sed
|
|||||||
|
|
||||||
# the plugin is built only in Fedora, so
|
# the plugin is built only in Fedora, so
|
||||||
# no need gimp devel files for its ui
|
# no need gimp devel files for its ui
|
||||||
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
%if %{with plugin}
|
||||||
BuildRequires: pkgconfig(gimpui-2.0)
|
BuildRequires: pkgconfig(gimpui-2.0)
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -124,7 +130,7 @@ Requires: gtk2-devel
|
|||||||
This package contains headers and libraries required to build applications that
|
This package contains headers and libraries required to build applications that
|
||||||
uses gutenprint package.
|
uses gutenprint package.
|
||||||
|
|
||||||
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
%if %{with plugin}
|
||||||
%package plugin
|
%package plugin
|
||||||
Summary: GIMP plug-in for gutenprint
|
Summary: GIMP plug-in for gutenprint
|
||||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
@ -227,7 +233,7 @@ cat %{name}-po.lang >>%{name}.lang
|
|||||||
# to chrpath, please let me know!
|
# to chrpath, please let me know!
|
||||||
for file in \
|
for file in \
|
||||||
%{buildroot}%{_sbindir}/cups-genppd.%{majminver} \
|
%{buildroot}%{_sbindir}/cups-genppd.%{majminver} \
|
||||||
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
%if %{with plugin}
|
||||||
%{buildroot}%{_libdir}/gimp/*/plug-ins/* \
|
%{buildroot}%{_libdir}/gimp/*/plug-ins/* \
|
||||||
%endif
|
%endif
|
||||||
%{buildroot}%{_libdir}/*.so.* \
|
%{buildroot}%{_libdir}/*.so.* \
|
||||||
@ -238,7 +244,7 @@ do
|
|||||||
chrpath --delete ${file}
|
chrpath --delete ${file}
|
||||||
done
|
done
|
||||||
|
|
||||||
%if 0%{?rhel} > 8
|
%if %{without plugin}
|
||||||
%{_bindir}/rm -f %{buildroot}%{_bindir}/testpattern \
|
%{_bindir}/rm -f %{buildroot}%{_bindir}/testpattern \
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -285,7 +291,7 @@ exit 0
|
|||||||
%{_libdir}/pkgconfig/gutenprintui2.pc
|
%{_libdir}/pkgconfig/gutenprintui2.pc
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} <= 8 || 0%{?fedora}
|
%if %{with plugin}
|
||||||
%files plugin
|
%files plugin
|
||||||
%{_libdir}/gimp/*/plug-ins/gutenprint
|
%{_libdir}/gimp/*/plug-ins/gutenprint
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user