# $Id: PKGBUILD 268263 2016-05-17 21:43:53Z foutrelis $ # Maintainer (Arch): Evangelos Foutras # Contributor (Arch): Gaetan Bisson # Contributor (Arch): Thayer Williams # Contributor (Arch): Hugo Doria # Contributor (Arch): TuxSpirit 2007/11/17 21:22:36 UTC # Contributor (Arch): Daniel J Griffiths # Maintainer: André Silva _pkgname=p7zip-libre pkgname=p7zip pkgver=15.14.1 pkgrel=2.parabola1 pkgdesc="Command-line file archiver with high compression ratio" arch=('i686' 'x86_64' 'armv7h') url="http://p7zip.sourceforge.net/" license=('LGPL') conflicts=('p7zip-libre') replaces=('p7zip-libre') depends=('gcc-libs' 'sh') makedepends_i686=('nasm') makedepends_x86_64=('yasm') install=$pkgname.install mksource=(https://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/${pkgname}_${pkgver}_src_all.tar.bz2) source=(https://repo.parabola.nu/other/${_pkgname}/${_pkgname}_${pkgver}_src_all.tar.bz2 libre.patch CVE-2016-2334.patch CVE-2016-2335.patch) mksha256sums=('699db4da3621904113e040703220abb1148dfef477b55305e2f14a4f1f8f25d4') sha256sums=('2b43c19d4367356d38f78b020f58f874a5222022c7bc8e3f9620ab3c1899f61b' 'dd64ba789b8c23ecd3fbcccbcd62a217035de3a8c98517e7ba140a1a546ae77a' '632cae14095e065cb550b0f16faf39d8f822d0a8bb5b605e903f3bc7657a4ee5' '368870f92c658e8add261695923470855a969c0d7ecafd880ec7144ac245adbf') mksource() { cd "${srcdir}/${pkgname}_${pkgver}" # Remove nonfree unRAR utility files from the source rm -rv CPP/7zip/{Archive,Compress}/Rar rm -v CPP/7zip/Compress/{Rar{1,2,3}Decoder.{cpp,h},Rar3Vm.{cpp,h},RarCodecsRegister.cpp} rm -v CPP/7zip/Crypto/{Rar20Crypto,Rar{,5}Aes}.{cpp,h} rm -v Utils/file_Codecs_Rar_so.py rm -v DOC/unRarLicense.txt # Remove nonfree parent folder icon rm CPP/7zip/UI/FileManager/res/ParentFolder.h } prepare() { cd "$srcdir/${pkgname}_$pkgver" if [[ $CARCH = x86_64 ]]; then cp makefile.linux_amd64_asm makefile.machine elif [[ $CARCH = i686 ]]; then cp makefile.linux_x86_asm_gcc_4.X makefile.machine else cp makefile.linux_any_cpu_gcc_4.X makefile.machine fi # remove rar and parent folder icon references patch -Np1 -i ../libre.patch # https://sourceforge.net/p/p7zip/discussion/383043/thread/9d0fb86b/ patch -Np1 -i ../CVE-2016-2334.patch patch -Np1 -i ../CVE-2016-2335.patch } build() { cd "$srcdir/${pkgname}_$pkgver" make all3 OPTFLAGS="$CFLAGS" } package() { cd "$srcdir/${pkgname}_$pkgver" make install \ DEST_DIR="$pkgdir" \ DEST_HOME=/usr \ DEST_MAN=/usr/share/man install -d "${pkgdir}"/usr/share/licenses/p7zip ln -s -t "$pkgdir/usr/share/licenses/p7zip/" \ /usr/share/doc/p7zip/DOC/License.txt chmod -R a+r,u+w,a+X "$pkgdir/usr" } # vim:set ts=2 sw=2 et: