git » fluidsynth.git » main » tree

[main] / PKGBUILD

# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: damir <damir@archlinux.org>

pkgname=fluidsynth
pkgver=2.3.5
pkgrel=2
pkgdesc="A real-time software synthesizer based on the SoundFont 2 specifications"
arch=(x86_64 armv7h)
url="https://www.fluidsynth.org/"
license=(LGPL-2.1-or-later)
groups=(pro-audio)
depends=(
  gcc-libs
  glibc
  sdl2
)
makedepends=(
  alsa-lib
  cmake
  dbus
  doxygen
  glib2
#  jack
  ladspa
  libinstpatch
#  libpipewire
  libpulse
  libsndfile
  portaudio
  readline
  systemd-libs
)
provides=(
  libfluidsynth.so
  soundfont-synthesizer
)
backup=(etc/conf.d/$pkgname)
source=($pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz)
sha512sums=('35eaea8c1709ebbd5dee8f3946ab59c39afe31d92b972a44013fa23987aa48936f7d1326d5bda81c6e66f02bf988e48601367d49276a4dd78dbca7a2571f5e57')
b2sums=('11f04d2a508f54c4bd03c867e81528f36eeb5698ad017d7fe778349b5ab91dc9e518d426d2394e748344795b8c1bf86eeaee97294ad66974db07587d0a80797a')

build() {
  local cmake_options=(
    -B build
    -D CMAKE_BUILD_TYPE=None
    -D CMAKE_INSTALL_PREFIX=/usr
    -D FLUID_DAEMON_ENV_FILE=/etc/conf.d/fluidsynth
    -D LIB_SUFFIX=""
    -D enable-ladspa=ON
    -D enable-portaudio=ON
    -S $pkgname-$pkgver
    -W no-dev
  )

  cmake "${cmake_options[@]}"
  cmake --build build --verbose
}

check() {
  make check -k -C build
}

package() {
  depends+=(
    alsa-lib libasound.so
    dbus # libdbus-1.so
    glib2 libglib-2.0.so libgmodule-2.0.so libgobject-2.0.so
 #   jack libjack.so
    libinstpatch libinstpatch-1.0.so
  #  libpipewire libpipewire-0.3.so
    libpulse libpulse-simple.so
    libsndfile libsndfile.so
    portaudio libportaudio.so
    readline # libreadline.so
    systemd-libs # libsystemd.so
  )

  DESTDIR="$pkgdir" cmake --install build
  install -vDm 644 build/$pkgname.service -t "$pkgdir/usr/lib/systemd/user/"
  install -vDm 644 build/$pkgname.conf "$pkgdir/etc/conf.d/$pkgname"
  install -vDm 644 $pkgname-$pkgver/{AUTHORS,ChangeLog,{CONTRIBUTING,README}.md,THANKS,TODO} -t "$pkgdir/usr/share/doc/$pkgname/"
}