Author: pluto Date: Wed Sep 17 11:04:39 2008 GMT Module: SPECS Tag: HEAD ---- Log message: - libtoolize.
---- Files affected: SPECS: libmd5.spec (1.2 -> 1.3) ---- Diffs: ================================================================ Index: SPECS/libmd5.spec diff -u SPECS/libmd5.spec:1.2 SPECS/libmd5.spec:1.3 --- SPECS/libmd5.spec:1.2 Tue Sep 16 23:30:04 2008 +++ SPECS/libmd5.spec Wed Sep 17 13:04:34 2008 @@ -8,7 +8,7 @@ Source0: http://dl.sourceforge.net/libmd5-rfc/md5.tar.gz # Source0-md5: 60f1691ece16bedc12dd2aa949cba606 URL: http://sourceforge.net/projects/libmd5-rfc/ -BuildRequires: /sbin/ldconfig +BuildRequires: libtool BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -37,21 +37,21 @@ %setup -qc %build -# XXX .spec putting optimization flags should be reasoned -%{__cc} %{rpmcflags} -O3 -funroll-loops -fpic -c md5.c -%{__ar} rc libmd5.a md5.o -%{__cc} md5.o -shared -o libmd5.so -Wl,-soname=libmd5.so.0 && /sbin/ldconfig -n . +# with -prefer-pic you can link libmd5 statically in shared object. +libtool --mode=compile --tag=CC %{__cc} %{rpmcflags} -prefer-pic -shared -c md5.c +libtool --mode=link %{__cc} -rpath %{_libdir} -o libmd5.la md5.lo # build and run testcase. -%{__cc} md5main.c -o test ./libmd5.so -lm -LD_PRELOAD=./libmd5.so ./test --test +libtool --mode=compile --tag=CC %{__cc} %{rpmcflags} -static -c md5main.c +libtool --mode=link %{__cc} -o test md5main.lo libmd5.la -lm +./test --test %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT%{_libdir} install -D md5.h $RPM_BUILD_ROOT%{_includedir}/md5.h -install libmd5.* $RPM_BUILD_ROOT%{_libdir} +libtool --mode=install cp libmd5.la $RPM_BUILD_ROOT%{_libdir} %clean rm -rf $RPM_BUILD_ROOT @@ -61,10 +61,11 @@ %files %defattr(644,root,root,755) -%attr(755,root,root) %{_libdir}/lib*.so +%attr(755,root,root) %{_libdir}/libmd5.so.*.*.* %files devel %defattr(644,root,root,755) +%{_libdir}/libmd5.la %{_libdir}/libmd5.so %{_includedir}/md5.h @@ -78,6 +79,9 @@ All persons listed below can be reached at <cvs_login>@pld-linux.org $Log$ +Revision 1.3 2008/09/17 11:04:34 pluto +- libtoolize. + Revision 1.2 2008/09/16 21:30:04 glen - unify - why spec sets optimization flags? ================================================================ ---- CVS-web: http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/libmd5.spec?r1=1.2&r2=1.3&f=u _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
