File bzip2.spec of Package bzip2.2333

# spec file for package bzip2
# Copyright (c) 2016 SUSE LINUX 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

Name:           bzip2
Version:        1.0.6
Release:        0
Summary:        A Program for Compressing Files
License:        BSD-3-Clause
Group:          Productivity/Archiving/Compression
Source1:        bznew.gz
Source2:        bznew.1.gz
Source3:        baselibs.conf
Source100:      rpmlintrc
# PATCH-FEATURE-OPENSUSE bzip2-1.0.6-autoconfiscated.patch -- Convert to a standard autoconf based package.
Patch3:         bzip2-faster.patch
Patch5:         bzip2-unsafe_strcpy.patch
Patch6:         bzip2-point-to-doc-pkg.patch
Patch7:         bzip2-ocloexec.patch
Patch8:         bzip2-1.0.6-bzgrep_return_value.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  autoconf >= 2.57
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
Provides:       bzip = %{version}
Obsoletes:      bzip < %{version}

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

%description doc
The bzip2 program and library documentation.

%package -n libbz2-1
Summary:        The bzip2 runtime library
Group:          System/Libraries

%description -n libbz2-1
The bzip2 runtime library

%package -n libbz2-devel
Summary:        The bzip2 runtime library development files
Group:          Development/Libraries/C and C++
Requires:       glibc-devel
Requires:       libbz2-1 = %{version}

%description -n libbz2-devel
The bzip2 runtime library development files.

%setup -q
%patch6 -p1
%patch8 -p1

    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}"
%configure --with-pic --disable-static
%if %{do_profiling}
make %{?_smp_mflags}
mv .libs/*.gcda
make clean
mv .libs
export CFLAGS="$RPM_OPT_FLAGS %{cflags_profile_feedback}"
%configure --with-pic --disable-static
make %{?_smp_mflags}

%makeinstall pkgconfigdir=%{_libdir}/pkgconfig
gzip -9
gzip -dc %{SOURCE1} > bznew
install -D -m 755 bznew $RPM_BUILD_ROOT%{_bindir}/bznew
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_mandir}/man1
rm -vf %{buildroot}%{_libdir}/*.la

%post -n libbz2-1 -p /sbin/ldconfig

%postun -n libbz2-1  -p /sbin/ldconfig

%doc %{_mandir}/man1/*

%files doc
%doc manual*.html bzip2.txt manual.pdf

%files -n libbz2-1

%files -n libbz2-devel

openSUSE Build Service is sponsored by