File pigz.spec of Package pigz.openSUSE_12.1_Update

#
# spec file for package pigz
#
# Copyright (c) 2013 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:           pigz
Version:        2.1.6
Release:        0
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  binutils
BuildRequires:  filesystem
BuildRequires:  glibc-devel
BuildRequires:  zlib-devel
Requires:       glibc
Requires:       zlib
Source:         %name-%version.tar.bz2
Patch1:         pigz-dictzip.patch
Patch2:         pigz-spl.patch
Patch3:         pigz-do-symlinks.patch
Patch4:         pigz-always-thread.patch
Patch5:         pigz-tmpperm.patch
Url:            http://www.zlib.net/pigz/
Summary:        Multi-core gzip version
License:        Zlib
Group:          Productivity/Archiving/Compression

%description
A parallel implementation of gzip for modern multi-processor,
multi-core machines



%prep
%setup
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1

%build
export MYCFLAGS="${RPM_OPT_FLAGS}"
%{__make} CFLAGS="$MYCFLAGS" PREFIX=%{_prefix} LIBDIR=%{_libdir}

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
cp -v pigz $RPM_BUILD_ROOT/usr/bin/
cp -v unpigz $RPM_BUILD_ROOT/usr/bin/

#man page
mkdir -p $RPM_BUILD_ROOT/%{_mandir}/man1/
cp -v pigz.1 $RPM_BUILD_ROOT/%{_mandir}/man1/
cp -v pigz.1 $RPM_BUILD_ROOT/%{_mandir}/man1/unpigz.1
gzip $RPM_BUILD_ROOT/%{_mandir}/man1/pigz.1
gzip $RPM_BUILD_ROOT/%{_mandir}/man1/unpigz.1

%clean
%{__rm} -rf "$RPM_BUILD_ROOT"

%files
%defattr(-,root,root)
%doc README
%doc %{_mandir}/man1/pigz.1.gz
%doc %{_mandir}/man1/unpigz.1.gz
/usr/bin/pigz
/usr/bin/unpigz

%changelog
openSUSE Build Service is sponsored by