2006-12-15 18:09:13 +01:00
|
|
|
#
|
2012-02-08 10:51:32 +01:00
|
|
|
# spec file for package gzip
|
2006-12-15 18:09:13 +01:00
|
|
|
#
|
2016-03-20 17:33:51 +01:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2006-12-15 18:09:13 +01:00
|
|
|
#
|
2009-01-08 18:08:21 +01:00
|
|
|
# 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.
|
|
|
|
|
2006-12-15 18:09:13 +01:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2008-05-09 21:40:28 +02:00
|
|
|
|
2006-12-15 18:09:13 +01:00
|
|
|
Name: gzip
|
2013-06-11 14:44:23 +02:00
|
|
|
Version: 1.6
|
2012-02-08 10:51:32 +01:00
|
|
|
Release: 0
|
2006-12-15 18:09:13 +01:00
|
|
|
Summary: GNU Zip Compression Utilities
|
2012-02-08 10:51:32 +01:00
|
|
|
License: GPL-2.0+
|
|
|
|
Group: Productivity/Archiving/Compression
|
2014-05-12 17:45:18 +02:00
|
|
|
Url: http://www.gnu.org/software/gzip/
|
2013-06-11 14:44:23 +02:00
|
|
|
Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
|
|
|
Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
|
2014-05-12 17:45:18 +02:00
|
|
|
Source3: %{name}.keyring
|
|
|
|
Patch0: zgrep.diff
|
2006-12-15 18:09:13 +01:00
|
|
|
Patch1: tempfile.diff
|
|
|
|
Patch2: zmore.diff
|
|
|
|
Patch3: non-exec-stack.diff
|
|
|
|
Patch4: http://rsync.samba.org/ftp/unpacked/rsync/patches/gzip-rsyncable.diff
|
2008-05-09 21:40:28 +02:00
|
|
|
Patch6: zdiff.diff
|
2013-01-31 17:49:11 +01:00
|
|
|
# PATCH FIX OPENSUSE BNC#799561 - zgrep silently fails on LZMA compressed files
|
|
|
|
Patch7: xz_lzma.patch
|
2016-03-20 17:33:51 +01:00
|
|
|
Patch8: reproducible.patch
|
2013-06-11 14:44:23 +02:00
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: xz
|
2014-05-12 17:45:18 +02:00
|
|
|
Requires(post): %{install_info_prereq}
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2006-12-15 18:09:13 +01:00
|
|
|
|
|
|
|
%description
|
2014-05-12 17:45:18 +02:00
|
|
|
Gzip reduces the size of the named files using Lempel-Ziv coding LZ77.
|
2006-12-15 18:09:13 +01:00
|
|
|
Whenever possible, each file is replaced by one with the extension .gz,
|
|
|
|
while keeping the same ownership modes and access and modification
|
|
|
|
times.
|
|
|
|
|
|
|
|
%prep
|
2014-05-12 17:45:18 +02:00
|
|
|
%{?gpg_verify: %gpg_verify %{SOURCE2}}
|
2006-12-15 18:09:13 +01:00
|
|
|
%setup -q
|
2014-05-12 17:45:18 +02:00
|
|
|
%patch0
|
2006-12-15 18:09:13 +01:00
|
|
|
%patch1
|
2014-05-12 17:45:18 +02:00
|
|
|
%patch2 -p1
|
2006-12-15 18:09:13 +01:00
|
|
|
%patch3
|
|
|
|
%patch4 -p1
|
2008-05-09 21:40:28 +02:00
|
|
|
%patch6
|
2013-01-31 17:49:11 +01:00
|
|
|
%patch7 -p1
|
2016-03-20 17:33:51 +01:00
|
|
|
%patch8 -p1
|
2006-12-15 18:09:13 +01:00
|
|
|
|
|
|
|
%build
|
2014-12-19 11:06:36 +01:00
|
|
|
export CFLAGS="%{optflags} -fomit-frame-pointer \
|
|
|
|
-W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith -fPIE"
|
|
|
|
export LDFLAGS="-pie"
|
2013-07-09 16:03:20 +02:00
|
|
|
%configure --disable-silent-rules \
|
|
|
|
gl_cv_func_printf_directive_n=yes \
|
|
|
|
gl_cv_func_printf_infinite_long_double=yes
|
2007-03-29 00:41:19 +02:00
|
|
|
profile_gzip()
|
|
|
|
{
|
|
|
|
tmpfile=$(mktemp)
|
2007-04-15 10:49:40 +02:00
|
|
|
trap "rm -f $tmpfile $tmpfile.gz" EXIT
|
|
|
|
tar -cf $tmpfile /usr || true
|
2007-03-29 00:41:19 +02:00
|
|
|
time ./gzip $tmpfile
|
|
|
|
time ./gzip -d < $tmpfile.gz > /dev/null
|
|
|
|
}
|
2007-01-08 22:52:58 +01:00
|
|
|
%if %{do_profiling}
|
2014-12-19 11:35:31 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-generate" LDFLAGS="-pie"
|
2007-03-29 00:41:19 +02:00
|
|
|
profile_gzip
|
2014-05-12 17:45:18 +02:00
|
|
|
make clean %{?_smp_mflags}
|
2014-12-19 11:35:31 +01:00
|
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use" LDFLAGS="-pie"
|
2006-12-15 18:09:13 +01:00
|
|
|
%else
|
2014-12-19 11:35:31 +01:00
|
|
|
make %{?_smp_mflags} LDFLAGS="-pie"
|
2006-12-15 18:09:13 +01:00
|
|
|
%endif
|
2008-05-09 21:40:28 +02:00
|
|
|
|
|
|
|
%check
|
|
|
|
for i in 1 2 3 4 5 6 7 8 9; do
|
|
|
|
for f in build-aux/texinfo.tex /bin/bash; do
|
|
|
|
basef=${f##*/}
|
|
|
|
time ./gzip -$i < $f > $basef.gz
|
|
|
|
./gzip --test $basef.gz
|
|
|
|
./gzip -d < $basef.gz > $basef.test$i
|
|
|
|
cmp $f $basef.test$i
|
|
|
|
done
|
|
|
|
done
|
2006-12-15 18:09:13 +01:00
|
|
|
|
|
|
|
%install
|
2014-05-12 17:45:18 +02:00
|
|
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
2012-02-08 10:51:32 +01:00
|
|
|
#UsrMerge
|
2014-05-12 17:45:18 +02:00
|
|
|
mkdir -p %{buildroot}/bin
|
|
|
|
ln -sf %{_bindir}/gzip %{_bindir}/gunzip %{_bindir}/zcat %{buildroot}/bin
|
2012-02-08 10:51:32 +01:00
|
|
|
#EndUsrMerge
|
2014-05-12 17:45:18 +02:00
|
|
|
ln -sf zmore %{buildroot}%{_bindir}/zless
|
|
|
|
ln -sf zmore.1 %{buildroot}%{_mandir}/man1/zless.1
|
2006-12-15 18:09:13 +01:00
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
2012-02-08 10:51:32 +01:00
|
|
|
#UsrMerge
|
2006-12-15 18:09:13 +01:00
|
|
|
/bin/*
|
2012-02-08 10:51:32 +01:00
|
|
|
#EndUsrMerge
|
2010-09-19 20:10:36 +02:00
|
|
|
%{_bindir}/*
|
2010-01-29 15:00:15 +01:00
|
|
|
%doc README AUTHORS ChangeLog TODO NEWS THANKS
|
2006-12-15 18:09:13 +01:00
|
|
|
%doc %{_infodir}/*.gz
|
|
|
|
%doc %{_mandir}/man*/*.gz
|
|
|
|
|
|
|
|
%post
|
2014-05-12 17:45:18 +02:00
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
2012-02-08 10:51:32 +01:00
|
|
|
|
2006-12-15 18:09:13 +01:00
|
|
|
%postun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
2007-03-29 00:41:19 +02:00
|
|
|
%changelog
|