summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: bc118d53625626b90ae4bc17e82d706d1672c952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Contributor: naelstrof <naelstrof@gmail.com>
pkgname=mingw-w64-libvorbis
pkgver=1.3.7
pkgrel=2
pkgdesc="Vorbis codec library (mingw-w64)"
arch=(any)
url="http://xiph.org"
license=('custom')
depends=('mingw-w64-libogg' 'mingw-w64-crt')
makedepends=('mingw-w64-configure')
options=(!strip !buildflags staticlibs)
source=(http://downloads.xiph.org/releases/vorbis/libvorbis-${pkgver}.tar.gz)
sha256sums=('0e982409a9c3fc82ee06e08205b1355e5c6aa4c36bca58146ef399621b0ce5ab')

_architectures="i686-w64-mingw32 x86_64-w64-mingw32"

build() {
  cd "${srcdir}/libvorbis-${pkgver}"
  for _arch in ${_architectures}; do
    mkdir -p build-${_arch} && pushd build-${_arch}
    ${_arch}-configure .. 
    make
    popd
  done
}

package() {
  for _arch in ${_architectures}; do
    cd "${srcdir}"/libvorbis-${pkgver}/build-${_arch}
    make DESTDIR="$pkgdir" install
    rm -r "$pkgdir"/usr/${_arch}/share/doc
    ${_arch}-strip --strip-unneeded "$pkgdir"/usr/${_arch}/bin/*.dll
    ${_arch}-strip -g "$pkgdir"/usr/${_arch}/lib/*.a
  done
}