summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorChristopher Arndt2015-10-12 00:47:04 +0200
committerChristopher Arndt2015-10-12 00:47:04 +0200
commit09cba3aa4d04d07908f67d0e9d782a50ca149605 (patch)
tree8aa9c03b764d01fb87f647f62c425038cff093c3 /PKGBUILD
downloadaur-09cba3aa4d04d07908f67d0e9d782a50ca149605.tar.gz
New package 'avbin'
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD43
1 files changed, 43 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..7fb3159469ca
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,43 @@
+# Maintainer: Christopher Arndt <aur -at- chrisarndt -dot- de>
+
+pkgname=avbin
+pkgver=10
+pkgrel=1
+_gittag="$pkgname-$pkgver"
+pkgdesc="Cross-platform media decoding library"
+arch=('i686' 'x86_64')
+url="http://avbin.github.com/"
+license=('LGPL')
+depends=('bzip2' 'zlib')
+conflicts=('avbin7')
+makedepends=('git' 'yasm')
+options=('!makeflags')
+# The build script relies on being run in a git checkout,
+# the downloadable release tarball doesn't work with it
+source=("${pkgname}::git+https://github.com/AVbin/AVbin.git")
+sha256sums=('SKIP')
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+
+ git checkout "${_gittag}"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}"
+
+ target="linux-$(echo $CARCH | sed -e 's/_/-/')"
+ msg "Building target ${target}..."
+ # Linux Makefile uses LDFLAGS directly for ld command line
+ export LDFLAGS="$(echo $LDFLAGS | sed -e 's/^-Wl//')"
+ ./build.sh --fast ${target}
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ target="linux-$(echo $CARCH | sed -e 's/_/-/')"
+ install -dm755 "$pkgdir/usr/lib"
+ install -m644 "dist/${target}/libavbin.so.${pkgver}" "$pkgdir/usr/lib"
+ ln -sf "libavbin.so.${pkgver}" "$pkgdir/usr/lib/libavbin.so"
+}