git » mpg123.git » main » tree

[main] / PKGBUILD

# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Eric BĂ©langer <eric@archlinux.org>

pkgname=mpg123
pkgver=1.32.5
if [ -z "$MPG123_NO_PULSE" ]; then
 pkgrel=2
else
 pkgrel=1
fi

pkgdesc='Console based real time MPEG Audio Player for Layer 1, 2 and 3'
url='https://mpg123.de/'
arch=('armv7h' 'aarch64')
license=('LGPL2.1')
depends=('alsa-lib')
if [ -z "$MPG123_NO_PULSE" ]; then
 makedepends=('libpulse')
fi

optdepends=(
  'libpulse: for pulse audio support'
  'perl: for conplay'
)
provides=(lib{mpg,out,syn}123.so)
source=(https://downloads.sourceforge.net/sourceforge/mpg123/mpg123-${pkgver}.tar.bz2{,.sig})
sha512sums=('3fbc2fcf5e17bec75e98b34ea9c6135ee5895730f127a9cdeef88060f1d49ce8b89ff6c82bb6645f575914f59e27337d4e8774d4beee6fe7c89e587ddf969502'
            'SKIP')
validpgpkeys=('D021FF8ECF4BE09719D61A27231C4CBC60D5CAFE')

build() {

 if [ -z "$MPG123_NO_PULSE" ]; then
  AUDIO="alsa oss pulse"
 else
  AUDIO="alsa oss"
 fi

  cd mpg123-${pkgver}
  ./configure \
    --prefix=/usr \
    --enable-int-quality \
    --with-audio="$AUDIO"
  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd mpg123-${pkgver}
  make DESTDIR="${pkgdir}" install
  install -Dm 755 scripts/conplay -t "${pkgdir}/usr/bin"
}

# vim:set sw=2 sts=-1 et: