summaryrefslogtreecommitdiff
path: root/packaging/tar.spec
blob: 23d1f8ee465f77ba8ed43ce5dc479c0941b93f1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
%define run_tests 0
%if %{run_tests}
    # check is defined off at .rpmmacros file.
    %undefine check
%endif

Name:           tar
Version:        1.17
Release:        0
Summary:        GNU implementation of tar ((t)ape (ar)chiver)
License:        GPL-2.0-or-later
Group:          System/Utilities
Url:            http://www.gnu.org/software/tar/
Source0:        %{name}-%{version}.tar.gz
Source1001: 	tar.manifest
BuildRequires:  help2man
BuildRequires:  libacl-devel

%description
This package normally also includes the program "rmt", which provides
remote tape drive control. Since there are compatible versions of 'rmt'
in either the 'star' package or the 'dump' package, we didn't put 'rmt'
into this package. If you are planning to use the remote tape features
provided by tar you have to also install the 'dump' or the 'star'
package.

%prep
%setup -q
cp %{SOURCE1001} .

%build
#%define my_cflags -W -Wall -Wpointer-arith -Wstrict-prototypes -Wformat-security -Wno-unused-parameter
#export CFLAGS="%{optflags} %my_cflags"
#export RSH="/usr/bin/rsh"
#export DEFAULT_ARCHIVE_FORMAT="POSIX"
#%configure \
#	gl_cv_func_linkat_follow="yes" \
#	--disable-silent-rules \
#	--disable-nls

export CFLAGS+=" -Wno-error=implicit-function-declaration -Wno-error=int-conversion"
export CFLAGS+=" -fPIE"
export LDFLAGS+=" -pie"

%configure --disable-static \
           --disable-nls
make %{?_smp_mflags}

%check
%if %{run_tests}
    %__make check || exit 0
%endif

%install
%{?make_install} %{!?make_install:make install DESTDIR=%{buildroot}}
install -d -m 755 %{buildroot}/%{_mandir}/man1
help2man ./src/tar --name "The GNU version of the tar archiving utility" -p tar \
        | gzip -c > %{buildroot}/%{_mandir}/man1/tar.1.gz
rm -rf %{buildroot}%{_libexecdir}/rmt
rm -f %{buildroot}%{_infodir}/dir


%docs_package

%files
%manifest %{name}.manifest
%defattr(-, root, root)
%{_bindir}/tar
%license COPYING