# $Id: PKGBUILD 195474 2013-09-30 18:46:35Z bisson $ # Contributor: Thayer Williams # Contributor: Hugo Doria # Contributor: TuxSpirit 2007/11/17 21:22:36 UTC # Contributor: Daniel J Griffiths # Maintainer: Gaetan Bisson pkgname=p7zip-libre _pkgname=${pkgname%-libre} pkgver=9.20.1 pkgrel=8 pkgdesc='Command-line version of the 7zip compressed file archiver without Rar' url='http://p7zip.sourceforge.net/' license=('GPL') arch=('i686' 'x86_64' 'mips64el') provides=("p7zip=$pkgver") conflicts=('p7zip') replaces=('p7zip') depends=('gcc-libs' 'bash') optdepends=('wxgtk: GUI' 'desktop-file-utils: desktop entries') makedepends=('yasm' 'nasm' 'wxgtk') source=("http://downloads.sourceforge.net/project/${_pkgname}/${_pkgname}/${pkgver}/${_pkgname}_${pkgver}_src_all.tar.bz2" 'p7zip-libre.patch' '7zFM.desktop') sha1sums=('1cd567e043ee054bf08244ce15f32cb3258306b7' '8fc0e6e80aeec371a8c80e7a6082594ac6d08aed' 'f2c370d6f1b286b7ce9a2804e22541b755616a40') options=('!makeflags') install=install prepare() { cd "${srcdir}/${_pkgname}_${pkgver}" rm GUI/kde4/p7zip_compress.desktop [[ $CARCH = x86_64 ]] \ && cp makefile.linux_amd64_asm makefile.machine \ || cp makefile.linux_x86_asm_gcc_4.X makefile.machine } build() { cd "${srcdir}/${_pkgname}_${pkgver}" msg "Removing unRar" # Generate patch # sed -e '/Rar/d' -i makefile* # find -name '*Rar*' -print0 | xargs -0 rm -rvf # Remove Rar mentions in CPP/7zip/Bundles/Format7zFree/makefile patch -Np1 -i ../p7zip-libre.patch make all4 OPTFLAGS="${CXXFLAGS}" } package() { cd "${srcdir}/${_pkgname}_${pkgver}" make install \ DEST_DIR="${pkgdir}" \ DEST_HOME="/usr" \ DEST_MAN="/usr/share/man" # Licenses install -d "${pkgdir}"/usr/share/licenses/p7zip ln -s -t "${pkgdir}"/usr/share/licenses/p7zip \ /usr/share/doc/p7zip/DOCS/License.txt # Integration with stuff... install -Dm644 GUI/p7zip_32.png "${pkgdir}"/usr/share/icons/hicolor/32x32/apps/p7zip.png install -d "${pkgdir}"/usr/share/{applications,kde4/services/ServiceMenus} cp GUI/kde4/* "${pkgdir}"/usr/share/kde4/services/ServiceMenus/ cp ../7zFM.desktop "${pkgdir}"/usr/share/applications/ ln -s 7zCon.sfx "${pkgdir}"/usr/lib/p7zip/7z.sfx find GUI/help -type d -exec chmod 755 {} \; cp -r GUI/help "${pkgdir}"/usr/lib/p7zip/ chmod -R u+w "${pkgdir}/usr" }