1 SUMMARY = "Music Player Daemon"
3 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
5 HOMEPAGE ="http://www.musicpd.org"
7 inherit meson useradd systemd pkgconfig
12 ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \
21 SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=v0.23.x;protocol=https \
24 SRCREV = "df4b6b92f2c4bba1b55fe0a5559b19808abb28ff"
27 EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}"
29 PACKAGECONFIG ??= "${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "aac", "", d)} \
30 alsa ao bzip2 daemon \
31 ${@bb.utils.contains("LICENSE_FLAGS_WHITELIST", "commercial", "ffmpeg aac", "", d)} \
32 fifo flac fluidsynth iso9660 \
33 jack libsamplerate httpd \
34 mms mpg123 modplug sndfile \
35 upnp openal opus oss recorder \
38 PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2"
39 PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib"
40 PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao"
41 PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile"
42 PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2"
43 PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia"
44 PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false"
45 PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg"
46 PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false"
47 PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac"
48 PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth"
49 PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false"
50 PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag"
51 PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio"
52 PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack"
53 PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame"
54 PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0"
55 PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad"
56 PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms"
57 PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug"
58 PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123"
59 PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft"
60 PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg"
61 PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled,"
62 PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false"
63 PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba"
64 PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1"
65 PACKAGECONFIG[upnp] = "-Dupnp=pupnp,-Dupnp=disabled,libupnp"
66 PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg"
67 PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack"
68 PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib"
72 ${D}/${localstatedir}/lib/mpd \
73 ${D}/${localstatedir}/lib/mpd/playlists
74 install -m775 -o mpd -g mpd -d \
75 ${D}/${localstatedir}/lib/mpd/music
77 install -d ${D}/${sysconfdir}
78 install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf
80 -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \
81 -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \
82 -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \
83 -e 's|%log_file%|${localstatedir}/log/mpd.log|' \
84 -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \
85 ${D}/${sysconfdir}/mpd.conf
87 # we don't need the icon
88 rm -rf ${D}${datadir}/icons
91 RPROVIDES:${PN} += "${PN}-systemd"
92 RREPLACES:${PN} += "${PN}-systemd"
93 RCONFLICTS:${PN} += "${PN}-systemd"
94 SYSTEMD_SERVICE:${PN} = "mpd.socket"
96 USERADD_PACKAGES = "${PN}"
97 USERADD_PARAM:${PN} = " \
98 --system --no-create-home \
99 --home ${localstatedir}/lib/mpd \