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
|
|
|
#
|
2023-01-04 15:19:27 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
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.
|
|
|
|
|
2019-01-02 13:41:47 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2006-12-15 18:09:13 +01:00
|
|
|
#
|
|
|
|
|
2008-05-09 21:40:28 +02:00
|
|
|
|
2006-12-15 18:09:13 +01:00
|
|
|
Name: gzip
|
2023-08-30 17:42:03 +02:00
|
|
|
Version: 1.13
|
2012-02-08 10:51:32 +01:00
|
|
|
Release: 0
|
2006-12-15 18:09:13 +01:00
|
|
|
Summary: GNU Zip Compression Utilities
|
2018-08-02 09:01:56 +02:00
|
|
|
License: GPL-3.0-or-later
|
2012-02-08 10:51:32 +01:00
|
|
|
Group: Productivity/Archiving/Compression
|
2022-02-14 11:30:23 +01:00
|
|
|
URL: https://www.gnu.org/software/gzip/
|
|
|
|
Source: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
|
|
|
|
Source2: https://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
|
|
|
Patch2: zmore.diff
|
|
|
|
Patch3: non-exec-stack.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
|
2022-04-27 11:39:29 +02:00
|
|
|
Patch7: xz_lzma_zstd.patch
|
2016-03-29 17:54:32 +02:00
|
|
|
Patch8: manpage-no-date.patch
|
2019-07-03 13:42:26 +02:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2013-06-11 14:44:23 +02:00
|
|
|
BuildRequires: makeinfo
|
|
|
|
BuildRequires: xz
|
2016-03-29 17:54:32 +02:00
|
|
|
Requires(post): %{install_info_prereq}
|
2021-04-13 22:12:29 +02:00
|
|
|
Requires(preun):%{install_info_prereq}
|
2022-02-14 11:30:23 +01:00
|
|
|
Conflicts: alternative(gzip)
|
|
|
|
Provides: alternative(gzip)
|
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
|
|
|
|
%setup -q
|
2024-02-27 13:12:08 +01:00
|
|
|
%patch -P 0
|
|
|
|
%patch -P 2 -p1
|
|
|
|
%patch -P 3
|
|
|
|
%patch -P 6
|
|
|
|
%patch -P 7 -p1
|
|
|
|
%patch -P 8 -p1
|
2006-12-15 18:09:13 +01:00
|
|
|
|
|
|
|
%build
|
2014-12-19 11:06:36 +01:00
|
|
|
export CFLAGS="%{optflags} -fomit-frame-pointer \
|
2023-10-25 10:04:50 +02:00
|
|
|
%ifarch s390x
|
|
|
|
-Dalignas=_Alignas \
|
|
|
|
%endif
|
2014-12-19 11:06:36 +01:00
|
|
|
-W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith -fPIE"
|
|
|
|
export LDFLAGS="-pie"
|
2019-07-03 13:42:26 +02:00
|
|
|
# added because of gzip-1.10-ibm_dfltcc_support.patch [jsc#SLE-5818]
|
|
|
|
%ifarch s390x
|
|
|
|
autoreconf -f -i
|
2020-09-03 17:32:58 +02:00
|
|
|
export CFLAGS="$CFLAGS -DDFLTCC_LEVEL_MASK=0x7e"
|
2019-07-03 13:42:26 +02:00
|
|
|
%endif
|
2021-06-29 13:57:07 +02:00
|
|
|
# Avoid text relocations on i386 as the assembler code (in
|
|
|
|
# lib/match.c) is not prepared for PIE (bsc#1143125).
|
|
|
|
export DEFS=NO_ASM
|
2023-08-24 16:00:44 +02:00
|
|
|
export CONFIG_SHELL=/bin/sh
|
2013-07-09 16:03:20 +02:00
|
|
|
%configure --disable-silent-rules \
|
|
|
|
gl_cv_func_printf_directive_n=yes \
|
2019-07-03 13:42:26 +02:00
|
|
|
gl_cv_func_printf_infinite_long_double=yes \
|
|
|
|
%ifarch s390x
|
|
|
|
--enable-dfltcc \
|
|
|
|
%endif
|
|
|
|
|
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
|
2017-05-31 07:39:57 +02:00
|
|
|
xz -cd %{SOURCE0} > $tmpfile
|
2017-05-30 11:47:23 +02:00
|
|
|
time ./gzip < $tmpfile > $tmpfile.gz
|
2007-03-29 00:41:19 +02:00
|
|
|
time ./gzip -d < $tmpfile.gz > /dev/null
|
|
|
|
}
|
2007-01-08 22:52:58 +01:00
|
|
|
%if %{do_profiling}
|
2022-02-14 11:30:23 +01:00
|
|
|
%make_build CFLAGS="$CFLAGS -fprofile-generate" LDFLAGS="-pie"
|
2007-03-29 00:41:19 +02:00
|
|
|
profile_gzip
|
2022-02-14 11:30:23 +01:00
|
|
|
%make_build clean
|
|
|
|
%make_build CFLAGS="$CFLAGS -fprofile-use" LDFLAGS="-pie"
|
2006-12-15 18:09:13 +01:00
|
|
|
%else
|
2022-02-14 11:30:23 +01:00
|
|
|
%make_build LDFLAGS="-pie"
|
2006-12-15 18:09:13 +01:00
|
|
|
%endif
|
2008-05-09 21:40:28 +02:00
|
|
|
|
|
|
|
%check
|
2023-08-24 16:00:44 +02:00
|
|
|
for i in $(seq 1 9); do
|
2008-05-09 21:40:28 +02:00
|
|
|
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
|
2017-03-27 16:11:40 +02:00
|
|
|
%make_install
|
2023-01-04 15:19:27 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2014-05-12 17:45:18 +02:00
|
|
|
mkdir -p %{buildroot}/bin
|
|
|
|
ln -sf %{_bindir}/gzip %{_bindir}/gunzip %{_bindir}/zcat %{buildroot}/bin
|
2020-11-23 18:36:18 +01:00
|
|
|
%endif
|
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
|
|
|
|
2016-04-29 10:40:55 +02:00
|
|
|
%post
|
|
|
|
%install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info%{ext_info}
|
|
|
|
|
2006-12-15 18:09:13 +01:00
|
|
|
%files
|
2018-02-27 10:47:43 +01:00
|
|
|
%license COPYING
|
2016-04-29 10:40:55 +02:00
|
|
|
%doc README AUTHORS ChangeLog TODO NEWS THANKS
|
2023-01-04 15:19:27 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2016-04-29 10:40:55 +02:00
|
|
|
/bin/gunzip
|
|
|
|
/bin/gzip
|
|
|
|
/bin/zcat
|
2020-11-23 18:36:18 +01:00
|
|
|
%endif
|
2016-04-29 10:40:55 +02:00
|
|
|
%{_bindir}/gunzip
|
|
|
|
%{_bindir}/gzexe
|
|
|
|
%{_bindir}/gzip
|
|
|
|
%{_bindir}/uncompress
|
|
|
|
%{_bindir}/zcat
|
|
|
|
%{_bindir}/zcmp
|
|
|
|
%{_bindir}/zdiff
|
|
|
|
%{_bindir}/zegrep
|
|
|
|
%{_bindir}/zfgrep
|
|
|
|
%{_bindir}/zforce
|
|
|
|
%{_bindir}/zgrep
|
|
|
|
%{_bindir}/zless
|
|
|
|
%{_bindir}/zmore
|
|
|
|
%{_bindir}/znew
|
2019-01-02 13:41:47 +01:00
|
|
|
%{_infodir}/gzip.info%{?ext_info}
|
|
|
|
%{_mandir}/man1/gunzip.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/gzexe.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/gzip.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zcat.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zcmp.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zdiff.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zforce.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zgrep.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zless.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/zmore.1%{?ext_man}
|
|
|
|
%{_mandir}/man1/znew.1%{?ext_man}
|
2006-12-15 18:09:13 +01:00
|
|
|
|
2007-03-29 00:41:19 +02:00
|
|
|
%changelog
|