[packages/bzip2] install pkgconfig file

glen glen at pld-linux.org
Tue Sep 13 08:02:14 CEST 2016


commit c91251f5b77464ee2fa34c46e98e57a8bb88cb31
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Sep 13 08:57:56 2016 +0300

    install pkgconfig file
    
    taken from fedora bzip2 package
    
    * 151e8a6 - Adding bzip2.pc to the devel subpackage (#1289576) (9 months ago) <Jaromir Capik>

 bzip2.pc   | 11 +++++++++++
 bzip2.spec | 15 +++++++++++----
 2 files changed, 22 insertions(+), 4 deletions(-)
---
diff --git a/bzip2.spec b/bzip2.spec
index 0ebf116..dd95380 100644
--- a/bzip2.spec
+++ b/bzip2.spec
@@ -1,4 +1,4 @@
-# 
+#
 # Conditional build:
 %bcond_with	progress	# with progressbar patch
 %bcond_without	static_libs	# don't build static libraries
@@ -12,13 +12,14 @@ Summary(uk.UTF-8):	Компресор файлів на базі алгорит
 Summary(ru.UTF-8):	Компрессор файлов на основе алгоритма блочной сортировки
 Name:		bzip2
 Version:	1.0.6
-Release:	2
+Release:	3
 License:	BSD-like
 Group:		Applications/Archiving
 Source0:	http://www.bzip.org/%{version}/%{name}-%{version}.tar.gz
 # Source0-md5:	00b516f4704d4a7cb50a1d97e6e8e15b
 Source1:	http://qboosh.pl/man/%{name}-man-pages.tar.bz2
 # Source1-md5:	14a68bf85666428000aad7cb0785a6e5
+Source2:	%{name}.pc
 Patch0:		%{name}-libtoolizeautoconf.patch
 Patch1:		%{name}-bzgrep.patch
 # Modified from http://www.vanheusden.com/Linux/bzip2-1.0.2.diff.gz
@@ -182,11 +183,16 @@ Bibliotecas estáticas para desenvolvimento com a bzip2.
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/{%{_lib},etc/env.d}
+install -d $RPM_BUILD_ROOT{/%{_lib},/etc/env.d,%{_pkgconfigdir}}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
+%{__sed} -e '
+	s|^libdir=.*|libdir=%{_libdir}|
+	s|^Version:.*|Version: %{version}|
+' %{SOURCE2} > $RPM_BUILD_ROOT%{_pkgconfigdir}/bzip2.pc
+
 mv -f $RPM_BUILD_ROOT%{_libdir}/libbz2.so.* $RPM_BUILD_ROOT/%{_lib}
 ln -sf /%{_lib}/libbz2.so.1.0.0 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
 
@@ -209,7 +215,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc CHANGES LICENSE README manual.html
-%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/*
+%config(noreplace,missingok) %verify(not md5 mtime size) /etc/env.d/BZIP2
 %attr(755,root,root) %{_bindir}/bunzip2
 %attr(755,root,root) %{_bindir}/bzcat
 %attr(755,root,root) %{_bindir}/bzcmp
@@ -255,6 +261,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/libbz2.la
 %{_includedir}/bzlib.h
 %{_includedir}/bzlib_private.h
+%{_pkgconfigdir}/bzip2.pc
 
 %if %{with static_libs}
 %files static
diff --git a/bzip2.pc b/bzip2.pc
new file mode 100644
index 0000000..ff40d85
--- /dev/null
+++ b/bzip2.pc
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+bindir=/usr/bin
+libdir=
+includedir=/usr/include
+
+Name: bzip2
+Description: A file compression library
+Version: 1.0.6
+Libs: -L${libdir} -lbz2
+Cflags: -I${includedir}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/bzip2.git/commitdiff/c91251f5b77464ee2fa34c46e98e57a8bb88cb31



More information about the pld-cvs-commit mailing list