SHA256
3
0
forked from pool/cpio
cpio/cpio.spec
Martin Pluskal cd41245e9a Accepting request 365204 from home:kstreitova:branches:Archiving
- fix typos in the description
- add 'Require: mt_st' in order not to surprise users by the missing
  'mt' binary

OBS-URL: https://build.opensuse.org/request/show/365204
OBS-URL: https://build.opensuse.org/package/show/Archiving/cpio?expand=0&rev=62
2016-03-03 12:34:16 +00:00

132 lines
3.9 KiB
RPMSpec

#
# spec file for package cpio
#
# 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 http://bugs.opensuse.org/
#
Name: cpio
Version: 2.12
Release: 0
Summary: A Backup and Archiving Utility
License: GPL-3.0
Group: Productivity/Archiving/Backup
Url: http://www.gnu.org/software/cpio/cpio.html
Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2
Source1: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.bz2.sig
Source2: %{name}.keyring
Patch2: cpio-use_new_ascii_format.patch
#oouch what a ...?! pieces of code grabed from mt_st package to add missing functionality (e.g. density info)
#TODO: review is patches needed while mt is no longer building
Patch3: cpio-mt.patch
Patch4: cpio-use_sbin_rmt.patch
Patch5: cpio-open_nonblock.patch
Patch15: cpio-eof_tape_handling.patch
# make posibble to have device nodes with major number > 127
# Red Hat Bugzilla #450109
Patch17: cpio-dev_number.patch
Patch18: cpio-default_tape_dev.patch
#PATCH-FIX-UPSTREAM cpio-2.10-close_files_after_copy.patch
Patch20: cpio-close_files_after_copy.patch
Patch21: cpio-pattern-file-sigsegv.patch
Patch23: paxutils-rtapelib_mtget.patch
Patch24: cpio-check_for_symlinks.patch
Patch25: cpio-fix_truncation_check.patch
Patch26: cpio-2.12-util.c_no_return_in_nonvoid_fnc.patch
Patch27: cpio-2.12-out_of_bounds_write.patch
BuildRequires: autoconf
BuildRequires: automake
Requires: mt_st
Requires(post): %{install_info_prereq}
Requires(preun): %{install_info_prereq}
Recommends: %{name}-lang = %{version}
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
GNU cpio is a program to manage archives of files. 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 also includes the program 'rmt', which provides remote tape
drive control. The 'mt', a local tape drive control program can be found
in mt_st package.
%lang_package
%prep
%setup -q
%patch2
%patch3
%patch4
%patch5
%patch15
%patch17
%patch18
%patch20
%patch21 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
#chmod 755 .
#chmod u+w *
#chmod a+r *
%build
gettextize -f
autoreconf --force --install
CFLAGS="%{optflags} -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fPIE" \
LDFLAGS="-pie" \
./configure \
--prefix=%{_prefix} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--libdir=%{_libdir} \
--disable-silent-rules
make %{?_smp_mflags}
%install
mkdir -p %{buildroot}/{usr/bin,bin}
make prefix=%{buildroot}%{_prefix} infodir=%{buildroot}%{_infodir} mandir=%{buildroot}%{_mandir} \
DEFAULT_RMT_DIR=%{buildroot}%{_sbindir} install
#UsrMerge
ln -sf %{_bindir}/cpio %{buildroot}/bin
#EndUsrMerge
%find_lang %{name}
%post
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%preun
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
%files
%defattr(-,root,root)
#UsrMerge
/bin/cpio
#EndUsrMerge
%{_bindir}/cpio
%{_sbindir}/rmt
%{_infodir}/cpio.info.gz
%{_mandir}/man1/cpio.1.gz
%{_mandir}/man8/rmt.8.gz
%files lang -f %{name}.lang
%defattr(-,root,root)
%changelog