summaryrefslogtreecommitdiff
path: root/multimedia
diff options
context:
space:
mode:
authordrochner <drochner>2012-10-25 10:25:27 +0000
committerdrochner <drochner>2012-10-25 10:25:27 +0000
commitbc96e72b0cbfd2c71f207cffa795e281d9de6534 (patch)
treeb2701af05593f89107875bd73c701f5bedd18811 /multimedia
parent403d7452187a2a91340b1ee5bd70ec17cacafe97 (diff)
downloadpkgsrc-bc96e72b0cbfd2c71f207cffa795e281d9de6534.tar.gz
make it more pkgsrc compliant
Diffstat (limited to 'multimedia')
-rw-r--r--multimedia/minidlna/Makefile8
-rw-r--r--multimedia/minidlna/PLIST3
-rw-r--r--multimedia/minidlna/distinfo4
-rw-r--r--multimedia/minidlna/files/minidlna.in34
-rw-r--r--multimedia/minidlna/files/minidlna.sh20
-rw-r--r--multimedia/minidlna/patches/patch-minidlna.c4
6 files changed, 33 insertions, 40 deletions
diff --git a/multimedia/minidlna/Makefile b/multimedia/minidlna/Makefile
index 1b2bc4b720e..4eafd536763 100644
--- a/multimedia/minidlna/Makefile
+++ b/multimedia/minidlna/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2012/10/15 22:48:01 drochner Exp $
+# $NetBSD: Makefile,v 1.2 2012/10/25 10:25:27 drochner Exp $
#
DISTNAME= minidlna_1.0.25_src
@@ -15,8 +15,14 @@ WRKSRC= ${WRKDIR}/minidlna-1.0.25
MAKE_FILE= BSDmakefile
EGDIR= ${PREFIX}/share/examples/minidlna
+SUBST_CLASSES+= confdir
+SUBST_STAGE.confdir= pre-build
+SUBST_FILES.confdir= minidlna.c
+SUBST_VARS.confdir= PKG_SYSCONFDIR
+
CONF_FILES= ${EGDIR}/minidlna.conf \
${PKG_SYSCONFDIR}/minidlna.conf
+RCD_SCRIPTS= minidlna
INSTALLATION_DIRS= sbin share/examples/minidlna
diff --git a/multimedia/minidlna/PLIST b/multimedia/minidlna/PLIST
index 15ff65734f4..d38dd07c101 100644
--- a/multimedia/minidlna/PLIST
+++ b/multimedia/minidlna/PLIST
@@ -1,3 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1 2012/10/15 22:48:01 drochner Exp $
+@comment $NetBSD: PLIST,v 1.2 2012/10/25 10:25:27 drochner Exp $
sbin/minidlna
share/examples/minidlna/minidlna.conf
+share/examples/rc.d/minidlna
diff --git a/multimedia/minidlna/distinfo b/multimedia/minidlna/distinfo
index b3ce59a3c3a..cd899c7ec25 100644
--- a/multimedia/minidlna/distinfo
+++ b/multimedia/minidlna/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.1 2012/10/15 22:48:01 drochner Exp $
+$NetBSD: distinfo,v 1.2 2012/10/25 10:25:27 drochner Exp $
SHA1 (minidlna_1.0.25_src.tar.gz) = 33742f02367006c6e4af7128b91c830026e59b9f
RMD160 (minidlna_1.0.25_src.tar.gz) = 7008ef98c03f820d9200c1b1db2ec2f7995ece6d
@@ -10,7 +10,7 @@ SHA1 (patch-icons) = f9bdf47cd8cd6ee67a3e011655fd0ce7d8a1dcc2
SHA1 (patch-image_utils.c) = 1f8a5d31aef9fa7182ac5ee40f9b9ad374a2772c
SHA1 (patch-inline) = 3bab5f706124d96492f6fd017b671e34c3f2bd59
SHA1 (patch-lg) = 3889c03ca8118a7769266bb25687945701f3d29e
-SHA1 (patch-minidlna.c) = 056a60ed2a5973939bcaf7aca27ed9b0f56920db
+SHA1 (patch-minidlna.c) = 4c8de50a3de506cb6f34b43e60504a930f6f5282
SHA1 (patch-other-subnets) = 3739394543005a658c73a62bd150a161d43253e1
SHA1 (patch-replace-glob3) = 599bda0d6c2532956111b8d605b6227dd83040c5
SHA1 (patch-scanner.c) = d07998a31ec8b890baa7cccc58d211af69953625
diff --git a/multimedia/minidlna/files/minidlna.in b/multimedia/minidlna/files/minidlna.in
deleted file mode 100644
index 86f209d4e54..00000000000
--- a/multimedia/minidlna/files/minidlna.in
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-# $FreeBSD: ports/net/minidlna/files/minidlna.in,v 1.1 2012/08/05 23:19:36 dougb Exp $
-#
-# PROVIDE: minidlna
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-#
-# Add the following line to /etc/rc.conf[.local] to enable minidlna:
-#
-# minidlna_enable="YES"
-
-. /etc/rc.subr
-
-name=minidlna
-rcvar=minidlna_enable
-command=%%PREFIX%%/sbin/minidlna
-
-load_rc_config $name
-
-minidlna_enable=${minidlna_enable-"NO"}
-minidlna_uid=${minidlna_uid-"%%USER%%"}
-
-pidfile="/var/db/minidlna/minidlna.pid"
-
-start_precmd="rm -f $pidfile"
-stop_postcmd=$start_precmd
-
-command_args="-P $pidfile -u $minidlna_uid"
-extra_commands=rescan
-rescan_cmd="$command -R -u $minidlna_uid"
-required_dirs="/var/db/minidlna"
-
-run_rc_command $1
diff --git a/multimedia/minidlna/files/minidlna.sh b/multimedia/minidlna/files/minidlna.sh
new file mode 100644
index 00000000000..a7dd67017b9
--- /dev/null
+++ b/multimedia/minidlna/files/minidlna.sh
@@ -0,0 +1,20 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: minidlna.sh,v 1.1 2012/10/25 10:25:27 drochner Exp $
+#
+# PROVIDE: minidlna
+# REQUIRE: DAEMON
+#
+
+. /etc/rc.subr
+
+name="minidlna"
+rcvar=${name}
+command="@PREFIX@/sbin/${name}"
+requre_files="@PKG_SYSCONFDIR@/${name}.conf"
+
+load_rc_config ${name}
+
+pidfile="/var/run/minidlna.pid"
+
+run_rc_command $1
diff --git a/multimedia/minidlna/patches/patch-minidlna.c b/multimedia/minidlna/patches/patch-minidlna.c
index 72705a37bd7..fff7f8da25a 100644
--- a/multimedia/minidlna/patches/patch-minidlna.c
+++ b/multimedia/minidlna/patches/patch-minidlna.c
@@ -1,4 +1,4 @@
-$NetBSD: patch-minidlna.c,v 1.1 2012/10/15 22:48:02 drochner Exp $
+$NetBSD: patch-minidlna.c,v 1.2 2012/10/25 10:25:27 drochner Exp $
--- minidlna.c.orig 2012-05-08 00:10:42.000000000 +0000
+++ minidlna.c
@@ -45,7 +45,7 @@ $NetBSD: patch-minidlna.c,v 1.1 2012/10/15 22:48:02 drochner Exp $
struct sigaction sa;
const char * presurl = NULL;
- const char * optionsfile = "/etc/minidlna.conf";
-+ const char * optionsfile = PREFIX "/etc/minidlna.conf";
++ const char * optionsfile = "@PKG_SYSCONFDIR@/minidlna.conf";
char mac_str[13];
char * string, * word;
enum media_types type;