use %%samples feature macro
... instead of sprinkling %%rhel version checks all over
This commit is contained in:
parent
fd52e196bd
commit
18bfce166b
18
LibRaw.spec
18
LibRaw.spec
@ -1,3 +1,9 @@
|
||||
|
||||
# feature macro to enable samples (or not)
|
||||
%if 0%{?rhel} != 7
|
||||
%global samples 1
|
||||
%endif
|
||||
|
||||
Summary: Library for reading RAW files obtained from digital photo cameras
|
||||
Name: LibRaw
|
||||
Version: 0.19.5
|
||||
@ -39,14 +45,12 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
%description static
|
||||
LibRaw static development libraries.
|
||||
|
||||
%if 0%{?rhel} != 7
|
||||
%package samples
|
||||
Summary: LibRaw sample programs
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
|
||||
%description samples
|
||||
LibRaw sample programs
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
@ -56,11 +60,7 @@ LibRaw sample programs
|
||||
%build
|
||||
autoreconf -if
|
||||
%configure \
|
||||
%if 0%{?rhel} == 7
|
||||
--enable-examples=no \
|
||||
%else
|
||||
--enable-examples=yes \
|
||||
%endif
|
||||
--enable-examples=%{?samples:yes}%{!?samples:no} \
|
||||
--enable-jasper \
|
||||
--enable-jpeg \
|
||||
--enable-lcms \
|
||||
@ -100,7 +100,9 @@ rm -fv %{buildroot}%{_libdir}/lib*.la
|
||||
|
||||
%files devel
|
||||
%doc manual
|
||||
#if 0%{?samples}
|
||||
%doc samples
|
||||
#endif
|
||||
%{_includedir}/libraw/
|
||||
%{_libdir}/libraw.so
|
||||
%{_libdir}/libraw_r.so
|
||||
@ -108,7 +110,7 @@ rm -fv %{buildroot}%{_libdir}/lib*.la
|
||||
%{_libdir}/pkgconfig/libraw_r.pc
|
||||
%exclude %{_docdir}/libraw/*
|
||||
|
||||
%if 0%{?rhel} != 7
|
||||
%if 0%{?samples}
|
||||
%files samples
|
||||
%{_bindir}/*
|
||||
%endif
|
||||
|
Loading…
Reference in New Issue
Block a user