File rpm2targz.spec of Package rpm2targz

#
# spec file for package rpm2targz
#
# Copyright (c) 2011 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:           rpm2targz
Version:        9.0.0.4g
Release:        0
License:        Any permissive
Summary:        Convert rpm File to Compressed tar Archive
Url:            http://www.slackware.com/config/packages.php
Group:          Productivity/Archiving/Compression
Source0:        http://gentoo.osuosl.org/distfiles/%{name}-%{version}.tar.lzma
Source1:        rpm2targz.1
Source2:        rpmunpack.1
# PATCH-FIX-UPSTREAM rpm2targz-lzma.patch http://bugs.gentoo.org/show_bug.cgi?id=321439 -- unpack lzma compressed rpms
Patch0:         rpm2targz-9.0.0.4g-lzma.patch
BuildRequires:  xz
Requires:       xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
A simple utility to convert RPM packages into tar.gz, tar.bz2, tar.lzma,
tar.xz archives.

%prep
%setup -q
%patch0

%build
export CFLAGS="%{optflags}"
make %{?_smp_mflags}

%install
%makeinstall
install -dm 0755 %{buildroot}%{_mandir}/man1
install -m 0644 -t %{buildroot}%{_mandir}/man1 %{SOURCE1} %{SOURCE2}
cd %{buildroot}%{_mandir}/man1
for t in tar tarbz2 tbz2 tarlzma tgz tarxz txz ; do
    ln -sf rpm2targz.1 rpm2${t}.1
done

%files
%defattr(-,root,root,-)
%doc rpm2targz.README
%{_bindir}/rpm*
%doc %{_mandir}/man1/*

%changelog
openSUSE Build Service is sponsored by