# $Id: PKGBUILD 231299 2015-02-11 16:16:56Z 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 (Arch): Gaetan Bisson # Maintainer: André Silva _pkgname=p7zip-libre pkgname=p7zip pkgver=9.38 pkgrel=2.parabola1 pkgdesc='Command-line version of the 7zip compressed file archiver, without nonfree decompression engine for RAR archives' url='http://p7zip.sourceforge.net/' license=('GPL') arch=('i686' 'x86_64' 'mips64el') conflicts=('p7zip-libre') replaces=('p7zip-libre') depends=('gcc-libs' 'bash') optdepends=('wxgtk: GUI' 'desktop-file-utils: desktop entries') makedepends=('yasm' 'nasm' 'wxgtk') mksource=("http://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" '7zFM.desktop' 'osversion.patch' 'libre.patch') mksha1sums=('693bc2a1426df7a12762b4542a8327add23f0dc3') sha1sums=('b8e52e929577e603380a20371f359863d3e22466' 'f2c370d6f1b286b7ce9a2804e22541b755616a40' '8c086db1c7be0d52d2ac971f44adbdccf6dd82de' '33821327ea734f218ed284ff03e8a0d0ac945070') options=('!makeflags') install=install 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,RarAes}.{cpp,h} rm -v Utils/file_Codecs_Rar29_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}" [[ $CARCH = x86_64 ]] && cp makefile.linux_amd64_asm makefile.machine || cp makefile.linux_x86_asm_gcc_4.X makefile.machine patch -p1 -i ../osversion.patch sed -i 's/x86_64-linux-gnu//g' CPP/7zip/*/*/*.depend rm GUI/kde4/p7zip_compress.desktop # FS#43766 # remove rar and parent folder icon references patch -Np1 -i ../libre.patch } build() { cd "${srcdir}/${pkgname}_${pkgver}" make all4 OPTFLAGS="${CXXFLAGS}" } package() { cd "${srcdir}/${pkgname}_${pkgver}" make install \ DEST_DIR="${pkgdir}" \ DEST_HOME="/usr" \ DEST_MAN="/usr/share/man" # Doc and licenses cp -a DOC/* "${pkgdir}"/usr/share/doc/p7zip install -d "${pkgdir}"/usr/share/licenses/p7zip ln -s -t "${pkgdir}"/usr/share/licenses/p7zip \ /usr/share/doc/p7zip/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,o+r "${pkgdir}/usr" }