# Contributor: Sören Tempel # Contributor: Valery Kartel # Maintainer: Natanael Copa pkgname=p7zip pkgver=15.14.1 pkgrel=0 pkgdesc="A command-line port of the 7zip compression utility" url="http://p7zip.sourceforge.net" arch="all" license="LGPL2+" subpackages="$pkgname-doc" depends="" makedepends="bash yasm nasm" install="" source="http://downloads.sourceforge.net/sourceforge/$pkgname/${pkgname}_${pkgver}_src_all.tar.bz2" _builddir="$srcdir"/${pkgname}_${pkgver} prepare() { local makefile="makefile.linux_any_cpu_gcc_4.X" case "$CARCH" in x86) makefile="makefile.linux_x86_asm_gcc_4.X" ;; x86_64) makefile="makefile.linux_amd64_asm" ;; esac cd "$_builddir" ln -sf $makefile makefile.machine || return 1 sed -e "s,g++,${CXX:-g++}," -i makefile.machine sed -e "s,gcc,${CC:-gcc}," -i makefile.machine } build() { cd "$_builddir" make all3 OPTFLAGS="${CXXFLAGS}" || return 1 } package() { cd "$_builddir" make install DEST_DIR="$pkgdir" DEST_HOME="/usr" \ DEST_MAN="/usr/share/man" \ DEST_SHARE_DOC="/usr/share/doc/$pkgname" || return 1 install -Dm755 contrib/gzip-like_CLI_wrapper_for_7z/$pkgname \ "$pkgdir"/usr/bin/$pkgname || return 1 install -Dm644 contrib/gzip-like_CLI_wrapper_for_7z/man1/$pkgname.1 \ "$pkgdir"/usr/share/man/man1/$pkgname.1 || return 1 } md5sums="92cca093312b5a71a7be7dc7d1d32509 p7zip_15.14.1_src_all.tar.bz2" sha256sums="699db4da3621904113e040703220abb1148dfef477b55305e2f14a4f1f8f25d4 p7zip_15.14.1_src_all.tar.bz2" sha512sums="30d0ef47bd6938cdd5d9d80ec6e7aed972655686a43adb0ae34bb9856ec7cd5a68a05c580352021055cefd6eeceb134ff6402f93686ce46e57f9757798e76abd p7zip_15.14.1_src_all.tar.bz2"