diff options
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.bb | 64 |
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 @@ | |||
1 | SUMMARY = "Music Player Daemon" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
4 | HOMEPAGE ="http://www.musicpd.org" | ||
5 | |||
6 | DEPENDS = "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 | |||
8 | SRC_URI = " \ | ||
9 | http://www.musicpd.org/download/${BPN}/0.19/${BP}.tar.xz \ | ||
10 | file://mpd.conf.in \ | ||
11 | " | ||
12 | SRC_URI[md5sum] = "fc19f76b512bd471b6af5214965ff7c5" | ||
13 | SRC_URI[sha256sum] = "8305b8bc026f4b6bde28b8dd09bfdddbe5590acf36358eed4d083a396e301730" | ||
14 | |||
15 | inherit autotools useradd systemd | ||
16 | |||
17 | EXTRA_OECONF = "enable_bzip2=yes" | ||
18 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
19 | |||
20 | PACKAGECONFIG[audiofile] = "--enable-audiofile,--disable-audiofile,audiofile" | ||
21 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" | ||
22 | PACKAGECONFIG[id3tag] = "--enable-id3,--disable-id3,libid3tag" | ||
23 | PACKAGECONFIG[lame] = "--enable-lame-encoder,--disable-lame-encoder,lame" | ||
24 | PACKAGECONFIG[smb] = "--enable-smbclient,--disable-smbclient,samba" | ||
25 | |||
26 | do_configure_prepend() { | ||
27 | sed -i -e 's|libsystemd-daemon|libsystemd|' ${S}/configure.ac | ||
28 | } | ||
29 | |||
30 | do_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 | |||
54 | RPROVIDES_${PN} += "${PN}-systemd" | ||
55 | RREPLACES_${PN} += "${PN}-systemd" | ||
56 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
57 | SYSTEMD_SERVICE_${PN} = "mpd.socket" | ||
58 | |||
59 | USERADD_PACKAGES = "${PN}" | ||
60 | USERADD_PARAM_${PN} = " \ | ||
61 | --system --no-create-home \ | ||
62 | --home ${localstatedir}/lib/mpd \ | ||
63 | --groups audio \ | ||
64 | --user-group mpd" | ||