2006-12-15 18:09:13 +01:00
|
|
|
#
|
2010-01-29 15:00:15 +01:00
|
|
|
# spec file for package gzip (Version 1.3.13)
|
2006-12-15 18:09:13 +01:00
|
|
|
#
|
2010-01-14 15:26:27 +01:00
|
|
|
# Copyright (c) 2010 SUSE LINUX Products 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
|
2008-05-09 21:40:28 +02:00
|
|
|
Url: http://www.gzip.org/
|
2010-01-14 15:26:27 +01:00
|
|
|
License: GPLv2+
|
2006-12-15 18:09:13 +01:00
|
|
|
Group: Productivity/Archiving/Compression
|
2008-05-09 21:40:28 +02:00
|
|
|
AutoReqProv: on
|
2006-12-15 18:09:13 +01:00
|
|
|
PreReq: %{install_info_prereq}
|
2010-01-29 15:00:15 +01:00
|
|
|
Version: 1.3.13
|
|
|
|
Release: 1
|
2006-12-15 18:09:13 +01:00
|
|
|
Summary: GNU Zip Compression Utilities
|
|
|
|
Source: %{name}-%{version}.tar.gz
|
|
|
|
Patch: zgrep.diff
|
|
|
|
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
|
2010-01-29 15:00:15 +01:00
|
|
|
#CVE-2010-0001 integer overflow could lead to array index error in archives, compressed with
|
|
|
|
#the (LZW) compression algorithm
|
|
|
|
Patch8: gzip-CVE-2010-0001.diff
|
2006-12-15 18:09:13 +01:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
Gzip reduces the size of the named files using Lempel-Ziv coding LZ77.
|
|
|
|
Whenever possible, each file is replaced by one with the extension .gz,
|
|
|
|
while keeping the same ownership modes and access and modification
|
|
|
|
times.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Authors:
|
|
|
|
--------
|
|
|
|
Jean-loup Gailly <gzip@prep.ai.mit.edu>
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
|
|
|
%patch
|
|
|
|
%patch1
|
|
|
|
%patch2
|
|
|
|
%patch3
|
|
|
|
%patch4 -p1
|
2008-05-09 21:40:28 +02:00
|
|
|
%patch6
|
2010-01-29 15:00:15 +01:00
|
|
|
%patch8 -p1
|
2006-12-15 18:09:13 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer \
|
|
|
|
-W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith"
|
|
|
|
./configure CFLAGS="$CFLAGS" \
|
|
|
|
--prefix=%{_prefix} --infodir=%{_infodir} --mandir=%{_mandir}
|
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}
|
2010-06-28 23:26:26 +02:00
|
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-generate"
|
2007-03-29 00:41:19 +02:00
|
|
|
profile_gzip
|
2007-01-08 22:52:58 +01:00
|
|
|
make clean
|
2010-06-28 23:26:26 +02:00
|
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use"
|
2006-12-15 18:09:13 +01:00
|
|
|
%else
|
2010-06-28 23:26:26 +02:00
|
|
|
make %{?_smp_mflags}
|
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
|
|
|
|
make DESTDIR=$RPM_BUILD_ROOT install
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/bin
|
2007-02-07 00:39:06 +01:00
|
|
|
mv $RPM_BUILD_ROOT/usr/bin/{gzip,gunzip,zcat} $RPM_BUILD_ROOT/bin
|
|
|
|
sed -i 's:/usr/bin:/bin:' $RPM_BUILD_ROOT/bin/{gunzip,zcat}
|
|
|
|
ln -sf /bin/gzip /bin/gunzip /bin/zcat $RPM_BUILD_ROOT/usr/bin
|
2006-12-15 18:09:13 +01:00
|
|
|
ln -sf zmore $RPM_BUILD_ROOT/usr/bin/zless
|
|
|
|
ln -sf zmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/zless.1
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
/bin/*
|
|
|
|
/usr/bin/*
|
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
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz
|
|
|
|
|
2007-03-29 00:41:19 +02:00
|
|
|
%changelog
|