1SUMMARY = "Music Player Daemon" 2LICENSE = "GPL-2.0-only" 3LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" 4 5HOMEPAGE ="http://www.musicpd.org" 6 7inherit meson useradd systemd pkgconfig 8 9DEPENDS += " \ 10 curl \ 11 sqlite3 \ 12 ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ 13 yajl \ 14 boost \ 15 icu \ 16 dbus \ 17 expat \ 18 fmt \ 19" 20 21SRC_URI = "git://github.com/MusicPlayerDaemon/MPD;branch=v0.23.x;protocol=https \ 22 file://mpd.conf.in \ 23 " 24SRCREV = "d91da9679801224847c30147f5914785b6f8f240" 25S = "${WORKDIR}/git" 26 27EXTRA_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)}" 28 29PACKAGECONFIG ??= "${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "aac", "", d)} \ 30 alsa ao bzip2 daemon \ 31 ${@bb.utils.contains("LICENSE_FLAGS_ACCEPTED", "commercial", "ffmpeg aac", "", d)} \ 32 fifo flac fluidsynth iso9660 \ 33 jack libsamplerate httpd \ 34 mms mpg123 modplug sndfile \ 35 upnp openal opus oss recorder \ 36 vorbis wavpack zlib" 37 38PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2" 39PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" 40PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao" 41PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile" 42PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" 43PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia" 44PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false" 45PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" 46PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false" 47PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" 48PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" 49PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false" 50PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag" 51PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio" 52PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" 53PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" 54PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0" 55PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad" 56PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms" 57PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" 58PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" 59PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" 60PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg" 61PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled," 62PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false" 63PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba" 64PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" 65PACKAGECONFIG[upnp] = "-Dupnp=pupnp,-Dupnp=disabled,libupnp" 66PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg" 67PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" 68PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" 69 70do_install:append() { 71 install -o mpd -d \ 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 76 77 install -d ${D}/${sysconfdir} 78 install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf 79 sed -i \ 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 86 87 # we don't need the icon 88 rm -rf ${D}${datadir}/icons 89} 90 91RPROVIDES:${PN} += "${PN}-systemd" 92RREPLACES:${PN} += "${PN}-systemd" 93RCONFLICTS:${PN} += "${PN}-systemd" 94SYSTEMD_SERVICE:${PN} = "mpd.socket" 95 96USERADD_PACKAGES = "${PN}" 97USERADD_PARAM:${PN} = " \ 98 --system --no-create-home \ 99 --home ${localstatedir}/lib/mpd \ 100 --groups audio \ 101 --user-group mpd" 102