mpd_0.23.14.bb 4.7 KB

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