From 700d1ec69d735325432412bbdae73e7a425d6215 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Mon, 17 Nov 2014 11:13:37 -0600 Subject: [PATCH] 0.3.0-2 - -DINSTALL_HELPER_SCRIPTS=OFF (with patch) - -DCMAKE_BUILD_TYPE=Release (defaults to Debug otherwise) - disable SSE2 on %ix86 (fedora base i686 platform doesn't support it) - use %buildroot consistently --- lensfun-0.3.0-INSTALL_HELPER_SCRIPTS.patch | 16 ++++++++++++ lensfun.spec | 30 ++++++++++++++++++---- 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 lensfun-0.3.0-INSTALL_HELPER_SCRIPTS.patch diff --git a/lensfun-0.3.0-INSTALL_HELPER_SCRIPTS.patch b/lensfun-0.3.0-INSTALL_HELPER_SCRIPTS.patch new file mode 100644 index 0000000..b70bef6 --- /dev/null +++ b/lensfun-0.3.0-INSTALL_HELPER_SCRIPTS.patch @@ -0,0 +1,16 @@ +diff -up lensfun-0.3.0/docs/CMakeLists.txt.orig lensfun-0.3.0/docs/CMakeLists.txt +--- lensfun-0.3.0/docs/CMakeLists.txt.orig 2014-11-17 11:06:01.842490051 -0600 ++++ lensfun-0.3.0/docs/CMakeLists.txt 2014-11-17 11:03:25.823906935 -0600 +@@ -22,6 +22,7 @@ ADD_CUSTOM_TARGET(doc + # install documentation + INSTALL(DIRECTORY ${CMAKE_DOC_OUT}/ DESTINATION ${DOCDIR}) + ++IF(INSTALL_HELPER_SCRIPTS) + # create and install man pages + ADD_CUSTOM_TARGET(man ALL) + ADD_CUSTOM_COMMAND( +@@ -38,3 +39,4 @@ INSTALL(FILES + ${CMAKE_CURRENT_BINARY_DIR}/lensfun-add-adapter.1 + DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1 + ) ++ENDIF(INSTALL_HELPER_SCRIPTS) diff --git a/lensfun.spec b/lensfun.spec index cc16f85..a61d119 100644 --- a/lensfun.spec +++ b/lensfun.spec @@ -1,18 +1,28 @@ +%ifarch %{ix86} +%global sse2 -DBUILD_FOR_SSE2:BOOL=OFF +%endif + Name: lensfun Version: 0.3.0 Summary: Library to rectify defects introduced by photographic lenses -Release: 1%{?dist} +Release: 2%{?dist} License: LGPLv3 and CC-BY-SA URL: http://lensfun.sourceforge.net/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2 +## upstreamable patches +# install manpages only when INSTALL_HELPER_SCRIPTS=ON +Patch1: lensfun-0.3.0-INSTALL_HELPER_SCRIPTS.patch + BuildRequires: cmake >= 2.8 BuildRequires: doxygen BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(zlib) +# for rst2man, if INSTALL_HELPER_SCRIPTS != OFF +BuildRequires: python-docutils %description The lensfun library provides an open source database of photographic lenses and @@ -32,17 +42,21 @@ using lensfun. %prep -%setup -q +%setup + +%patch1 -p1 -b .INSTALL_HELPER_SCRIPTS %build mkdir -p %{_target_platform} pushd %{_target_platform} -%{cmake} \ +%{cmake} .. \ -DBUILD_DOC:BOOL=ON \ -DBUILD_TESTS:BOOL=OFF \ - .. + -DCMAKE_BUILD_TYPE=STRING=Release \ + -DINSTALL_HELPER_SCRIPTS:BOOL=OFF \ + %{?sse2} popd make %{?_smp_mflags} -C %{_target_platform} @@ -50,7 +64,7 @@ make doc -C %{_target_platform} %install -make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform} +make install/fast DESTDIR=%{buildroot} -C %{_target_platform} ## unpackaged files # omit cmake-installed doxygen docs, we handle that manually @@ -75,6 +89,12 @@ rm -rfv %{buildroot}%{_docdir}/%{name}-%{version}* %changelog +* Mon Nov 17 2014 Rex Dieter - 0.3.0-2 +- -DINSTALL_HELPER_SCRIPTS=OFF (with patch) +- -DCMAKE_BUILD_TYPE=Release (defaults to Debug otherwise) +- disable SSE2 on %%ix86 (fedora base i686 platform doesn't support it) +- use %%buildroot consistently + * Mon Nov 17 2014 Nils Philippsen - 0.3.0-1 - version 0.3.0