[packages/libmpack: 2/2] apply upstream fix for packaging

glen glen at pld-linux.org
Sat Sep 17 13:46:57 CEST 2016


commit d5c2316ec6bb9bd39930c279f188a2f68a99bbfc
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Sat Sep 17 14:46:13 2016 +0300

    apply upstream fix for packaging
    
    https://github.com/tarruda/libmpack/pull/8
    
    package rest of the files

 libmpack.spec | 33 ++++++++++++++++++++++++++++++---
 1 file changed, 30 insertions(+), 3 deletions(-)
---
diff --git a/libmpack.spec b/libmpack.spec
index 0021dce..176cc7d 100644
--- a/libmpack.spec
+++ b/libmpack.spec
@@ -6,6 +6,8 @@ License:	MIT
 Group:		Development/Libraries
 Source0:	https://github.com/tarruda/libmpack/archive/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	a6320e37991bb56520d4670419edb43c
+Patch0:		https://patch-diff.githubusercontent.com/raw/tarruda/libmpack/pull/8.diff
+# Patch0-md5:	91f4f18a5b74713465b392b3fe20d07a
 URL:		https://github.com/tarruda/libmpack/
 BuildRequires:	libtool
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -22,27 +24,52 @@ Differences from mspack-c:
    dynamic allocation if the application needs it.
  - Non-backtracking, incremental/iterative parse/serialization API
 
+%package devel
+Summary:	Header files for %{name} library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki %{name}
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Header files for %{name} library.
+
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %{__make} config=release \
 	CC="%{__cc}" \
 	PREFIX=%{_prefix} \
 	CFLAGS="%{rpmcflags}" \
-	LDFLAGS="%{rpmldflags} -fPIC -shared" \
+	LDFLAGS="%{rpmldflags}" \
 	LIBDIR=%{_libdir} \
 	VERBOSE=1
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_libdir}
+%{__make} install \
+	PREFIX=%{_prefix} \
+	LIBDIR=%{_libdir} \
+	DESTDIR=$RPM_BUILD_ROOT
 
-libtool --mode=install install -p build/release/*.la $RPM_BUILD_ROOT%{_libdir}
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libmpack.a
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libmpack.la
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post	-p /sbin/ldconfig
+%postun	-p /sbin/ldconfig
+
 %files
 %defattr(644,root,root,755)
 %doc README.md LICENSE-MIT
+%attr(755,root,root) %{_libdir}/libmpack.so.*.*.*
+%ghost %{_libdir}/libmpack.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libmpack.so
+%{_includedir}/mpack.h
+%{_pkgconfigdir}/mpack.pc
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libmpack.git/commitdiff/d5c2316ec6bb9bd39930c279f188a2f68a99bbfc



More information about the pld-cvs-commit mailing list