void-packages/srcpkgs/mpd/template

79 lines
3.4 KiB
Bash

# Template file for 'mpd'
pkgname=mpd
version=0.23.15
revision=1
build_style=meson
configure_args="-Dopus=enabled -Dmikmod=enabled -Dneighbor=true
-Dsoundcloud=enabled -Dpipe=true -Dtwolame=enabled -Dbzip2=enabled
-Dzzip=enabled -Dsmbclient=disabled -Dsystemd=disabled -Dqobuz=disabled
-Dchromaprint=disabled -Dsoxr=enabled -Dadplug=disabled
-Dfluidsynth=disabled -Dgme=disabled -Dwildmidi=disabled -Dsidplay=disabled
-Dshine=disabled -Ddocumentation=enabled -Daudiofile=enabled -Dtremor=disabled
-Dsolaris_output=disabled -Dhtml_manual=false -Dmanpages=true
$(vopt_feature jack jack) $(vopt_feature lame lame) $(vopt_feature libao ao)
$(vopt_feature mpcdec mpcdec) $(vopt_feature sndio sndio)
$(vopt_feature pulseaudio pulse) $(vopt_feature wavpack wavpack)
$(vopt_feature cdio cdio_paranoia) $(vopt_feature openal openal)
$(vopt_feature shoutcast shout) $(vopt_feature io_uring io_uring)
$(vopt_feature openmpt openmpt) $(vopt_feature pipewire pipewire)"
conf_files="/etc/mpd.conf"
hostmakedepends="pkg-config python3-Sphinx"
makedepends="avahi-glib-libs-devel boost-devel faad2-devel ffmpeg-devel
libcurl-devel libid3tag-devel libmad-devel libmikmod-devel libmms-devel
libmodplug-devel libmpdclient-devel libnfs-devel libsamplerate-devel
libnpupnp-devel mpg123-devel opus-devel yajl-devel pcre2-devel icu-devel
zziplib-devel libsoxr-devel audiofile-devel twolame-devel fmt-devel
$(vopt_if io_uring 'liburing-devel') $(vopt_if pipewire 'pipewire-devel')
$(vopt_if cdio 'libcdio-paranoia-devel') $(vopt_if shoutcast 'libshout-devel')
$(vopt_if jack 'jack-devel') $(vopt_if lame 'lame-devel')
$(vopt_if libao 'libao-devel') $(vopt_if mpcdec 'libmpcdec-devel')
$(vopt_if pulseaudio 'pulseaudio-devel') $(vopt_if sndio 'sndio-devel')
$(vopt_if wavpack 'wavpack-devel') $(vopt_if openal 'libopenal-devel')
$(vopt_if openmpt 'libopenmpt-devel')"
depends="libcap-progs"
checkdepends="gtest-devel"
short_desc="Flexible, powerful, server-side application for playing music"
maintainer="Daniel Eyßer <daniel.eysser@gmail.com>"
license="GPL-2.0-or-later"
homepage="https://www.musicpd.org/"
changelog="https://raw.githubusercontent.com/MusicPlayerDaemon/MPD/master/NEWS"
distfiles="https://www.musicpd.org/download/mpd/${version%.*}/mpd-${version}.tar.xz"
checksum=550132239ad1acf82ccf8905b56cc13dc2c81a4489b96fba7731b3049907661a
LDFLAGS="-Wl,-z,stack-size=1048576"
system_accounts="mpd"
mpd_homedir="/var/lib/mpd"
mpd_groups="audio"
make_dirs="
/var/lib/mpd 0755 mpd mpd
/var/lib/mpd/playlists 0755 mpd mpd"
# Package build options
build_options="jack lame mpcdec pulseaudio libao wavpack sndio cdio openal shoutcast io_uring
openmpt pipewire"
desc_option_cdio="Enable libcdio_paranoia input plugin"
desc_option_openal="Enable OpenAL output plugin"
desc_option_io_uring="Enable support for using liburing"
desc_option_pipewire="Enable Pipewire output plugin"
desc_option_openmpt="Enable OpenMPT decoder plugin"
build_options_default="jack pulseaudio libao sndio cdio shoutcast pipewire"
if [ "$XBPS_CHECK_PKGS" ]; then
configure_args+=" -Dtest=true"
fi
post_install() {
vconf doc/mpdconf.example mpd.conf
vsconf doc/mpdconf.example
sed \
-e '/^#playlist_directory/c playlist_directory "/var/lib/mpd/playlists"' \
-e '/^#db_file/c db_file "/var/lib/mpd/mpd.db"' \
-e '/^#pid_file/c pid_file "/run/mpd/mpd.pid"' \
-e '/^#state_file/c state_file "/var/lib/mpd/mpdstate"' \
-e '/^#user/c user "mpd"' \
-i ${DESTDIR}/etc/mpd.conf
vsv mpd
}