git » libmikmod.git » main » tree

[main] / PKGBUILD

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: David Runge <dvzrv@archlinux.org>
# Contributor: Allan McRae <allan@archlinux.org>
# Contributor: Tom Newsom <Jeepster@gmx.co.uk>

pkgname=libmikmod
pkgver=3.3.12
pkgrel=1
pkgdesc="Module player library supporting many formats, including MOD, S3M, IT and XM"
url="https://mikmod.sourceforge.net"
license=(LGPL-2.0-or-later)
arch=(x86_64 'armv7h')
depends=(
  glibc
  sh
)
makedepends=(
  alsa-lib
  cmake
  git
  libpulse
  ninja
)
provides=(libmikmod.so)
source=(
  "git+https://git.code.sf.net/p/mikmod/mikmod#tag=libmikmod-$pkgver"
  0001-libmikmod-cmake-Install-documentation-and-autoconf-m.patch
)
b2sums=('5bbade5a17ea7fdb79c27936575cc5ccc70a0581a1a3a88479cc60ca7640dfe6f83d84687024a60a1e79f20fd9d0acab9fef82ee6d9d089017f7dafab6ef27e0'
        '4c8ddd4bdf0d1a65a8d740ddcfbb227caa456825b9a55b592b8c777899fdd0f20a394c9724b2ea340a4bb2b6328c14926520f407b4e29d8cdc37901547f1d96e')

prepare() {
  cd mikmod
  git apply -3 ../0001-libmikmod-cmake-Install-documentation-and-autoconf-m.patch
}

build() {
  local cmake_options=(
    -D CMAKE_BUILD_TYPE=None
    -D CMAKE_INSTALL_PREFIX=/usr
    -D ENABLE_DL=1
  )

  cmake -S mikmod/libmikmod -B build -G Ninja "${cmake_options[@]}"
  cmake --build build
}

package() {
  DESTDIR="$pkgdir" cmake --install build
}

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