Commit 242c9725 authored by Andreas Müller's avatar Andreas Müller

mpd: Initial add 0.17.1

Signed-off-by: default avatarAndreas Müller <schnitzeltony@googlemail.com>
parent 1eed7a33
This diff is collapsed.
DESCRIPTION = "Music Player Daemon"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
HOMEPAGE ="http://sourceforge.net/projects/musicpd"
DEPENDS = "alsa-lib libsamplerate0 libsndfile1 libvorbis libogg faad2 ffmpeg curl sqlite bzip2 pulseaudio \
${@base_conditional('ENTERPRISE_DISTRO', '1', '', 'libmad lame libid3tag', d)}"
SRC_URI = " \
${SOURCEFORGE_MIRROR}/musicpd/${PN}/${PV}/${PN}-${PV}.tar.bz2 \
file://mpd.conf.in \
"
SRC_URI[md5sum] = "da3f3d6617a877192db4c6f53504cd38"
SRC_URI[sha256sum] = "b18cdb1b779ca2ab323e212a0af4a567b7da4881a4e96868a8979bdfdbe7c2e8"
inherit autotools useradd
EXTRA_OECONF = "enable_bzip2=yes"
do_install_append() {
install -d ${D}/${localstatedir}/lib/mpd/music
chmod 775 ${D}/${localstatedir}/lib/mpd/music
install -d ${D}/${localstatedir}/lib/mpd/playlists
chown -R mpd ${D}/${localstatedir}/lib/mpd
chown mpd:mpd ${D}/${localstatedir}/lib/mpd/music
install -d ${D}/${sysconfdir}
install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf
sed -i \
-e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \
-e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \
-e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \
-e 's|%log_file%|${localstatedir}/log/mpd.log|' \
-e 's|%state_file%|${localstatedir}/lib/mpd/state|' \
${D}/${sysconfdir}/mpd.conf
}
USERADD_PACKAGES = "${PN}"
USERADD_PARAM_${PN} = " \
--system --no-create-home \
--home ${localstatedir}/lib/mpd \
--groups audio \
--user-group mpd"
PRINC := "${@int(PRINC) + 1}"
inherit systemd
EXTRA_OECONF += "--with-systemdsystemunitdir=${systemd_unitdir}/system"
do_install_append() {
sed -i \
's|^ExecStart=.*|ExecStart=${bindir}/mpd --no-daemon|' \
${D}/${systemd_unitdir}/system/mpd.service
}
SYSTEMD_PACKAGES = "${PN}-systemd"
SYSTEMD_SERVICE = "mpd.service"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment