diff options
Diffstat (limited to 'meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb')
-rw-r--r-- | meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb new file mode 100644 index 000000000..3c92f8d03 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb | |||
@@ -0,0 +1,106 @@ | |||
1 | SUMMARY = "Music Player Daemon" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
4 | HOMEPAGE ="http://www.musicpd.org" | ||
5 | |||
6 | inherit autotools useradd systemd pkgconfig | ||
7 | |||
8 | DEPENDS += " \ | ||
9 | curl \ | ||
10 | sqlite3 \ | ||
11 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ | ||
12 | yajl \ | ||
13 | boost \ | ||
14 | icu \ | ||
15 | dbus \ | ||
16 | expat \ | ||
17 | " | ||
18 | |||
19 | SRC_URI = " \ | ||
20 | git://github.com/MusicPlayerDaemon/MPD;branch=v0.20.x \ | ||
21 | file://mpd.conf.in \ | ||
22 | " | ||
23 | SRCREV = "9274bc15bc41bbe490fde847f8422468cc20375d" | ||
24 | S = "${WORKDIR}/git" | ||
25 | |||
26 | EXTRA_OECONF = "enable_bzip2=yes" | ||
27 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
28 | |||
29 | PACKAGECONFIG ??= "alsa ao bzip2 daemon ffmpeg fifo flac fluidsynth iso9660 jack libsamplerate libwrap httpd mms mpg123 modplug sndfile upnp openal opus oss recorder vorbis wavpack zlib" | ||
30 | PACKAGECONFIG += "${@bb.utils.contains('LICENSE_FLAGS', 'commercial', 'aac', '', d)}" | ||
31 | |||
32 | PACKAGECONFIG[aac] = "--enable-aac,--disable-aac,faad2" | ||
33 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | ||
34 | PACKAGECONFIG[ao] = "--enable-ao,--disable-ao,libao" | ||
35 | PACKAGECONFIG[audiofile] = "--enable-audiofile,--disable-audiofile,audiofile" | ||
36 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | ||
37 | PACKAGECONFIG[cdioparanoia] = "--enable-cdio-paranoia,--disable-cdio-paranoia,libcdio-paranoia" | ||
38 | PACKAGECONFIG[daemon] = "--enable-daemon,--disable-daemon" | ||
39 | PACKAGECONFIG[ffmpeg] = "--enable-ffmpeg,--disable-ffmpeg,ffmpeg" | ||
40 | PACKAGECONFIG[fifo] = "--enable-fifo,--disable-fifo" | ||
41 | PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" | ||
42 | PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth" | ||
43 | PACKAGECONFIG[httpd] = "--enable-httpd-output,--disable-httpd-output" | ||
44 | PACKAGECONFIG[id3tag] = "--enable-id3,--disable-id3,libid3tag" | ||
45 | PACKAGECONFIG[iso9660] = "--enable-iso9660,--disable-iso9660,libcdio" | ||
46 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" | ||
47 | PACKAGECONFIG[lame] = "--enable-lame-encoder,--disable-lame-encoder,lame" | ||
48 | PACKAGECONFIG[libsamplerate] = "--enable-lsr,--disable-lsr,libsamplerate0" | ||
49 | PACKAGECONFIG[libwrap] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" | ||
50 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" | ||
51 | PACKAGECONFIG[mms] = "--enable-mms,--disable-mms,libmms" | ||
52 | PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" | ||
53 | PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123" | ||
54 | PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" | ||
55 | PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus libogg" | ||
56 | PACKAGECONFIG[oss] = "--enable-oss,--disable-oss," | ||
57 | PACKAGECONFIG[recorder] = "--enable-recorder-output,--disable-recorder-output" | ||
58 | PACKAGECONFIG[smb] = "--enable-smbclient,--disable-smbclient,samba" | ||
59 | PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" | ||
60 | PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp" | ||
61 | PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg" | ||
62 | PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack" | ||
63 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
64 | |||
65 | do_configure_prepend() { | ||
66 | sed -i -e 's|libsystemd-daemon|libsystemd|' ${S}/configure.ac | ||
67 | } | ||
68 | |||
69 | do_install_append() { | ||
70 | install -o mpd -d \ | ||
71 | ${D}/${localstatedir}/lib/mpd \ | ||
72 | ${D}/${localstatedir}/lib/mpd/playlists | ||
73 | install -m775 -o mpd -g mpd -d \ | ||
74 | ${D}/${localstatedir}/lib/mpd/music | ||
75 | |||
76 | install -d ${D}/${sysconfdir} | ||
77 | install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf | ||
78 | sed -i \ | ||
79 | -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ | ||
80 | -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ | ||
81 | -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ | ||
82 | -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ | ||
83 | -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ | ||
84 | ${D}/${sysconfdir}/mpd.conf | ||
85 | |||
86 | if [ -e ${D}/${systemd_unitdir}/system/mpd.service ] ; then | ||
87 | sed -i \ | ||
88 | 's|^ExecStart=.*|ExecStart=${bindir}/mpd --no-daemon|' \ | ||
89 | ${D}/${systemd_unitdir}/system/mpd.service | ||
90 | fi | ||
91 | |||
92 | # we don't need the icon | ||
93 | rm -rf ${D}${datadir}/icons | ||
94 | } | ||
95 | |||
96 | RPROVIDES_${PN} += "${PN}-systemd" | ||
97 | RREPLACES_${PN} += "${PN}-systemd" | ||
98 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
99 | SYSTEMD_SERVICE_${PN} = "mpd.socket" | ||
100 | |||
101 | USERADD_PACKAGES = "${PN}" | ||
102 | USERADD_PARAM_${PN} = " \ | ||
103 | --system --no-create-home \ | ||
104 | --home ${localstatedir}/lib/mpd \ | ||
105 | --groups audio \ | ||
106 | --user-group mpd" | ||