サイトトップMandriva Linux向けパッケージ ≫ unzip-5.52-9(独自修正)

unzip-6.1-0.5.52.9.1kkr2010.0.spec

%define name     unzip
%define _version 5.52
%define version  6.1
%define release  %mkrel 0
%define subrel   %{_version}.9.1
%define src_ver  %(echo %{_version}|sed "s/\\.//"g)

%define build_jp	0
%{?_with_jp: %global build_jp 1}

Summary:	Unpacks ZIP files such as those made by pkzip under DOS
Name:		%{name}
Version:	%{version}
Release:	%{release}
Source0:	http://ftp.info-zip.org/pub/infozip/src/%{name}%{src_ver}.tar.bz2
%if %{build_jp}
Patch0:		01_japanese_charset.dpatch
%endif
Patch1:		unzip552-size-64bit.patch
Patch2:		unzip-5.52-CAN-2005-2475.patch
Patch3:		unzip-5.52-CVE-2005-4667.patch
Patch4:		unzip-5.52-CVE-2008-0888.diff
URL:		http://www.info-zip.org/pub/infozip/UnZip.html
License:	BSD-like
Group:		Archiving/Compression
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-buildroot

%description
unzip will list, test, or extract files from a ZIP archive, commonly found
on MS-DOS systems. A companion program, zip, creates ZIP archives; both
programs are compatible with archives created by PKWARE's PKZIP and
PKUNZIP for MS-DOS, but in many cases the program options or default
behaviors differ.

This version also has encryption support.

%prep

%setup -q -n %{name}-%{_version}
%if %{build_jp}
%patch0 -p1 -b .japanese
%endif
%patch1 -p0 -b .64bit
%patch2 -p1 -b .can-2005-2475
%patch3 -p1 -b .cve-2005-4667
%patch4 -p0 -b .CVE-2008-0888

%build
%define Werror_cflags %nil
%ifarch %{ix86}
#gw FIXME: do we still need to disable LZW?
%if %{build_jp}
%make -ef unix/Makefile linux CF="-DLZW_CLEAN -D_MBCS %{optflags} -D_FILE_OFFSET_BITS=64 -Wall -I. -DASM_CRC" CC=gcc LD=gcc AS=gcc AF="-Di386" CRC32=crc_gcc
%else
%make -ef unix/Makefile linux CF="-DLZW_CLEAN %{optflags} -D_FILE_OFFSET_BITS=64 -Wall -I. -DASM_CRC" CC=gcc LD=gcc AS=gcc AF="-Di386" CRC32=crc_gcc
%endif
%else
%if %{build_jp}
%make -ef unix/Makefile linux_noasm CF="-DLZW_CLEAN -D_MBCS %{optflags} -D_FILE_OFFSET_BITS=64 -Wall -I."
%else
%make -ef unix/Makefile linux_noasm CF="-DLZW_CLEAN %{optflags} -D_FILE_OFFSET_BITS=64 -Wall -I."
%endif
%endif

%install
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

mkdir -p %{buildroot}{%{_bindir},%{_mandir}/man1}

ln -sf unzip zipinfo
for i in unzip funzip unzipsfx zipinfo;	do install $i %{buildroot}%{_bindir}; done
install unix/zipgrep %{buildroot}%{_bindir}

for i in man/*.1; do install -m 644 $i %{buildroot}%{_mandir}/man1/; done

cat > README.IMPORTANT.Mandriva << EOF
This version of unzip is a stripped-down version which doesn't include
the "unreduce" and "unshrink" algorithms. The first one is subject to
a restrictive copyright by Samuel H. Smith which forbids its use in
commercial products; and Unisys claimed a patent ("Welsh patent") on the 
second one (while their licensing would seem to mean that an
extractor-only program would not be covered).

Since the rest of the code is copyrighted by Info-Zip under a BSD-like
license, this Mandriva package is covered by this license.

Please note that currently, default compilation of the Info-Zip
distribution also excludes the unreduce and unshrink code.

Please contact Mandriva at <bugs AT mandriva DOT com> if you have
any problems regarding this issue.
EOF

%clean
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc BUGS COPYING.OLD Contents History.* INSTALL README ToDo WHERE README.IMPORTANT.Mandriva
%doc proginfo/
%{_bindir}/*
%{_mandir}/man1/*




%changelog
* Mon Nov 16 2009 kakurasan <kakurasan AT gmail DOT com> 6.1-0.5.52.9.1kkr2010.0
- 6.1 fake, only for Japanese(CP932 patch)

* Thu May 07 2009 kakurasan <kakurasan AT gmail DOT com> 5.52-9kkr2009.1
- Japanese(Shift_JIS) filename patch from Ubuntu-ja

* Sat Apr 11 2009 Funda Wang <fundawang AT mandriva DOT org> 5.52-8mdv2009.1
+ Revision: 366432
- disable formatchecking under all archs
- disable format checking
- reidff 64 bit patch

  + Antoine Ginies <aginies AT mandriva DOT com>
    - rebuild

* Wed Jun 18 2008 Thierry Vignaud <tvignaud AT mandriva DOT com> 5.52-6mdv2009.0
+ Revision: 225903
- rebuild

* Tue Mar 18 2008 Oden Eriksson <oeriksson AT mandriva DOT com> 5.52-5mdv2008.1
+ Revision: 188613
- fix #39030 (CVE-2008-0888: unzip - DoS and/or arbitrary code execution due to NEEDBITS macro)

* Mon Feb 25 2008 Olivier Blin <oblin AT mandriva DOT com> 5.52-4mdv2008.1
+ Revision: 174813
- build with _FILE_OFFSET_BITS=64 (#37178)
- restore BuildRoot

  + Thierry Vignaud <tvignaud AT mandriva DOT com>
    - kill re-definition of %%buildroot on Pixel's request

* Sun Sep 16 2007 Thierry Vignaud <tvignaud AT mandriva DOT com> 5.52-3mdv2008.0
+ Revision: 87711
- kill changelog left by repsys


* Tue Jan 30 2007 Götz Waschk <waschk AT mandriva DOT org> 5.52-2mdv2007.0
+ Revision: 115447
- Import unzip

* Tue Jan 30 2007 Götz Waschk <waschk AT mandriva DOT org> 5.52-2mdv2007.1
- unpack patches

* Thu Mar 16 2006 Olivier Blin <oblin AT mandriva DOT com> 5.52-2mdk
- from Stew Benedict: security update for CAN-2005-2475 (P2)
- from Vincent Danen: security fix for CVE-2005-4667 (P3)

* Thu May 05 2005 Götz Waschk <waschk AT mandriva DOT org> 5.52-1mdk
- drop patch 0 and define LZW_CLEAN instead
- better source URL
- New release 5.52

* Mon May 31 2004 Oden Eriksson <oeriksson AT mandrakesoft DOT com> 5.51-1mdk
- fixes multiple vulnerabilities