From 4725bbe634545dc1057706ae5127cad0a1539357 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:02:50 +0100 Subject: [PATCH] added pkg-config file and debug package [release 1.0.8-3mamba;Thu Mar 25 2021] --- README.md | 1 - bzip2.pc | 11 ++++++++++ bzip2.spec | 62 ++++++++++-------------------------------------------- 3 files changed, 22 insertions(+), 52 deletions(-) create mode 100644 bzip2.pc diff --git a/README.md b/README.md index f995271..cf281b8 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,5 @@ Bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors. - The command-line options are deliberately very similar to those of GNU Gzip, but they are not identical. diff --git a/bzip2.pc b/bzip2.pc new file mode 100644 index 0000000..38a2594 --- /dev/null +++ b/bzip2.pc @@ -0,0 +1,11 @@ +prefix=/usr +exec_prefix=/usr +bindir=${exec_prefix}/bin +libdir=${exec_prefix}/@LIB@ +includedir=${prefix}/include + +Name: bzip2 +Description: A file compression library +Version: @VERSION@ +Libs: -L${libdir} -lbz2 +Cflags: -I${includedir} diff --git a/bzip2.spec b/bzip2.spec index 7f12620..02be14c 100644 --- a/bzip2.spec +++ b/bzip2.spec @@ -2,7 +2,7 @@ Name: bzip2 Version: 1.0.8 -Release: 2mamba +Release: 3mamba Summary: Extremely powerful file compression utility Group: Applications/Archiving Vendor: openmamba @@ -10,6 +10,7 @@ Distribution: openmamba Packager: Silvan Calarco URL: http://www.bzip.org/ Source: git://sourceware.org/git/bzip2.git/bzip2-%{version}/bzip2-%{version}.tar.bz2 +Source1: bzip2.pc Patch0: %{name}-1.0.6-cflags.patch Patch1: %{name}-1.0.6-makefiles.patch Patch4: %{name}-1.0.3-cross_compiling.patch @@ -19,12 +20,10 @@ BuildRequires: glibc-devel ## AUTOBUILDREQ-END License: BSD Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release} -BuildRoot: %{_tmppath}/%{name}-%{version}-root %description Bzip2 compresses files using the Burrows-Wheeler block-sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors. - The command-line options are deliberately very similar to those of GNU Gzip, but they are not identical. %package -n %{libname} @@ -45,21 +44,7 @@ Requires: %{libname} = %{?epoch:%epoch:}%{version}-%{release} %description -n %{libname}-devel Header files and static library of bzip2 functions, for developing apps which will use the bzip2 library (aka libz2). -%package -n lib32-%{libname} -Summary: Libraries for developing apps which will use bzip2 (32bit) -Group: System/Libraries - -%description -n lib32-%{libname} -Library of bzip2 functions, for developing apps which will use the bzip2 library (aka libz2). - -%package -n lib32-%{libname}-devel -Summary: Header files for developing apps which will use bzip2 (32 bit) -Group: Development/Libraries -Requires: lib32-%{libname} = %{?epoch:%epoch:}%{version}-%{release} -Requires: %{libname}-devel = %{?epoch:%epoch:}%{version}-%{release} - -%description -n lib32-%{libname}-devel -Header files and static library of bzip2 functions, for developing apps which will use the bzip2 library (aka libz2). +%debug_package %prep %setup -q @@ -73,6 +58,7 @@ Header files and static library of bzip2 functions, for developing apps which wi # x86_64 lib64 support sed -i "s@/lib\(/\| \|$\)@/%{_lib}\1@g" Makefile Makefile-libbz2_so + %build %make all -f Makefile-libbz2_so \ CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64 -fpic -fPIC" \ @@ -117,30 +103,13 @@ ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bzcat.1 ln -sf bzgrep %{buildroot}%{_bindir}/bzegrep ln -sf bzgrep %{buildroot}%{_bindir}/bzfgrep -# make links needed for compatibility pointing to %buildroot -install -d %{buildroot}/bin -ln -s %{_bindir}/bzip2 %{buildroot}/bin/bzip2 -ln -s %{_bindir}/bzip2 %{buildroot}/bin/bunzip2 -ln -s %{_bindir}/bzip2 %{buildroot}/bin/bzcat - install -D -m0755 libbz2.so.%{version} %{buildroot}%{_libdir}/libbz2.so.%{version} ln -s libbz2.so.1.0 %{buildroot}%{_libdir}/libbz2.so ln -s libbz2.so.%{version} %{buildroot}%{_libdir}/libbz2.so.1.0 -%ifarch x86_64_disabled -# x86_64 lib64 support -sed -i "s@/%{_lib}\(/\| \|$\)@/\/lib\1@g" Makefile-libbz2_so -make -f Makefile-libbz2_so clean -%make -f Makefile-libbz2_so \ - CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64 -fpic -fPIC -m32" \ - CC=%{_target_platform}-gcc \ - AR=%{_target_platform}-ar \ - RANLIB=%{_target_platform}-ranlib - -install -D -m0755 libbz2.so.%{version} %{buildroot}%{_prefix}/lib/libbz2.so.%{version} -ln -s libbz2.so.1.0 %{buildroot}%{_prefix}/lib/libbz2.so -ln -s libbz2.so.%{version} %{buildroot}%{_prefix}/lib/libbz2.so.1.0 -%endif +install -D -m0644 %{SOURCE1} %{buildroot}%{_libdir}/pkgconfig/bzip2.pc +sed "s|@VERSION@|%{version}|" -i %{buildroot}%{_libdir}/pkgconfig/bzip2.pc +sed "s|@LIB@|%{_lib}|" -i %{buildroot}%{_libdir}/pkgconfig/bzip2.pc %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} @@ -150,9 +119,6 @@ ln -s libbz2.so.%{version} %{buildroot}%{_prefix}/lib/libbz2.so.1.0 %files %defattr(-,root,root) -/bin/bunzip2 -/bin/bzcat -/bin/bzip2 %{_bindir}/bunzip2 %{_bindir}/bzcat %{_bindir}/bzcmp @@ -186,19 +152,13 @@ ln -s libbz2.so.%{version} %{buildroot}%{_prefix}/lib/libbz2.so.1.0 %{_includedir}/bzlib.h %{_libdir}/libbz2.a %{_libdir}/libbz2.so +%{_libdir}/pkgconfig/bzip2.pc %doc CHANGES README README.XML.STUFF -%ifarch x86_64_disabled -%files -n lib32-%{libname} -%defattr(-,root,root) -%{_prefix}/lib/libbz2.so.* - -%files -n lib32-%{libname}-devel -%defattr(-,root,root) -%{_prefix}/lib/libbz2.so -%endif - %changelog +* Thu Mar 25 2021 Silvan Calarco 1.0.8-3mamba +- added pkg-config file and debug package + * Thu Jan 16 2020 Silvan Calarco 1.0.8-2mamba - x86_64: obsolete lib32-libbzip2