git » libopenmpt.git » main » tree

[main] / PKGBUILD

# Maintainer: David Runge <dvzrv@archlinux.org>

pkgname=libopenmpt
pkgver=0.7.7
pkgrel=1
pkgdesc="A library to render tracker music to a PCM audio stream"
arch=(x86_64 'armv7h')
url="https://lib.openmpt.org/libopenmpt/"
license=(BSD-3-Clause)
depends=(
  flac
  gcc-libs
  glibc
  libogg  # required by pkgconf
  libpulse
  libsndfile
  libvorbis
  mpg123
  portaudio
  zlib
)
makedepends=(
  autoconf-archive
  doxygen
  help2man
)
provides=(libopenmpt.so)
source=($pkgname-$pkgver.tar.gz::https://lib.openmpt.org/files/libopenmpt/src/$pkgname-$pkgver+release.autotools.tar.gz)
sha512sums=('88d68bd32e696c01c070abd7156645c2969d389d6fb660f4f45d9e5e16ff9c25c3084d30cef208578080ee8a2da5c6045e5b1d93db7e2c456d42b91daaa02199')
b2sums=('4b6ee75036c97ac2dce7e66776b36df09847db2c482cb22b052569385c06eb954d1cfae5cb00d415a6b18fd11663b2af43c94361dc9c0c84595c0d530e2bb355')

prepare() {
  cd $pkgname-$pkgver+release.autotools
  autoreconf -fiv
}

build() {
  cd $pkgname-$pkgver+release.autotools
  ./configure --prefix=/usr
  # prevent excessive overlinking due to libtool
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  make -k check -C $pkgname-$pkgver+release.autotools
}

package() {
  cd $pkgname-$pkgver+release.autotools
  make DESTDIR="$pkgdir" install
  install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
}