SHA256
1
0
forked from pool/bzip2
bzip2/bzip2.spec
Ismail Dönmez ffe6eab9c4 Accepting request 101629 from home:apachelogger:branches:Archiving
drop pre-2005 compatibility patch which influences the output of bzip2. it is incredibly weird that one cannot reproduce the same bzip2 after bunzip2 on a non-opensuse system with the same bzip2 version. so, since the patch in question is only there to allow incredibly old bzip2 versions to decompress files created with a newer one it seems just about time to get rid of this patch.

OBS-URL: https://build.opensuse.org/request/show/101629
OBS-URL: https://build.opensuse.org/package/show/Archiving/bzip2?expand=0&rev=28
2012-01-31 12:37:54 +00:00

151 lines
4.0 KiB
RPMSpec

#
# spec file for package bzip2
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: bzip2
Version: 1.0.6
Release: 0
Provides: bzip
Obsoletes: bzip
BuildRequires: libtool
BuildRequires: pkg-config
# The following is a kludge to get updating bzip2 to after the split work
PreReq: libbz2-1
# bug437293
%ifarch ppc64
Obsoletes: bzip2-64bit
%endif
#
Url: http://www.bzip.org/
Summary: A Program for Compressing Files
License: BSD-3-Clause
Group: Productivity/Archiving/Compression
Source: bzip2-%{version}.tar.gz
Source1: bznew.gz
Source2: bznew.1.gz
Source3: baselibs.conf
Source100: rpmlintrc
# PATCH-FEATURE-OPENSUSE bzip2-1.0.6-autoconfiscated.patch sbrabec@suse.cz -- Convert to a standard autoconf based package.
Patch: http://ftp.suse.com/pub/people/sbrabec/bzip2/for_downstream/bzip2-1.0.6-autoconfiscated.patch
Patch3: bzip2-faster.patch
Patch5: bzip2-unsafe_strcpy.patch
Patch6: bzip2-point-to-doc-pkg.patch
Patch7: bzip2-ocloexec.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
The bzip2 program is a very powerful program for compressing files.
%package doc
Summary: The bzip2 program and Library Documentation
Group: Productivity/Archiving/Compression
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
The bzip2 program and library documentation.
%package -n libbz2-1
Summary: The bzip2 runtime library
Group: Productivity/Archiving/Compression
%description -n libbz2-1
The bzip2 runtime library
%package -n libbz2-devel
Summary: The bzip2 runtime library development files
Group: Development/Libraries/Other
Requires: libbz2-1 = %{version} glibc-devel
%description -n libbz2-devel
The bzip2 runtime library development files.
%prep
%setup -q
%patch
%patch3
%patch5
%patch6 -p1
%patch7
%build
profile_bzip2()
{
tmpfile=$(mktemp)
trap "rm -f $tmpfile $tmpfile.bz2" EXIT
tar -cjf $tmpfile.bz2 /usr/src || true
# time ./bzip2 $tmpfile
time ./bzip2 -d < $tmpfile.bz2 > /dev/null
}
autoreconf -fiv
%if %{do_profiling}
export CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_generate}"
%endif
%configure\
--libdir=/%{_lib}\
--disable-static
%if %{do_profiling}
make %{?_smp_mflags}
profile_bzip2
mkdir .libs.save
mv .libs/*.gcda .libs.save/
make clean
mv .libs.save .libs
export CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_feedback}"
%configure \
--libdir=/%{_lib}\
--disable-static
%endif
make %{?_smp_mflags}
%install
%makeinstall pkgconfigdir=%{_libdir}/pkgconfig
rm $RPM_BUILD_ROOT/%{_lib}/libbz2.so $RPM_BUILD_ROOT/%{_lib}/libbz2.la
mkdir -p $RPM_BUILD_ROOT%{_libdir}
ln -sf ../../%{_lib}/libbz2.so.1 $RPM_BUILD_ROOT%{_libdir}/libbz2.so
gzip -9 manual.ps
gzip -dc %{SOURCE1} > bznew
install -D -m 755 bznew $RPM_BUILD_ROOT%{_bindir}/bznew
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1
%post -n libbz2-1 -p /sbin/ldconfig
%postun -n libbz2-1 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc %{_mandir}/man1/*
%{_bindir}/*
%files doc
%defattr(-,root,root)
%doc manual.ps.gz manual*.html bzip2.txt manual.pdf
%files -n libbz2-1
%defattr(-,root,root)
/%{_lib}/libbz2.so.1
/%{_lib}/libbz2.so.1.*
%files -n libbz2-devel
%defattr(-,root,root)
%doc LICENSE CHANGES
%{_includedir}/bzlib.h
%{_libdir}/libbz2.so
%{_libdir}/pkgconfig/bzip2.pc
%changelog