epel7 compatibility (#1454359)

This commit is contained in:
Rex Dieter 2017-06-29 16:30:06 -05:00
parent 0d1aec3b27
commit a937a5b072

View File

@ -1,12 +1,13 @@
%if !0%{?bootstrap} && 0%{?fedora} > 23
%global tests 1
%global python3 1
%endif
Name: lensfun
Version: 0.3.2
Summary: Library to rectify defects introduced by photographic lenses
Release: 8%{?dist}
Release: 9%{?dist}
License: LGPLv3 and CC-BY-SA
URL: http://lensfun.sourceforge.net/
@ -29,7 +30,11 @@ BuildRequires: doxygen
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(libpng)
BuildRequires: pkgconfig(zlib)
%if 0%{?python3}
BuildRequires: python3 python3-devel
%else
Obsoletes: lensfun-tools < %{version}-%{release}
%endif
# for rst2man, if INSTALL_HELPER_SCRIPTS != OFF
BuildRequires: python-docutils
@ -76,10 +81,12 @@ Requires: %{name}%{?_isa} = %{version}-%{release}
%patch200 -p1 -b .INSTALL_HELPER_SCRIPTS
%if 0%{?python3}
sed -i.shbang \
-e "s|^#!/usr/bin/env python3$|#!%{__python3}|g" \
apps/lensfun-add-adapter \
apps/lensfun-update-data
%endif
%build
@ -88,7 +95,9 @@ pushd %{_target_platform}
%{cmake} .. \
-DBUILD_DOC:BOOL=ON \
-DBUILD_TESTS:BOOL=%{?tests:ON}%{!?tests:OFF} \
-DCMAKE_BUILD_TYPE:STRING=Release
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_DOCDIR:PATH=%{_pkgdocdir} \
%{?!python3:-DINSTALL_HELPER_SCRIPTS:BOOL=OFF}
popd
make %{?_smp_mflags} -C %{_target_platform}
@ -136,6 +145,7 @@ popd
%{_libdir}/liblensfun.so
%{_libdir}/pkgconfig/lensfun.pc
%if 0%{?python3}
%files tools
%{_bindir}/lensfun-add-adapter
%{_bindir}/lensfun-update-data
@ -145,9 +155,13 @@ popd
%files -n python3-lensfun
%{python3_sitelib}/lensfun/
%{python3_sitelib}/lensfun*.egg-info
%endif
%changelog
* Thu Jun 29 2017 Rex Dieter <rdieter@fedoraproject.org> - 0.3.2-9
- epel7 compatibility (#1454359)
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild