forked from pool/unzip
Accepting request 185618 from home:coolo:branches:openSUSE:Factory
- split the rcc dependency into a spec file of it's own, we don't need that complexity during build causing cycles like this: unzip -> librcc -> libproxy -> libXau -> xorg-x11-proto-devel -> docbook-xsl-stylesheets OBS-URL: https://build.opensuse.org/request/show/185618 OBS-URL: https://build.opensuse.org/package/show/Archiving/unzip?expand=0&rev=25
This commit is contained in:
committed by
Git OBS Bridge
parent
6f88b5eafa
commit
f9e15decd2
88
unzip.spec
88
unzip.spec
@@ -16,7 +16,13 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_with rcc
|
||||
|
||||
# NOTE: unzip.spec is the major file, if you want to update unzip-rcc.spec
|
||||
# call pre_checkin.sh after editing unzip.spec
|
||||
|
||||
Name: unzip
|
||||
%define _name unzip
|
||||
Version: 6.00
|
||||
Release: 0
|
||||
%define fileversion 60
|
||||
@@ -24,7 +30,8 @@ Summary: A program to unpack compressed files
|
||||
License: BSD-3-Clause
|
||||
Group: Productivity/Archiving/Compression
|
||||
Url: http://www.info-zip.org/
|
||||
Source: http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/%{name}%{fileversion}.tar.gz
|
||||
Source: http://sourceforge.net/projects/infozip/files/UnZip%206.x%20%28latest%29/UnZip%206.0/%{_name}%{fileversion}.tar.gz
|
||||
Source1: pre_checkin.sh
|
||||
Patch0: unzip.dif
|
||||
Patch1: unzip-iso8859_2.patch
|
||||
Patch3: unzip-optflags.patch
|
||||
@@ -34,9 +41,19 @@ Patch8: unzip-open_missing_mode.patch
|
||||
Patch10: unzip-5.52-use_librcc.patch
|
||||
Patch11: unzip-no-build-date.patch
|
||||
Patch12: unzip-dont_call_isprint.patch
|
||||
%if %{with rcc}
|
||||
BuildRequires: librcc-devel
|
||||
Suggests: librcc0
|
||||
%define update_weight 20
|
||||
%define _suffix rcc
|
||||
%else
|
||||
%define update_weight 10
|
||||
%define _suffix plain
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildRequires: update-alternatives
|
||||
Requires: update-alternatives
|
||||
Recommends: unzip-doc
|
||||
|
||||
%description
|
||||
UnZip is an extraction utility for archives compressed in .zip format
|
||||
@@ -45,15 +62,28 @@ PKZIP(tm) and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip
|
||||
program, our primary objectives have been portability and non-MS-DOS
|
||||
functionality. This version can also extract encrypted archives.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation files for unzip
|
||||
Group: Productivity/Archiving/Compression
|
||||
|
||||
%description doc
|
||||
UnZip is an extraction utility for archives compressed in .zip format
|
||||
(known as "zip files"). Although highly compatible both with PKWARE's
|
||||
PKZIP(tm) and PKUNZIP utilities for MS-DOS and with Info-ZIP's own Zip
|
||||
program, our primary objectives have been portability and non-MS-DOS
|
||||
functionality. This version can also extract encrypted archives.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}%{fileversion}
|
||||
%setup -q -n %{_name}%{fileversion}
|
||||
%patch0
|
||||
%patch1
|
||||
%patch3
|
||||
%patch4
|
||||
%patch5
|
||||
%patch8
|
||||
%if %{with rcc}
|
||||
%patch10
|
||||
%endif
|
||||
%patch11
|
||||
%patch12
|
||||
|
||||
@@ -70,25 +100,59 @@ make %{?_smp_mflags} -f unix/Makefile LF2="-ldl" linux_noasm
|
||||
make -f unix/Makefile check
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
|
||||
mkdir -p %{buildroot}{%{_bindir},%{_mandir}/man1}
|
||||
for i in unzip funzip unzipsfx; \
|
||||
do install $i %{buildroot}%{_bindir};done;
|
||||
ln -s unzip %{buildroot}%{_bindir}/zipinfo
|
||||
install unix/zipgrep %{buildroot}%{_bindir}
|
||||
for i in man/*.1; \
|
||||
do \
|
||||
install -m 644 $i %{buildroot}%{_mandir}/man1/
|
||||
for i in unzip funzip unzipsfx; do
|
||||
install $i "%{buildroot}%{_bindir}/$i-"%{_suffix}
|
||||
done
|
||||
ln -s unzip %{buildroot}%{_bindir}/zipinfo
|
||||
install unix/zipgrep "%{buildroot}%{_bindir}/zipgrep-"%{_suffix}
|
||||
for i in unzip funzip unzipsfx zipgrep; do
|
||||
touch %{buildroot}%{_sysconfdir}/alternatives/$i
|
||||
ln -s %{_sysconfdir}/alternatives/$i %{buildroot}%_bindir/$i
|
||||
done
|
||||
|
||||
# do not have the docu in both packages
|
||||
%if %{without rcc}
|
||||
for i in man/*.1; do
|
||||
install -m 644 $i %{buildroot}%{_mandir}/man1/
|
||||
done
|
||||
%endif
|
||||
|
||||
%post
|
||||
for bin in unzip funzip unzipsfx zipgrep; do
|
||||
/usr/sbin/update-alternatives --install %{_bindir}/$bin $bin "%{_bindir}/$bin-"%{_suffix} %{update_weight}
|
||||
done
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ] ; then
|
||||
for bin in unzip funzip unzipsfx zipgrep; do
|
||||
/usr/sbin/update-alternatives --remove $bin "%{_bindir}/$bin"-%{_suffix}
|
||||
done
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc BUGS COPYING.OLD Contents History.* INSTALL LICENSE README ToDo WHERE
|
||||
%doc *.txt proginfo
|
||||
%ghost %_sysconfdir/alternatives/unzip
|
||||
%{_bindir}/unzip
|
||||
%{_bindir}/unzip-%{_suffix}
|
||||
%ghost %_sysconfdir/alternatives/funzip
|
||||
%{_bindir}/funzip
|
||||
%{_bindir}/funzip-%{_suffix}
|
||||
%ghost %_sysconfdir/alternatives/unzipsfx
|
||||
%{_bindir}/unzipsfx
|
||||
%{_bindir}/unzipsfx-%{_suffix}
|
||||
%{_bindir}/zipinfo
|
||||
%ghost %_sysconfdir/alternatives/zipgrep
|
||||
%{_bindir}/zipgrep
|
||||
%{_bindir}/zipgrep-%{_suffix}
|
||||
|
||||
%if %{without rcc}
|
||||
%files doc
|
||||
%doc %{_mandir}/man1/*
|
||||
%doc BUGS Contents History.* LICENSE README ToDo WHERE
|
||||
%doc *.txt proginfo
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user