bzip2/bzip2.spec

145 lines
3.9 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 10:33:37 -04:00
Name: bzip2
2019-11-06 19:03:51 +08:00
Version: 1.0.8
Release: 8
2019-09-30 10:33:37 -04:00
Summary: A high-quality data compressor
License: BSD-4-Clause
2019-09-30 10:33:37 -04:00
URL: https://www.sourceware.org/bzip2/
Source0: https://sourceware.org/pub/bzip2/%{name}-%{version}.tar.gz
Source1: bzip2.pc
2019-11-06 19:03:51 +08:00
Patch0: 0001-add-compile-option.patch
Patch1: 0002-CVE-2019-12900.patch
Patch2: 0003-license-and-version-print-should-output-to-stdout-and-exit-with-code-0.patch
Patch3: bzip2-1.0.8-toolchain-variable.patch
2019-09-30 10:33:37 -04:00
BuildRequires: gcc
2019-09-30 10:33:37 -04:00
Provides: bzip2-libs = %{version}-%{release}
Obsoletes: bzip2-libs < %{version}-%{release}
2019-09-30 10:33:37 -04:00
%description
bzip2 is a freely available, patent free, high-quality data compressor.
It typically compresses files to within 10% to 15% of the best available
techniques (the PPM family of statistical compressors), whilst being
around twice as fast at compression and six times faster at decompression.
%package devel
Summary: header files for bzip2
Requires: %{name} = %{version}-%{release}
Provides: bzip2-static = %{version}-%{release}
Obsoletes: bzip2-static < %{version}-%{release}
2019-09-30 10:33:37 -04:00
%description devel
header files for bzip2
%package_help
%prep
%autosetup -n %{name}-%{version} -p1
%build
%if "%toolchain" == "clang"
export CC=clang
export AR=llvm-ar
export RANLIB=llvm-ranlib
%endif
export CFLAGS="%{build_cflags} -Winline -fpic -fPIC -D_FILE_OFFSET_BITS=64"
%set_build_flags
%make_build -f Makefile-libbz2_so
%make_build
2019-09-30 10:33:37 -04:00
%install
%make_install PREFIX=%{buildroot}%{_prefix}
# Default install path is /usr/bin lib man, change dest dirs here.
pushd %{buildroot}%{_prefix}
mkdir -p share
mv man/ share/
mv lib lib64
popd
ln -fs bzdiff %{buildroot}%{_bindir}/bzcmp
ln -fs bzgrep %{buildroot}%{_bindir}/bzegrep
ln -fs bzgrep %{buildroot}%{_bindir}/bzfgrep
ln -fs bzmore %{buildroot}%{_bindir}/bzless
install -m 0755 libbz2.so.%{version} %{buildroot}%{_libdir}
2019-09-30 10:33:37 -04:00
ln -s libbz2.so.%{version} %{buildroot}%{_libdir}/libbz2.so.1
2020-03-11 14:42:16 +08:00
ln -s libbz2.so.1 %{buildroot}%{_libdir}/libbz2.so
cp %{S:1} .
2019-09-30 10:33:37 -04:00
sed -i "s@^libdir=@libdir=%{_libdir}@" bzip2.pc
mkdir -p %{buildroot}%{_libdir}/pkgconfig
install -m 0644 bzip2.pc %{buildroot}%{_libdir}/pkgconfig/
ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bunzip2.1
ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bzcat.1
ln -s bzip2.1 %{buildroot}%{_mandir}/man1/bzip2recover.1
2019-09-30 10:33:37 -04:00
%check
%make_build check
2019-09-30 10:33:37 -04:00
%files
%doc CHANGES README
2019-09-30 10:33:37 -04:00
%license LICENSE
%{_bindir}/*
%{_libdir}/*.so.*
%files devel
%{_includedir}/bzlib.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/
%{_libdir}/*.a
%files help
%doc manual.html manual.pdf
%{_mandir}/man1/*
2019-09-30 10:33:37 -04:00
%changelog
* Sun Aug 11 2024 Funda Wang <fundawang@yeah.net> - 1.0.8-8
- cleanup spec
- merge clang and gcc declaration
* Fri Apr 19 2024 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.0.8-7
- license and version print should output to stdout and exit with code
* Thu Apr 13 2023 Chenxi Mao <chenxi.mao@suse.com> - 1.0.8-6
- Support build with clang.
* Tue Sep 20 2022 zhoupengcheng <zhoupengcheng11@huawei.com> - 1.0.8-5
- Delete redundant .so files
2021-07-22 17:11:34 +08:00
* Thu Jul 22 2021 wuchaochao <wuchaochao4@huawei.com> - 1.0.8-4
- Remove BuildRequires gdb
* Sat Mar 21 2020 chengquan<chengquan3@huawei.com> - 1.0.8-3
- Add fPIC option to make the self-compiled environment build normally
2020-03-11 14:42:16 +08:00
* Wed Mar 11 2020 yangjian<yangjian79.huawei.com> - 1.0.8-2
- Fix dependency
2019-11-06 19:03:51 +08:00
* Sat Oct 19 2019 openEuler Builteam <buildteam@openeuler.org> - 1.0.8-1
- update bzip2
2019-09-30 10:33:37 -04:00
* Tue Sep 24 2019 shenyangyang<shenyangyang4@huawei.com> - 1.0.6-33
- Type:enhancement
- ID:NA
- SUG:NA
- DESC:add help package and combine packages
* Mon Aug 12 2019 openEuler Builteam <buildteam@openeuler.org> - 1.0.6-32
- rewrite spec
* Thu Jul 25 2019 wangchan<wangchan9@huawei.com> - 1.0.6-31
- Modify version number
* Tue Jul 16 2019 wangchan<wangchan9@huawei.com> - 1.0.6-30
- Modify version number
* Mon Jul 15 2019 wangchan<wangchan9@huawei.com> - 1.0.6-29
- Type:security
- ID:CVE-2019-12900
- SUG:restart
- DESC: fix CVE-2019-12900
* Thu Jul 12 2018 openEuler Builteam <buildteam@openeuler.org>> - 1.0.6-28
- Package init