summaryrefslogtreecommitdiffstats
path: root/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb')
-rw-r--r--meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb64
1 files changed, 64 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
new file mode 100644
index 000000000..0071b898d
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb
@@ -0,0 +1,64 @@
1SUMMARY = "Music Player Daemon"
2LICENSE = "GPLv2"
3LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
4HOMEPAGE ="http://www.musicpd.org"
5
6DEPENDS = "alsa-lib libsamplerate0 libsndfile1 libvorbis libogg faad2 ffmpeg curl sqlite bzip2 pulseaudio tcp-wrappers openal-soft yajl jack faad2 flac libao fluidsynth libcdio wavpack libopus mpg123 libmms libmodplug boost icu dbus expat zlib libupnp"
7
8SRC_URI = " \
9 http://www.musicpd.org/download/${BPN}/0.19/${BP}.tar.xz \
10 file://mpd.conf.in \
11"
12SRC_URI[md5sum] = "fc19f76b512bd471b6af5214965ff7c5"
13SRC_URI[sha256sum] = "8305b8bc026f4b6bde28b8dd09bfdddbe5590acf36358eed4d083a396e301730"
14
15inherit autotools useradd systemd
16
17EXTRA_OECONF = "enable_bzip2=yes"
18EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}"
19
20PACKAGECONFIG[audiofile] = "--enable-audiofile,--disable-audiofile,audiofile"
21PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad"
22PACKAGECONFIG[id3tag] = "--enable-id3,--disable-id3,libid3tag"
23PACKAGECONFIG[lame] = "--enable-lame-encoder,--disable-lame-encoder,lame"
24PACKAGECONFIG[smb] = "--enable-smbclient,--disable-smbclient,samba"
25
26do_configure_prepend() {
27 sed -i -e 's|libsystemd-daemon|libsystemd|' ${S}/configure.ac
28}
29
30do_install_append() {
31 install -d ${D}/${localstatedir}/lib/mpd/music
32 chmod 775 ${D}/${localstatedir}/lib/mpd/music
33 install -d ${D}/${localstatedir}/lib/mpd/playlists
34 chown -R mpd ${D}/${localstatedir}/lib/mpd
35 chown mpd:mpd ${D}/${localstatedir}/lib/mpd/music
36
37 install -d ${D}/${sysconfdir}
38 install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf
39 sed -i \
40 -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \
41 -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \
42 -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \
43 -e 's|%log_file%|${localstatedir}/log/mpd.log|' \
44 -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \
45 ${D}/${sysconfdir}/mpd.conf
46
47 if [ -e ${D}/${systemd_unitdir}/system/mpd.service ] ; then
48 sed -i \
49 's|^ExecStart=.*|ExecStart=${bindir}/mpd --no-daemon|' \
50 ${D}/${systemd_unitdir}/system/mpd.service
51 fi
52}
53
54RPROVIDES_${PN} += "${PN}-systemd"
55RREPLACES_${PN} += "${PN}-systemd"
56RCONFLICTS_${PN} += "${PN}-systemd"
57SYSTEMD_SERVICE_${PN} = "mpd.socket"
58
59USERADD_PACKAGES = "${PN}"
60USERADD_PARAM_${PN} = " \
61 --system --no-create-home \
62 --home ${localstatedir}/lib/mpd \
63 --groups audio \
64 --user-group mpd"