[packages/libb64] - updated to 1.2.1 - build shared library
qboosh
qboosh at pld-linux.org
Sun Jan 22 17:17:49 CET 2017
commit 24a4c289b5c7fbbb7339abd5c4c9eea7858c0c4b
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jan 22 17:19:14 2017 +0100
- updated to 1.2.1
- build shared library
libb64.spec | 52 +++++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 41 insertions(+), 11 deletions(-)
---
diff --git a/libb64.spec b/libb64.spec
index 1d5b33b..122743c 100644
--- a/libb64.spec
+++ b/libb64.spec
@@ -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
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libb64.git/commitdiff/24a4c289b5c7fbbb7339abd5c4c9eea7858c0c4b
More information about the pld-cvs-commit
mailing list