added pkg-config file and debug package [release 1.0.8-3mamba;Thu Mar 25 2021]

This commit is contained in:
Silvan Calarco 2024-01-05 21:02:50 +01:00
parent cf8096af0e
commit 4725bbe634
3 changed files with 22 additions and 52 deletions

View File

@ -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.

11
bzip2.pc Normal file
View File

@ -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}

View File

@ -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 <silvan.calarco@mambasoft.it>
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 <silvan.calarco@mambasoft.it> 1.0.8-3mamba
- added pkg-config file and debug package
* Thu Jan 16 2020 Silvan Calarco <silvan.calarco@mambasoft.it> 1.0.8-2mamba
- x86_64: obsolete lib32-libbzip2