Skip to content

Instantly share code, notes, and snippets.

@harvimt
Created December 10, 2012 13:04
Show Gist options
  • Select an option

  • Save harvimt/4250459 to your computer and use it in GitHub Desktop.

Select an option

Save harvimt/4250459 to your computer and use it in GitHub Desktop.

Revisions

  1. Mark Harviston revised this gist Dec 10, 2012. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion PKGBUILD
    Original file line number Diff line number Diff line change
    @@ -6,7 +6,7 @@ pkgrel=2
    pkgdesc="A library using 7z.dll/7z.so(from 7-Zip) to handle different archive types."
    arch=(i686 x86_64)
    url="http://code.google.com/p/lib7zip/"
    license=('GPL')
    license=('MPL')
    source=("http://lib7zip.googlecode.com/files/$pkgname-$pkgver.tar.gz"
    "http://downloads.sourceforge.net/project/${_pkg}/${_pkg}/${_ver}/${_pkg}_${_ver}_src_all.tar.bz2")
    md5sums=('6413c398a8def15ac9dda392b41353b7'
  2. Mark Harviston created this gist Dec 10, 2012.
    41 changes: 41 additions & 0 deletions PKGBUILD
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,41 @@
    _pkg=p7zip
    _ver=9.20.1
    pkgname=lib7zip
    pkgver=1.6.3
    pkgrel=2
    pkgdesc="A library using 7z.dll/7z.so(from 7-Zip) to handle different archive types."
    arch=(i686 x86_64)
    url="http://code.google.com/p/lib7zip/"
    license=('GPL')
    source=("http://lib7zip.googlecode.com/files/$pkgname-$pkgver.tar.gz"
    "http://downloads.sourceforge.net/project/${_pkg}/${_pkg}/${_ver}/${_pkg}_${_ver}_src_all.tar.bz2")
    md5sums=('6413c398a8def15ac9dda392b41353b7'
    'bd6caaea567dc0d995c990c5cc883c89')

    build() {
    cd "$srcdir/$pkgname-$pkgver"

    # load 7z.so from /usr/lib/p7zip
    sed -i "s|\"7z\"|\"/usr/lib/p7zip/7z\"|" Lib7Zip/7zipLibrary.cpp

    export P7ZIP_SOURCE_DIR="$srcdir/${_pkg}_${_ver}"

    ./configure --prefix=/usr
    make
    }

    package() {
    cd "$srcdir/$pkgname-$pkgver"

    make DESTDIR="$pkgdir/" install

    # static lib
    install -Dm644 Lib7Zip/$pkgname.a \
    "$pkgdir/usr/lib/$pkgname.a"

    # header
    install -Dm644 Lib7Zip/$pkgname.h \
    "$pkgdir/usr/include/$pkgname.h"
    }

    # vim:set ts=2 sw=2 et: