# Maintainer: Jesus E. pkgname=libmikmod pkgver=3.3.11.1 _debver=3.3.11.1 _debrel=6 pkgrel=1 pkgdesc="Module player library supporting many formats, including MOD, S3M, IT and XM" url=http://mikmod.sourceforge.net license=(LGPL-2) arch=(i686 x86_64) depends=(glibc libsndio sh) makedepends=(alsa-lib cmake quilt) source=(https://downloads.sourceforge.net/mikmod/$pkgname-$pkgver.tar.gz https://deb.debian.org/debian/pool/main/libm/libmikmod/libmikmod_$_debver-$_debrel.debian.tar.xz cmake-man.patch) sha512sums=('f2439e2b691613847cd0787dd4e050116683ce7b05c215b8afecde5c6add819ea6c18e678e258c0a80786bef463f406072de15127f64368f694287a5e8e1a9de' '553c0cae558e517b677cee985c03125454cc5a6a3affde8816f0cd18339639b7e6ae4c02fae01d23c094e4cb7bd9038d666642a0216ee57fc9ca198061f7964d' '9b8a87039b545855f3fdd16ee6f6a2e4f060460c5997a3a69eef027f69d1d5def2618843ee75f0c08eef0af284f2dc70dfe764fba71a5dffdfdb32942aebb9f2') prepare() { cd $pkgname-$pkgver if [[ ${pkgver%.*} = ${_debver%.*} ]]; then # Debian patches export QUILT_PATCHES=debian/patches export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index' export QUILT_DIFF_ARGS='--no-timestamps' mv "$srcdir"/debian . quilt push -av fi patch -Np1 -i ../cmake-man.patch } build() { # cmake ignores CPPFLAGS CFLAGS+=" $CPPFLAGS" cmake -H$pkgname-$pkgver -Bbuild \ -DCMAKE_INSTALL_PREFIX=/usr \ -DENABLE_DL=1 \ -DENABLE_SNDIO=1 cmake --build build } package() { DESTDIR="$pkgdir" cmake --build build --target install install -Dt "$pkgdir/usr/share/aclocal" -m644 $pkgname-$pkgver/libmikmod.m4 install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 \ $pkgname-$pkgver/{NEWS,README,TODO} build/docs/mikmod.html install -Dt "$pkgdir/usr/share/info" build/docs/mikmod.info install -Dt "$pkgdir/usr/share/man/man1" build/docs/libmikmod-config.1 install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 \ $pkgname-$pkgver/COPYING.LIB }