From a937a5b072b98831b6cfe5857be20e6e2cbc1fc6 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Thu, 29 Jun 2017 16:30:06 -0500 Subject: [PATCH] epel7 compatibility (#1454359) --- lensfun.spec | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lensfun.spec b/lensfun.spec index 4ca8353..9603ba5 100644 --- a/lensfun.spec +++ b/lensfun.spec @@ -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 - 0.3.2-9 +- epel7 compatibility (#1454359) + * Fri Feb 10 2017 Fedora Release Engineering - 0.3.2-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild