Marcus Meissner
3a51a4ab67
Fix build with missing gets declaration (glibc 2.16) OBS-URL: https://build.opensuse.org/request/show/128155 OBS-URL: https://build.opensuse.org/package/show/Base:System/gzip?expand=0&rev=18
111 lines
3.0 KiB
RPMSpec
111 lines
3.0 KiB
RPMSpec
#
|
|
# spec file for package gzip
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products 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
|
|
Url: http://www.gzip.org/
|
|
PreReq: %{install_info_prereq} update-alternatives
|
|
Version: 1.4
|
|
Release: 0
|
|
Summary: GNU Zip Compression Utilities
|
|
License: GPL-2.0+
|
|
Group: Productivity/Archiving/Compression
|
|
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
|
|
Patch6: zdiff.diff
|
|
Patch7: gzip-stdio.in.patch
|
|
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
|
|
%patch
|
|
%patch1
|
|
%patch2
|
|
%patch3
|
|
%patch4 -p1
|
|
%patch6
|
|
%patch7 -p1
|
|
|
|
%build
|
|
CFLAGS="$RPM_OPT_FLAGS -fomit-frame-pointer \
|
|
-W -Wall -Wno-unused-parameter -Wstrict-prototypes -Wpointer-arith"
|
|
%configure --disable-silent-rules
|
|
profile_gzip()
|
|
{
|
|
tmpfile=$(mktemp)
|
|
trap "rm -f $tmpfile $tmpfile.gz" EXIT
|
|
tar -cf $tmpfile /usr || true
|
|
time ./gzip $tmpfile
|
|
time ./gzip -d < $tmpfile.gz > /dev/null
|
|
}
|
|
%if %{do_profiling}
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-generate"
|
|
profile_gzip
|
|
make clean
|
|
make %{?_smp_mflags} CFLAGS="$CFLAGS -fprofile-use"
|
|
%else
|
|
make %{?_smp_mflags}
|
|
%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
|
|
%makeinstall
|
|
#UsrMerge
|
|
mkdir -p $RPM_BUILD_ROOT/bin
|
|
ln -sf %{_bindir}/gzip %{_bindir}/gunzip %{_bindir}/zcat $RPM_BUILD_ROOT/bin
|
|
#EndUsrMerge
|
|
ln -sf zmore $RPM_BUILD_ROOT%{_bindir}/zless
|
|
ln -sf zmore.1 $RPM_BUILD_ROOT%{_mandir}/man1/zless.1
|
|
|
|
%files
|
|
%defattr(-, root, root)
|
|
#UsrMerge
|
|
/bin/*
|
|
#EndUsrMerge
|
|
%{_bindir}/*
|
|
%doc README AUTHORS ChangeLog TODO NEWS THANKS
|
|
%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
|
|
|
|
%changelog
|