# $Id: PKGBUILD 70615 2010-02-27 15:46:11Z thayer $ # Maintainer: Thayer Williams # Contributor: Douglas Soares de Andrade # Contributor: Robson Peixoto pkgname=unzip pkgver=6.0 pkgrel=8 pkgdesc="Unpacks .zip archives such as those made by PKZIP" arch=('x86_64') url="http://www.info-zip.org/" license=('custom') depends=('bzip2' 'bash') source=('http://downloads.sourceforge.net/infozip/unzip60.tar.gz' CVE-2014-8139-crc-overflow.patch CVE-2014-8140-test-compr-eb.patch CVE-2014-8141-getzip64data.patch CVE-2014-9636_pt1.patch CVE-2014-9636-overflow-fsize.patch CVE-2015-7696+CVE-2015-7697-csiz-underflow.patch CVE-2015-7696+CVE-2015-7697-heap-overflow.patch iconv-utf8+CVE-2015-1315.patch) md5sums=('62b490407489521db863b523a7f86375' '86fdb01be92ca170fca89ed9e914a560' '04ab8f66ee5d869fa59f0e4998893691' '48937fae1fe333db571cae9d570952dd' '3f234156053fd43589e6da1d0a348048' '0e9e554ff80396f391709cf98ff26b7c' '1935de2ff982992d8d7e8c5c360add03' 'cdc14eca25a4de37148822830046bca2' '1addc224d4168d76a69be84cb0a32d31') prepare(){ cd ${srcdir}/${pkgname}${pkgver/./} # https://www.debian.org/security/2014/dsa-3113 patch -Np1 -i "${srcdir}"/CVE-2014-8139-crc-overflow.patch patch -Np1 -i "${srcdir}"/CVE-2014-8140-test-compr-eb.patch patch -Np1 -i "${srcdir}"/CVE-2014-8141-getzip64data.patch patch -Np1 -i "${srcdir}"/CVE-2014-9636_pt1.patch patch -Np1 -i ${srcdir}/CVE-2014-9636-overflow-fsize.patch patch -Np1 -i "${srcdir}"/CVE-2015-7696+CVE-2015-7697-csiz-underflow.patch patch -Np1 -i "${srcdir}"/CVE-2015-7696+CVE-2015-7697-heap-overflow.patch patch -Np1 -i "${srcdir}"/iconv-utf8+CVE-2015-1315.patch } build() { cd ${srcdir}/${pkgname}${pkgver/./} # DEFINES, make, and install args from Debian DEFINES='-DACORN_FTYPE_NFS -DWILD_STOP_AT_DIR -DLARGE_FILE_SUPPORT \ -DUNICODE_SUPPORT -DUNICODE_WCHAR -DUTF8_MAYBE_NATIVE -DNO_LCHMOD \ -DDATE_FORMAT=DF_YMD -DUSE_BZIP2 -DNOMEMCPY -DNO_WORKING_ISPRINT' make -f unix/Makefile prefix=/usr \ D_USE_BZ2=-DUSE_BZIP2 L_BZ2=-lbz2 \ LF2="$LDFLAGS" CF="$CFLAGS $CPPFLAGS -I. $DEFINES" \ unzips } package() { cd ${srcdir}/${pkgname}${pkgver/./} # install -- from Debian make -f unix/Makefile prefix=${pkgdir}/usr INSTALL_PROGRAM="install" install # install the license file install -Dm644 LICENSE ${pkgdir}/usr/share/licenses/unzip/LICENSE # fix manpage location mkdir -p ${pkgdir}/usr/share mv ${pkgdir}/usr/man ${pkgdir}/usr/share/ }