File cpio.spec of Package cpio

#
# spec file for package cpio (Version 2.9)
#
# Copyright (c) 2010 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/
#

# norootforbuild


Name:           cpio
Url:            http://www.gnu.org/software/cpio/cpio.html
License:        GPL v3 only
Group:          Productivity/Archiving/Compression
AutoReqProv:    on
Version:        2.9
Release:        75.<RELEASE46>
Summary:        A Backup and Archiving Utility
Source:         cpio-2.9.tar.bz2
Patch1:         cpio-2.9-no_rmt.patch
Patch2:         cpio-2.9-use_new_ascii_format.patch
Patch3:         cpio-2.9-mt.patch
Patch4:         cpio-2.9-use_sbin_rmt.patch
Patch5:         cpio-2.9-open_nonblock.patch
Patch6:         cpio-2.9-lfs_correction.patch
Patch7:         cpio-2.9-chmodRaceC.patch
Patch8:         cpio-2.9-paxlib-owl-alloca.patch
Patch9:         cpio-2.9-gcc4_3.patch
Patch10:        cpio-2.9-segfault_in_copyin.patch
Patch11:        cpio-2.9-avoid_overflow_warning.patch
Patch12:        cpio-2.9-doc_typo.patch
Patch13:        cpio-2.9-m4_macro.patch
#patch dir_perm reverts some things which were added by patch #7 chmodRaceC
Patch14:        cpio-2.9-dir_perm.patch
Patch15:        cpio-2.9-eof_tape_handling.patch
Patch16:        cpio-2.9-gnulib.patch
# make posibble to have device nodes with major number > 127
# Red Hat Bugzilla #450109
Patch17:        cpio-2.9-dev_number.patch
Patch18:        cpio-2.9-default_tape_dev.patch
Patch19:        cpio-pattern-file-sigsegv.patch
Patch20:        cpio-2.9-heap_overflow_in_rtapelib.patch
PreReq:         %install_info_prereq
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       %{name}-lang = %{version}

%description
GNU cpio is a program to manage archives of files. This package also
includes 'mt', a tape drive control program. Cpio copies files into or
out of a cpio or tar archive. An archive is a file that contains other
files plus information about them, such as their pathname, owner, time
stamps, and access permissions. The archive can be another file on the
disk, a magnetic tape, or a pipe. This package normally includes the
program 'rmt', which providesremote tape drive control. Because there
is a compatible 'rmt' in the'dump' package, 'rmt' is not included in
this package. If you are planningto use the remote tape features
provided by cpio, install the'dump' package as well.



Authors:
--------
    David J. MacKenzie <djm@gnu.org>
    Jim Meyering <meyering@na-net.ornl.gov>

%lang_package
%prep
%setup
%patch1 
%patch2 
%patch3 
%patch4
%patch5
%patch6
%patch7
%patch8
%patch9
%patch10
%patch11
%patch12
%patch13
%patch14 -p1
%patch15
%patch16
%patch17
%patch18
%patch19 -p1
%patch20 -p1
chmod 755 .
chmod u+w *
chmod a+r *

%build
gettextize -f
autoreconf --force --install
CFLAGS="$RPM_OPT_FLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE" \
./configure DEFAULT_RMT_DIR=/sbin \
    --prefix=/usr \
    --mandir=%{_mandir} \
    --infodir=%{_infodir} \
    --libdir=%{_libdir}
make

%install
mkdir -p $RPM_BUILD_ROOT/{usr/bin,bin}
make prefix=$RPM_BUILD_ROOT/usr infodir=$RPM_BUILD_ROOT/%_infodir mandir=$RPM_BUILD_ROOT/%_mandir install
mv $RPM_BUILD_ROOT/usr/bin/cpio $RPM_BUILD_ROOT/bin
ln -sf ../../bin/cpio $RPM_BUILD_ROOT/usr/bin/cpio
%find_lang %{name}

%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%postun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root)
/bin/cpio
/usr/bin/cpio
/usr/bin/mt
%doc %{_infodir}/cpio.info.gz
%doc %{_mandir}/man1/cpio.1.gz
%doc %{_mandir}/man1/mt.1.gz
#/usr/share/locale/*/LC_MESSAGES/cpio.mo

%files lang -f %{name}.lang

%changelog
openSUSE Build Service is sponsored by