]> git.pld-linux.org Git - packages/libb64.git/commitdiff
- updated to 1.2.1 auto/th/libb64-1.2.1-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Jan 2017 16:19:14 +0000 (17:19 +0100)
committerJakub Bogusz <qboosh@pld-linux.org>
Sun, 22 Jan 2017 16:19:14 +0000 (17:19 +0100)
- build shared library

libb64.spec

index 1d5b33b774059c767155d5c8d5b3cc2d77ca193e..122743c9c46618cdb769b9bad83486ffec2bf6ee 100644 (file)
@@ -1,15 +1,14 @@
-# TODO
-# - shared library?
 Summary:       Fast Base64 encoding/decoding routines
 Summary(pl.UTF-8):     Szybkie funkcje do kodowania/dekodowania Base64
 Name:          libb64
-Version:       1.2
+Version:       1.2.1
 Release:       1
 License:       CC-PD
 Group:         Libraries
-Source0:       http://downloads.sourceforge.net/libb64/%{name}-%{version}.src.zip
-# Source0-md5: a609809408327117e2c643bed91b76c5
+Source0:       http://downloads.sourceforge.net/libb64/%{name}-%{version}.zip
+# Source0-md5: 8a5dc72eb7e32f074605260bc127c764
 URL:           http://libb64.sourceforge.net/
+BuildRequires: libtool >= 2:1.5
 BuildRequires: unzip
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -31,26 +30,57 @@ Header files for b64 library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki b64.
 
+%package static
+Summary:       Static b64 library
+Summary(pl.UTF-8):     Statyczna biblioteka b64
+Group:         Development/Libraries
+Requires:      %{name}-devel = %{version}-%{release}
+
+%description static
+Static b64 library.
+
+%description static -l pl.UTF-8
+Statyczna biblioteka b64.
+
 %prep
 %setup -q
 
 %build
-# override -O3, -Werror non-sense
-%{__make} -C src \
-       CFLAGS="%{rpmcflags} -I../include"
+cd src
+for f in cencode.c cdecode.c ; do
+       libtool --mode=compile %{__cc} %{rpmcflags} %{rpmcppflags} -c $f -o ${f%.c}.lo -I../include
+done
+libtool --mode=link %{__cc} %{rpmldflags} %{rpmcflags} -o libb64.la cencode.lo cdecode.lo -rpath %{_libdir}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_libdir}
-cp -p src/libb64.a $RPM_BUILD_ROOT%{_libdir}
+install -d $RPM_BUILD_ROOT{%{_libdir},%{_includedir}}
+
+cd src
+libtool --mode=install install libb64.la $RPM_BUILD_ROOT%{_libdir}
+cd ..
+cp -pr include/b64 $RPM_BUILD_ROOT%{_includedir}
+
+# no external dependencies
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libb64.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post  -p /sbin/ldconfig
+%postun        -p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
+%doc AUTHORS BENCHMARKS CHANGELOG LICENSE README
+%attr(755,root,root) %{_libdir}/libb64.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libb64.so.0
 
 %files devel
 %defattr(644,root,root,755)
-%doc AUTHORS BENCHMARKS CHANGELOG README
+%attr(755,root,root) %{_libdir}/libb64.so
+%{_includedir}/b64
+
+%files static
+%defattr(644,root,root,755)
 %{_libdir}/libb64.a
This page took 0.078617 seconds and 4 git commands to generate.