aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcrees <crees@FreeBSD.org>2013-01-03 23:34:02 +0800
committercrees <crees@FreeBSD.org>2013-01-03 23:34:02 +0800
commit78acad076855e038380b181eeab6379422ff0743 (patch)
tree1d92eed9e07124c277559ecd76608346867f2ffe
parent45851346a5069a382dc8a6800c0461d8fe78bb12 (diff)
downloadfreebsd-ports-gnome-78acad076855e038380b181eeab6379422ff0743.tar.gz
freebsd-ports-gnome-78acad076855e038380b181eeab6379422ff0743.tar.zst
freebsd-ports-gnome-78acad076855e038380b181eeab6379422ff0743.zip
Add missing directories for musicpd to work out of the box
Noticed by: theraven Fix mpd user home directory
-rw-r--r--UIDs2
-rw-r--r--audio/musicpd/Makefile5
-rw-r--r--audio/musicpd/files/musicpd.in16
-rw-r--r--audio/musicpd/pkg-plist2
4 files changed, 12 insertions, 13 deletions
diff --git a/UIDs b/UIDs
index 4ce91f89cfe8..08ad042bfa88 100644
--- a/UIDs
+++ b/UIDs
@@ -77,7 +77,7 @@ freeradius:*:133:133::0:0:FreeRADIUS Daemon:/nonexistent:/usr/sbin/nologin
undernet:*:134:134::0:0:Undernet ircu Daemon:/nonexistent:/usr/sbin/nologin
rabbitmq:*:135:135::0:0:RabbitMQ:/var/db/rabbitmq:/usr/sbin/nologin
dhcpd:*:136:136::0:0:ISC DHCP daemon:/nonexistent:/usr/sbin/nologin
-mpd:*:137:137::0:0:MusicPD pseudo-user:/usr/local/var/mpd:/usr/sbin/nologin
+mpd:*:137:137::0:0:MusicPD pseudo-user:/var/mpd:/usr/sbin/nologin
wolfpack:*:138:138::0:0:Wolfpack Empire Server:/usr/local/share/wolfpack:/usr/sbin/nologin
shellinabox:*:139:139::0:0:Shell In A Box:/nonexistent:/usr/sbin/nologin
amanda:*:140:140::0:0:Amanda Daemon:/var/db/amanda:/usr/sbin/nologin
diff --git a/audio/musicpd/Makefile b/audio/musicpd/Makefile
index a1bac5eb55c1..8cbf8fc2500a 100644
--- a/audio/musicpd/Makefile
+++ b/audio/musicpd/Makefile
@@ -2,7 +2,7 @@
PORTNAME= musicpd
PORTVERSION= 0.17.2
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= audio ipv6
MASTER_SITES= SF/${PORTNAME}/mpd/${PORTVERSION}
DISTNAME= mpd-${PORTVERSION}
@@ -267,8 +267,7 @@ post-install:
${CP} -p ${PREFIX}/etc/${MPDCONF}.sample \
${PREFIX}/etc/${MPDCONF} ; \
fi
- @${MKDIR} ${MPDDIR}
- @${INSTALL} -d -o ${MPDUSER} -g ${MPDGROUP} ${MPDDIR}
+ @${INSTALL} -d -o ${MPDUSER} -g ${MPDGROUP} ${MPDDIR} ${MPDDIR}/.mpd
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
diff --git a/audio/musicpd/files/musicpd.in b/audio/musicpd/files/musicpd.in
index cf41cc5173b5..3ed5412b24e5 100644
--- a/audio/musicpd/files/musicpd.in
+++ b/audio/musicpd/files/musicpd.in
@@ -8,18 +8,22 @@
# Add the following line to /etc/rc.conf to enable mpd:
#
-# musicpd_enable="YES"
+# musicpd_enable=YES
. /etc/rc.subr
name=musicpd
rcvar=musicpd_enable
-start_precmd="${name}_getpidfile"
-stop_precmd="${name}_getpidfile"
+
+load_rc_config $name
+
+: ${musicpd_enable:=NO}
command=%%PREFIX%%/bin/musicpd
command_args=%%PREFIX%%/etc/%%MPDCONF%%
required_files=%%PREFIX%%/etc/%%MPDCONF%%
+start_precmd=${name}_getpidfile
+stop_precmd=${name}_getpidfile
musicpd_getpidfile()
{
@@ -31,8 +35,4 @@ musicpd_getpidfile()
fi
}
-load_rc_config $name
-
-: ${musicpd_enable="NO"}
-
-run_rc_command "$1"
+run_rc_command $1
diff --git a/audio/musicpd/pkg-plist b/audio/musicpd/pkg-plist
index f9f0794eafc4..ab28f37be532 100644
--- a/audio/musicpd/pkg-plist
+++ b/audio/musicpd/pkg-plist
@@ -2,4 +2,4 @@ bin/musicpd
@unexec if cmp -s %D/etc/%%MPDCONF%%.sample %D/etc/%%MPDCONF%%; then rm -f %D/etc/%%MPDCONF%%; fi
etc/%%MPDCONF%%.sample
@exec if [ ! -f %D/etc/%%MPDCONF%% ] ; then cp -p %D/%F %B/%%MPDCONF%%; fi
-@exec install -d -o %%MPDUSER%% -g %%MPDGROUP%% %%MPDDIR%%
+@exec install -d -o %%MPDUSER%% -g %%MPDGROUP%% %%MPDDIR%% %%MPDDIR%%/.mpd