desktop/mpd/PKGBUILD

72 lines
2.7 KiB
Bash
Raw Normal View History

2018-11-01 10:49:45 +08:00
# Contributions from Arch:
# Maintainer: Gaetan Bisson <bisson@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
# Contributor: Ben <ben@benmazer.net>
2013-12-14 00:51:55 +08:00
pkgname=mpd
pkgver=0.21.1
_mainver=0.21
2018-10-31 07:08:58 +08:00
pkgrel=1
2013-12-14 00:51:55 +08:00
pkgdesc='Flexible, powerful, server-side application for playing music'
2017-01-05 07:01:35 +08:00
url='https://www.musicpd.org/'
2013-12-14 00:51:55 +08:00
license=('GPL')
arch=('x86_64')
2018-11-01 10:49:45 +08:00
depends=('audiofile' 'avahi' 'curl' 'faad2' 'ffmpeg' 'fluidsynth' 'icu' 'jack'
'libao' 'libcdio-paranoia' 'libgme' 'libid3tag' 'libmad' 'libmikmod'
'libmms' 'libmodplug' 'libmpcdec' 'libmpdclient' 'libnfs'
'libsamplerate' 'libshout' 'libsoxr' 'libsystemd' 'libupnp' 'mpg123'
'openal' 'smbclient' 'sqlite' 'twolame' 'wavpack' 'wildmidi' 'yajl'
'zziplib')
makedepends=('boost' 'meson' 'python3-sphinx')
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
source=("https://www.musicpd.org/download/${pkgname}/${_mainver}/${pkgname}-${pkgver}.tar.xz"{,.sig}
2015-05-19 06:55:04 +08:00
'tmpfiles.d'
2018-10-31 07:08:58 +08:00
'sysusers.d'
'conf')
sha256sums=('5674e791a6f3687a312431fd7e14d9d27fc62e21b869ff6b522bf6ba1bb5c069'
2018-11-01 10:49:45 +08:00
'SKIP'
2018-10-31 07:08:58 +08:00
'2faa85c12449a5b3ca422ff1c1fa06d057c7e262a74bfa6298c914a92d6f2e7a'
'0b74c6e5db08daab3091dc15a6b0c75210ba2f9e98fa074f6cfd605a461056b6'
2015-10-29 07:29:09 +08:00
'f40f68205834ca53cea3372e930bfe6c2f9ecc9df3b1605df2fec63a658b2e03')
2013-12-14 00:51:55 +08:00
2018-11-01 10:49:45 +08:00
backup=('etc/mpd.conf')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
rm -fr build
install -d build
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}/build"
_opts=('-Ddocumentation=true'
'-Dchromaprint=disabled' # appears not to be used for anything
'-Dsidplay=disabled' # unclear why but disabled in the past
'-Dlibwrap=disabled' # twentieth century's over
'-Dadplug=disabled' # not in an official repo
'-Dsndio=disabled' # interferes with detection of alsa devices
'-Dshine=disabled' # not in an official repo
)
chakra-meson .. ${_opts[@]}
ninja
2013-12-14 00:51:55 +08:00
}
package() {
2018-11-01 10:49:45 +08:00
cd "${srcdir}/${pkgname}-${pkgver}/build"
DESTDIR="${pkgdir}" ninja install
install -Dm644 ../doc/mpdconf.example "${pkgdir}"/usr/share/doc/mpd/mpdconf.example
install -Dm644 ../doc/mpd.conf.5 "${pkgdir}"/usr/share/man/man5/mpd.conf.5
install -Dm644 ../doc/mpd.1 "${pkgdir}"/usr/share/man/man1/mpd.1
install -Dm644 ../../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/mpd.conf
install -Dm644 ../../sysusers.d "${pkgdir}"/usr/lib/sysusers.d/mpd.conf
install -Dm644 ../../conf "${pkgdir}"/etc/mpd.conf
2018-11-01 10:49:45 +08:00
sed \
-e '/\[Service\]/a User=mpd' \
-e '/WantedBy=/c WantedBy=default.target' \
-i "${pkgdir}"/usr/lib/systemd/system/mpd.service
2013-12-14 00:51:55 +08:00
}