# # spec file for package gzip # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # 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. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: gzip Version: 1.7 Release: 0 Summary: GNU Zip Compression Utilities License: GPL-2.0+ Group: Productivity/Archiving/Compression Url: http://www.gnu.org/software/gzip/ Source: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: %{name}.keyring Patch0: zgrep.diff Patch2: zmore.diff Patch3: non-exec-stack.diff Patch6: zdiff.diff # PATCH FIX OPENSUSE BNC#799561 - zgrep silently fails on LZMA compressed files Patch7: xz_lzma.patch Patch8: manpage-no-date.patch BuildRequires: makeinfo BuildRequires: xz Requires(post): %{install_info_prereq} 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. %prep %setup -q %patch0 %patch2 -p1 %patch3 %patch6 %patch7 -p1 %patch8 -p1 %build export CFLAGS="%{optflags} -fomit-frame-pointer \ -W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith -fPIE" export LDFLAGS="-pie" %configure --disable-silent-rules \ gl_cv_func_printf_directive_n=yes \ gl_cv_func_printf_infinite_long_double=yes profile_gzip() { tmpfile=$(mktemp) trap "rm -f $tmpfile $tmpfile.gz" EXIT tar -cf $tmpfile %{_prefix} || true time ./gzip $tmpfile time ./gzip -d < $tmpfile.gz > /dev/null } %if %{do_profiling} make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-generate" LDFLAGS="-pie" profile_gzip make clean %{?_smp_mflags} make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use" LDFLAGS="-pie" %else make %{?_smp_mflags} LDFLAGS="-pie" %endif %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 %install make %{?_smp_mflags} DESTDIR=%{buildroot} install #UsrMerge mkdir -p %{buildroot}/bin ln -sf %{_bindir}/gzip %{_bindir}/gunzip %{_bindir}/zcat %{buildroot}/bin #EndUsrMerge ln -sf zmore %{buildroot}%{_bindir}/zless ln -sf zmore.1 %{buildroot}%{_mandir}/man1/zless.1 %files %defattr(-, root, root) #UsrMerge /bin/* #EndUsrMerge %{_bindir}/* %doc README AUTHORS ChangeLog TODO NEWS THANKS %{_infodir}/*.* %{_mandir}/man*/*.* %post %install_info --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %preun %install_info_delete --info-dir=%{_infodir} %{_infodir}/%{name}.info.gz %changelog