diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2018-02-11 13:40:11 -0600 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-02-17 14:13:49 +0000 |
commit | 14a03caf7cf782e391b89d4b4f0a22296fbc7fc3 (patch) | |
tree | 0bade0a9f4ee30d2d58e2e788b6eb6391080948f /main/flac/APKBUILD | |
parent | 5b358af6c48c78a5b586248ffdeb66bd60b7ca97 (diff) | |
download | aports-14a03caf7cf782e391b89d4b4f0a22296fbc7fc3.tar.bz2 aports-14a03caf7cf782e391b89d4b4f0a22296fbc7fc3.tar.xz |
main/flac: add check, modernise, arch config
Diffstat (limited to 'main/flac/APKBUILD')
-rw-r--r-- | main/flac/APKBUILD | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/main/flac/APKBUILD b/main/flac/APKBUILD index d22667634f..7ee979314d 100644 --- a/main/flac/APKBUILD +++ b/main/flac/APKBUILD @@ -1,11 +1,12 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=flac pkgver=1.3.2 -pkgrel=0 +pkgrel=1 pkgdesc="Free Lossless Audio Codec" url="http://flac.sourceforge.net/" arch="all" license="custom:Xiph LGPL GPL FDL" +options="!checkroot" subpackages="$pkgname-dev $pkgname-doc" depends= makedepends="libogg-dev !libiconv" @@ -14,17 +15,15 @@ source="http://downloads.xiph.org/releases/flac/flac-${pkgver}.tar.xz builddir="$srcdir/$pkgname-$pkgver" -prepare() { +build() { cd "$builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} -build () { - cd "$builddir" + local _arch_conf + case "${CARCH}" in + ppc*) _arch_conf="--enable-altivec" ;; + x86_64) _arch_conf="--enable-sse" ;; + x86) _arch_conf="--disable-sse" ;; + esac ./configure \ --build=$CBUILD \ @@ -33,16 +32,20 @@ build () { --mandir=/usr/share/man \ --enable-shared \ --enable-ogg \ - --disable-sse \ --disable-rpath \ --with-pic \ - || return 1 - make || return 1 + $_arch_conf + make +} + +check() { + cd "$builddir" + make check } package() { cd "$builddir" - make DESTDIR="$pkgdir" install || return 1 + make DESTDIR="$pkgdir" install install -Dm0644 COPYING.Xiph \ "$pkgdir"/usr/share/licenses/$pkgname/COPYING.Xiph |