| 1 |
|
|---|
| 2 | Summary: A GNU archiving program
|
|---|
| 3 | Name: cpio
|
|---|
| 4 | Version: 2.11
|
|---|
| 5 | Release: 4%{?dist}
|
|---|
| 6 | License: GPLv3+
|
|---|
| 7 | Group: Applications/Archiving
|
|---|
| 8 | URL: http://www.gnu.org/software/cpio/
|
|---|
| 9 | Source: ftp://ftp.gnu.org/gnu/cpio/cpio-%{version}.tar.gz
|
|---|
| 10 | Source1: cpio.1
|
|---|
| 11 |
|
|---|
| 12 | Patch1: cpio-os2.diff
|
|---|
| 13 |
|
|---|
| 14 | #Requires(post): /sbin/install-info
|
|---|
| 15 | #Requires(preun): /sbin/install-info
|
|---|
| 16 | #BuildRequires: texinfo, autoconf, gettext, rmt
|
|---|
| 17 | BuildRequires: gettext
|
|---|
| 18 | Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 19 | Requires: gettext-libs
|
|---|
| 20 |
|
|---|
| 21 | %description
|
|---|
| 22 | GNU cpio copies files into or out of a cpio or tar archive. Archives
|
|---|
| 23 | are files which contain a collection of other files plus information
|
|---|
| 24 | about them, such as their file name, owner, timestamps, and access
|
|---|
| 25 | permissions. The archive can be another file on the disk, a magnetic
|
|---|
| 26 | tape, or a pipe. GNU cpio supports the following archive formats: binary,
|
|---|
| 27 | old ASCII, new ASCII, crc, HPUX binary, HPUX old ASCII, old tar and POSIX.1
|
|---|
| 28 | tar. By default, cpio creates binary format archives, so that they are
|
|---|
| 29 | compatible with older cpio programs. When it is extracting files from
|
|---|
| 30 | archives, cpio automatically recognizes which kind of archive it is reading
|
|---|
| 31 | and can read archives created on machines with a different byte-order.
|
|---|
| 32 |
|
|---|
| 33 | Install cpio if you need a program to manage file archives.
|
|---|
| 34 |
|
|---|
| 35 | %prep
|
|---|
| 36 | %setup -q
|
|---|
| 37 | %patch1 -p1 -b .os2~
|
|---|
| 38 | #autoheader
|
|---|
| 39 |
|
|---|
| 40 | %build
|
|---|
| 41 | export CONFIG_SHELL="/@unixroot/usr/bin/sh.exe"
|
|---|
| 42 | export CFLAGS="$RPM_OPT_FLAGS -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -pedantic -fno-strict-aliasing -Wall" ; \
|
|---|
| 43 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp" ; \
|
|---|
| 44 | export LIBS="-lintl -lurpo" ; \
|
|---|
| 45 | %configure --with-rmt="%{_sysconfdir}/rmt" \
|
|---|
| 46 | "--cache-file=%{_topdir}/cache/%{name}-%{_target_cpu}.cache"
|
|---|
| 47 |
|
|---|
| 48 | make %{?_smp_mflags}
|
|---|
| 49 |
|
|---|
| 50 | %install
|
|---|
| 51 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 52 |
|
|---|
| 53 | make DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" install
|
|---|
| 54 |
|
|---|
| 55 | rm -f $RPM_BUILD_ROOT%{_libexecdir}/rmt
|
|---|
| 56 | rm -f $RPM_BUILD_ROOT%{_infodir}/dir
|
|---|
| 57 | rm -f $RPM_BUILD_ROOT%{_mandir}/man1/*.1*
|
|---|
| 58 | install -c -p -m 0644 %{SOURCE1} ${RPM_BUILD_ROOT}%{_mandir}/man1
|
|---|
| 59 |
|
|---|
| 60 | rm -f $RPM_BUILD_ROOT%{_usr}/lib/charset.alias
|
|---|
| 61 |
|
|---|
| 62 | #%find_lang %{name}
|
|---|
| 63 |
|
|---|
| 64 | %clean
|
|---|
| 65 | rm -rf ${RPM_BUILD_ROOT}
|
|---|
| 66 |
|
|---|
| 67 | #%check
|
|---|
| 68 | #rm -f ${RPM_BUILD_ROOT}/test/testsuite
|
|---|
| 69 | #make check
|
|---|
| 70 |
|
|---|
| 71 |
|
|---|
| 72 | #%post
|
|---|
| 73 | #if [ -f %{_infodir}/cpio.info.gz ]; then
|
|---|
| 74 | # /sbin/install-info %{_infodir}/cpio.info.gz %{_infodir}/dir || :
|
|---|
| 75 | #fi
|
|---|
| 76 |
|
|---|
| 77 | #%preun
|
|---|
| 78 | #if [ $1 = 0 ]; then
|
|---|
| 79 | # if [ -f %{_infodir}/cpio.info.gz ]; then
|
|---|
| 80 | # /sbin/install-info --delete %{_infodir}/cpio.info.gz %{_infodir}/dir || :
|
|---|
| 81 | # fi
|
|---|
| 82 | #fi
|
|---|
| 83 |
|
|---|
| 84 | %files
|
|---|
| 85 | # -f %{name}.lang
|
|---|
| 86 | %defattr(-,root,root,0755)
|
|---|
| 87 | %doc AUTHORS ChangeLog NEWS README THANKS TODO COPYING
|
|---|
| 88 | %{_bindir}/*
|
|---|
| 89 | %{_mandir}/man*/*
|
|---|
| 90 | %{_infodir}/*.info*
|
|---|
| 91 | %{_usr}/share/locale/*
|
|---|
| 92 |
|
|---|
| 93 | %changelog
|
|---|
| 94 | * Mon Dec 03 2012 yd
|
|---|
| 95 | - remove file name ending \r due to binary stdin. fixes ticket:16.
|
|---|