summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5d7ff7b408f6a9996dc7c1eaac8d94d4927bc56a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# Maintainer: Max Beck <rytonemail@gmail.com>
pkgname=mpd-sidplay
_pkgname=mpd
pkgver=0.21.23
pkgrel=1
pkgdesc="Flexible, powerful, server-side application for playing music - built with sidplay support"
url="https://www.musicpd.org/"
license=("GPL")
arch=("x86_64")
depends=(
    "audiofile"
    "avahi"
    "curl"
    "faad2"
    "ffmpeg"
    "fluidsynth"
    "icu"
    "jack"
    "libao"
    "libcdio-paranoia"
    "libgme"
    "libid3tag"
    "libmad"
    "libmikmod"
    "libmms"
    "libmodplug"
    "libmpcdec"
    "libmpdclient"
    "libnfs"
    "libsamplerate"
    "libshout"
    "libsidplayfp"
    "libsoxr"
    "libvorbis"
    "libupnp"
    "mpg123"
    "openal"
    "smbclient"
    "sqlite"
    "systemd-libs"
    "twolame"
    "wavpack"
    "wildmidi"
    "yajl"
    "zziplib"
)
makedepends=("boost" "meson" "python-sphinx")
validpgpkeys=('0392335A78083894A4301C43236E8A58C6DB4512')
provides=("mpd=$pkgver")
conflicts=("mpd")
replaces=("mpd")
source=(
    "https://www.musicpd.org/download/${_pkgname}/${pkgver%.*}/${_pkgname}-${pkgver}.tar.xz"{,.sig}
    "tmpfiles.d"
    "sysusers.d"
    "mpd.conf"
)
sha256sums=('439f522ca9800f375e4fb459ec31e61b3d824fc5c0580ff06dac48b5d21207a3'
            'SKIP'
            'e09e38ab5fd6e8b3b3e6e5a48d837c164ad37aec7e6762a78810c34fe9abf3a1'
            '2679014448e9352e20e85d8d76b021aeebe27bdf6100b24577afee2f37522a95'
            'a30c2c43824b540300cc83505c146989b415189bd90f191aebaed6f13556e6d2')
backup=("etc/mpd.conf")

build() {
    cd "${srcdir}/${_pkgname}-${pkgver}/build"

    _opts=(
        "-Ddocumentation=true"
        "-Dchromaprint=disabled"
        "-Dsidplay=enabled"
        "-Dadplug=disabled"
        "-Dsndio=disabled"
        "-Dshine=disabled"
        "-Dtremor=disabled"
    )
    arch-meson .. ${_opts[@]}
    ninja

}

package() {
    cd "${srcdir}/${_pkgname}-${pkgver}/build"

    DESTDIR="${pkgdir}" ninja install

    install -Dm644 ../doc/mpdconf.example "${pkgdir}"/usr/shade/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/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 ../../mpd.conf "${pkgdir}"/etc/mpd.conf

    sed \
        -e "/\[Service\]/a User=mpd" \
        -e "/WantedBy=/c WantedBy=default.target" \
        -i "${pkgdir}"/usr/lib/systemd/system/mpd.service
}