- -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
This commit is contained in:
Rex Dieter 2014-11-17 11:13:37 -06:00
parent ea7ae769bc
commit 700d1ec69d
2 changed files with 41 additions and 5 deletions

View File

@ -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)

View File

@ -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 <rdieter@fedoraproject.org> - 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 <nils@redhat.com> - 0.3.0-1
- version 0.3.0