SPECS: lensfun.spec - added build patch (fixes as-needed, lib symlink and m...

sparky sparky at pld-linux.org
Wed Nov 19 19:31:02 CET 2008


Author: sparky                       Date: Wed Nov 19 18:31:02 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added build patch (fixes as-needed, lib symlink and more)
- verbose configure and minimal make
- various BRs
- attr for lib

---- Files affected:
SPECS:
   lensfun.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: SPECS/lensfun.spec
diff -u SPECS/lensfun.spec:1.1 SPECS/lensfun.spec:1.2
--- SPECS/lensfun.spec:1.1	Wed Nov 19 19:22:02 2008
+++ SPECS/lensfun.spec	Wed Nov 19 19:30:57 2008
@@ -8,13 +8,16 @@
 License:	LGPL
 Group:		Libraries
 Source0:	http://download.berlios.de/lensfun/%{name}-%{version}.tar.bz2
+# Source0-md5:	c5c04be4f53e3eef450ff4948d8f65b3
 URL:		http://developer.berlios.de/projects/lensfun/
-BuildRequires:	make >= 3.81
-#BuildRequires:	xorg-util-gccmakedep >= 1.0.2
+Patch0:		%{name}-build.patch
 BuildRequires:	doxygen >= 1.5.0
 BuildRequires:	glib2-devel >= 2.0.0
 BuildRequires:	libpng >= 1.0
-BuildRequires:	zlib
+BuildRequires:	libstdc++-devel
+BuildRequires:	make >= 3.81
+BuildRequires:	python
+BuildRequires:	zlib-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -31,13 +34,13 @@
 %package devel
 Summary:	lensfun library header files
 Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki lensfun
-Group:          Development/Libraries
-Requires:       %{name} = %{version}-%{release}
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
 
 %description devel
 lensfun library header files.
 
-%description -l pl.UTF-8 devel
+%description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki lensfun.
 
 %package apidocs
@@ -48,32 +51,33 @@
 %description apidocs
 lensfun library API documentation.
 
-%description -l pl.UTF-8 apidocs
+%description apidocs -l pl.UTF-8
 Dokumentacja API biblioteki lensfun.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
-./configure --prefix=%{_prefix}
+# configure is a python application which tries to mimic autoconf
+CC="%{__cc}" \
+CXX="%{__cxx}" \
+LD="%{__cxx}" \
+./configure \
+ 	--prefix=%{_prefix} \
+	--bindir=%{_bindir} \
+	--sysconfdir=%{_sysconfdir} \
+	--datadir=%{_datadir}/%{name} \
+	--libdir=%{_libdir} \
+	--includedir=%{_includedir} \
+	--libexecdir=%{_libexecdir} \
+	--cflags="%{rpmcflags}" \
+	--cxxflags="%{rpmcxxflags}" \
+ 	--ldflags="%{rpmldflags}" \
+	--compiler="gcc"
 
-# TODO:
-# Can't use:
-# LDFLAGS="%{rpmldflags}" \
-# It doesn't work.
-# 
-# Command
-# make CFLAGS=-O2 -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4 -gdwarf-2 -g2  all
-# works OK
-#
-# Command
-# make CFLAGS=-O2 -fno-strict-aliasing -fwrapv -march=i686 -mtune=pentium4 -gdwarf-2 -g2  LDFLAGS=-Wl,--as-needed -Wl,-z,relro -Wl,-z,-combreloc  all
-# gives a lot of errors such as:
-# out/posix/release/liblensfun.so: undefined reference to `g_markup_error_quark
-
-%{__make} \
-	CFLAGS="%{rpmcflags}" \
-	all
+# 'all' is not the default target
+%{__make} all
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -81,16 +85,6 @@
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-# TODO:
-# The link "liblensfun.so" as created by build process points to "liblensfun.so.0".
-# This creates dependency "lensfun-devel requires /usr/lib/liblensfun.so.0".
-# But liblensfun.so.0 is created in %post script by ldconfig and such requirement
-# can not be satisfied.
-(
-	cd $RPM_BUILD_ROOT/%{_libdir}
-	ln -sf liblensfun.so.*.*.* liblensfun.so
-)
-
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -100,7 +94,7 @@
 %files
 %defattr(644,root,root,755)
 %doc README
-%{_libdir}/liblensfun.so.*.*.*
+%attr(755,root,root) %{_libdir}/liblensfun.so.*.*.*
 %{_datadir}/lensfun
 
 %files devel
@@ -118,7 +112,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2008/11/19 18:30:57  sparky
+- added build patch (fixes as-needed, lib symlink and more)
+- verbose configure and minimal make
+- various BRs
+- attr for lib
+
 Revision 1.1  2008/11/19 18:22:02  sparky
 - unchanged spec file by Michal Kochanowicz <michal at michal.waw.pl>
-
-
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/lensfun.spec?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list