[lensfun] 0.2.6-1
Rex Dieter
rdieter at fedoraproject.org
Thu Jun 28 14:53:54 UTC 2012
commit b13d2bd635d8b3ae3733dfc4e63e36e5c219acc3
Author: Rex Dieter <rdieter at fedoraproject.org>
Date: Thu Jun 28 09:53:00 2012 -0500
0.2.6-1
- lensfun-0.2.6 (#836156)
- use cmake
- use pkgconfig-style deps
Don't actually build yet, want to try some local build-time and runtime
testing with dependent apps first
.gitignore | 3 +-
lensfun-0.2.5-cpuid.patch | 128 ----------------------------------
lensfun-0.2.6-cmake_LIB_SUFFIX.patch | 12 +++
lensfun-0.2.6-cmake_pkgconfig.patch | 22 ++++++
lensfun.spec | 92 ++++++++++++------------
sources | 2 +-
6 files changed, 82 insertions(+), 177 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 40e704b..99cd6de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
-lensfun-0.2.5.tar.bz2
+/lensfun-0.2.5.tar.bz2
+/lensfun-0.2.6.tar.bz2
diff --git a/lensfun-0.2.6-cmake_LIB_SUFFIX.patch b/lensfun-0.2.6-cmake_LIB_SUFFIX.patch
new file mode 100644
index 0000000..63e5e5e
--- /dev/null
+++ b/lensfun-0.2.6-cmake_LIB_SUFFIX.patch
@@ -0,0 +1,12 @@
+diff -up lensfun-0.2.6/CMakeLists.txt.LIB_SUFFIX lensfun-0.2.6/CMakeLists.txt
+--- lensfun-0.2.6/CMakeLists.txt.LIB_SUFFIX 2012-06-10 09:19:35.000000000 -0500
++++ lensfun-0.2.6/CMakeLists.txt 2012-06-28 08:32:16.628591449 -0500
+@@ -74,7 +74,7 @@ ENDIF()
+
+ # define destination dirs (relative to prefix)
+ SET(BINDIR bin)
+-SET(LIBDIR lib)
++SET(LIBDIR lib${LIB_SUFFIX})
+ SET(INCLUDEDIR include)
+ SET(DATADIR share/lensfun)
+ SET(DOCDIR share/doc/lensfun-${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_MICRO}.${VERSION_BUGFIX})
diff --git a/lensfun-0.2.6-cmake_pkgconfig.patch b/lensfun-0.2.6-cmake_pkgconfig.patch
new file mode 100644
index 0000000..4e4f7f4
--- /dev/null
+++ b/lensfun-0.2.6-cmake_pkgconfig.patch
@@ -0,0 +1,22 @@
+diff -up lensfun-0.2.6/libs/lensfun/CMakeLists.txt.cmake_pkgconfig lensfun-0.2.6/libs/lensfun/CMakeLists.txt
+--- lensfun-0.2.6/libs/lensfun/CMakeLists.txt.cmake_pkgconfig 2012-02-12 05:19:39.000000000 -0600
++++ lensfun-0.2.6/libs/lensfun/CMakeLists.txt 2012-06-28 09:27:52.891959669 -0500
+@@ -26,3 +26,8 @@ INSTALL(TARGETS lensfun
+ RUNTIME DESTINATION ${BINDIR}
+ LIBRARY DESTINATION ${LIBDIR}
+ ARCHIVE DESTINATION ${LIBDIR})
++
++# pkgconfig support
++CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/lensfun.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/lensfun.pc @ONLY)
++INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/lensfun.pc DESTINATION ${LIBDIR}/pkgconfig )
++
+diff -up lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake.cmake_pkgconfig lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake
+--- lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake.cmake_pkgconfig 2012-06-28 09:30:08.819551879 -0500
++++ lensfun-0.2.6/libs/lensfun/lensfun.pc.cmake 2012-06-28 09:29:05.323538151 -0500
+@@ -0,0 +1,6 @@
++Name: lensfun
++Description: A photographic lens database and access library
++Version: @VERSION_MAJOR at .@VERSION_MINOR at .@VERSION_MICRO at .@VERSION_BUGFIX@
++Requires.private: glib-2.0
++Libs: -L at CMAKE_INSTALL_PREFIX@/@LIBDIR@ -llensfun
++Cflags: -I at CMAKE_INSTALL_PREFIX@/@INCLUDEDIR@
diff --git a/lensfun.spec b/lensfun.spec
index 0328708..d9b3cc6 100644
--- a/lensfun.spec
+++ b/lensfun.spec
@@ -1,23 +1,27 @@
-# Fedora pkg-review: http://bugzilla.redhat.com/466764
-
-Name: lensfun
-Version: 0.2.5
+Name: lensfun
+Version: 0.2.6
Summary: Library to rectify defects introduced by photographic lenses
-Release: 8%{?dist}
+Release: 1%{?dist}
+
License: LGPLv3 and CC-BY-SA
Group: System Environment/Libraries
URL: http://lensfun.berlios.de/
+# an odd redirect is going on, spectool doesn't work (for 0.2.6 anyway)
Source0: http://download.berlios.de/lensfun/lensfun-%{version}.tar.bz2
-Patch0: lensfun-0.2.5-cpuid.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+## upstreamable patches
+# add LIB_SUFFIX support (and not hardcode prefix/lib)
+Patch50: lensfun-0.2.6-cmake_LIB_SUFFIX.patch
+# add pkgconfig support
+Patch51: lensfun-0.2.6-cmake_pkgconfig.patch
+
+BuildRequires: cmake
BuildRequires: doxygen
-BuildRequires: glib2-devel
-BuildRequires: libpng-devel
-BuildRequires: pkgconfig
-BuildRequires: python
-BuildRequires: zlib-devel
+BuildRequires: pkgconfig(glib-2.0)
+BuildRequires: pkgconfig(libpng)
+BuildRequires: pkgconfig(zlib)
%description
The lensfun library provides an open source database of photographic lenses and
@@ -31,44 +35,37 @@ vignetting and color contribution of a lens.
Summary: Development toolkit for %{name}
Group: Development/Libraries
License: LGPLv3
-Requires: %{name} = %{version}-%{release}
-Requires: pkgconfig
-
+Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
This package contains library and header files needed to build applications
using lensfun.
+
%prep
%setup -q
-%patch0 -p1 -b .cpuid
+
+%patch50 -p1 -b .LIB_SUFFIX
+%patch51 -p1 -b .cmake_pkgconfig
%build
-# We can't use macro configure
-./configure \
- --cflags="${CFLAGS:-%optflags}" \
- --cxxflags="${CXXFLAGS:-%optflags}" \
- --prefix=%{_prefix} \
- --bindir=%{_bindir} \
- --sysconfdir=%{_sysconfdir} \
- --datadir=%{_datadir}/lensfun \
- --libdir=%{_libdir} \
- --includedir=%{_includedir} \
- --libexecdir=%{_libexecdir} \
-%ifnarch %{ix86} x86_64
- --vectorization \
-%endif
- --target=..generic
-
-# set GCC.LDFLAGS to avoid stripping and useless -debuginfo
-make AUTODEP=0 %{?_smp_mflags} lensfun manual \
- V=1 \
- GCC.LDFLAGS.release=""
+
+mkdir -p %{_target_platform}
+pushd %{_target_platform}
+%{cmake} \
+ -DBUILD_DOC:BOOL=ON \
+ -DBUILD_TESTS:BOOL=OFF \
+ ..
+popd
+
+make %{?_smp_mflags} -C %{_target_platform}
+make doc -C %{_target_platform}
%install
-rm -rf %{buildroot}
-make AUTODEP=0 INSTALL_PREFIX=%{buildroot} install
+rm -rf $RPM_BUILD_ROOT
+
+make install/fast DESTDIR=$RPM_BUILD_ROOT -C %{_target_platform}
%clean
@@ -76,30 +73,31 @@ rm -rf %{buildroot}
%post -p /sbin/ldconfig
-
%postun -p /sbin/ldconfig
-
%files
%defattr(-,root,root,-)
-%dir %{_docdir}/%{name}-%{version}/
-%doc %{_docdir}/%{name}-%{version}/README
-%doc %{_docdir}/%{name}-%{version}/*.txt
-# currently, nothing is covered by GPLv3 (no apps in the package), no need to
-# confuse people:
-%exclude %{_docdir}/%{name}-%{version}/gpl-3.0.txt
+%doc README
+%doc docs/cc-by-sa-3.0.txt docs/lgpl-3.0.txt
+%doc docs/adobe-lens-profile.txt
%{_datadir}/lensfun/
%{_libdir}/liblensfun.so.0*
%files devel
%defattr(-,root,root,-)
-%doc %{_docdir}/%{name}-%{version}/manual/
-%{_includedir}/lensfun.h
+%doc %{_target_platform}/doc_doxygen/*
+%{_includedir}/lensfun/
%{_libdir}/liblensfun.so
%{_libdir}/pkgconfig/lensfun.pc
%changelog
+* Thu Jun 28 2012 Rex Dieter <rdieter at fedoraproject.org>
+- 0.2.6-1
+- lensfun-0.2.6 (#836156)
+- use cmake
+- use pkgconfig-style deps
+
* Thu Jun 21 2012 Nils Philippsen <nils at redhat.com> - 0.2.5-8
- don't modify doxygen configuration anymore as doxygen carries fixes now
(#831399)
diff --git a/sources b/sources
index a25fd67..a974d8d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-a10438dffae68a5988fc54b0393a3755 lensfun-0.2.5.tar.bz2
+740e4749db04da0a597630dd6339b966 lensfun-0.2.6.tar.bz2
More information about the scm-commits
mailing list