# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Jan de Groot <jgc@archlinux.org>
# Contributor: damir <damir@archlinux.org>

pkgname=libcdio-paranoia
pkgver=10.2+2.0.2
pkgrel=1
pkgdesc='Compact Disc Digital Audio (CDDA) extraction tool using libcdio for CDROM access'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url='https://www.gnu.org/software/libcdio/'
license=('GPL-3.0-or-later')
depends=('glibc' 'libcdio')
makedepends=('git')
source=("git+https://github.com/rocky/libcdio-paranoia.git#tag=release-$pkgver")
b2sums=('c7badd7b7fa2c65df0b328a9aacc001ff970ea9cc4212ea6b68ffc13f4e301bbed7239f50e52ff453dc78ce1bb0a69ecfd3efb0801c1af8556f926daf822562e')
validpgpkeys=('DAA63BC2582034A02B923D521A8DE5008275EC21') # R. Bernstein <rocky@panix.com>

prepare() {
  cd $pkgname
  autoreconf -fi
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

check() {
  cd $pkgname
  make check
}

package() {
  cd $pkgname
  make DESTDIR="$pkgdir" install
}
