From c38fc20c0d1a6bd5a3c530ac3696f5500ccfa0cd Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 13 Oct 2014 17:32:36 +0200 Subject: [PATCH] mpd: added runit service. --- srcpkgs/mpd/files/mpd/run | 3 +++ srcpkgs/mpd/template | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100755 srcpkgs/mpd/files/mpd/run diff --git a/srcpkgs/mpd/files/mpd/run b/srcpkgs/mpd/files/mpd/run new file mode 100755 index 00000000000..bde3c869b60 --- /dev/null +++ b/srcpkgs/mpd/files/mpd/run @@ -0,0 +1,3 @@ +#!/bin/sh +install -d -m 0755 -o mpd -g mpd /run/mpd +exec mpd --no-daemon diff --git a/srcpkgs/mpd/template b/srcpkgs/mpd/template index 0431f97b0b8..21b2310f234 100644 --- a/srcpkgs/mpd/template +++ b/srcpkgs/mpd/template @@ -1,7 +1,7 @@ # Template file for 'mpd' pkgname=mpd version=0.19 -revision=3 +revision=4 build_style=gnu-configure configure_args="--enable-opus --enable-mikmod --enable-soundcloud --enable-pipe-output --disable-twolame-encoder @@ -21,6 +21,7 @@ conf_files="/etc/mpd.conf" system_accounts="mpd" mpd_homedir="/var/lib/mpd" make_dirs="/var/lib/mpd/playlists 0755 mpd mpd" +replaces="runit-void<20141013_2" short_desc="Flexible, powerful, server-side application for playing music" maintainer="Juan RP " license="GPL-2" @@ -43,7 +44,6 @@ fi pre_configure() { sed -i '/^doc_DATA =/s,doc/mpdconf.example,,' Makefile.in } - post_install() { vconf doc/mpdconf.example mpd.conf vsconf doc/mpdconf.example @@ -55,6 +55,8 @@ post_install() { -e '/^#user/c user "mpd"' \ -i ${DESTDIR}/etc/mpd.conf + vsv mpd + if [ "$build_option_systemd" ]; then vinstall ${FILESDIR}/tmpfiles.d 644 usr/lib/tmpfiles.d mpd.conf install -Dm644 ${DESTDIR}/usr/lib/systemd/{system,user}/mpd.service