summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Weber <xmw@gentoo.org>2012-07-20 08:08:33 +0000
committerMichael Weber <xmw@gentoo.org>2012-07-20 08:08:33 +0000
commitcc1952ba9e78c822f60e12e12d33d76bacfebb1d (patch)
treeb06d196ca218729f463b744bc022afd84af49347 /net-misc
parentPHP 5.3 version bump (diff)
downloadgentoo-2-cc1952ba9e78c822f60e12e12d33d76bacfebb1d.tar.gz
gentoo-2-cc1952ba9e78c822f60e12e12d33d76bacfebb1d.tar.bz2
gentoo-2-cc1952ba9e78c822f60e12e12d33d76bacfebb1d.zip
Revbump adding minidlna user/group, adding /var/lib/minidlna and /var/log/minidlna.log (bug 426726, thanks snowy.mail@gmx.net and BT), adding NEWS (bug 427014, thanks Tanktalus@gmail.com)
(Portage version: 2.1.11.9/cvs/Linux x86_64)
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/minidlna/ChangeLog10
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.25.confd14
-rw-r--r--net-misc/minidlna/files/minidlna-1.0.25.initd53
-rw-r--r--net-misc/minidlna/minidlna-1.0.25-r1.ebuild76
4 files changed, 152 insertions, 1 deletions
diff --git a/net-misc/minidlna/ChangeLog b/net-misc/minidlna/ChangeLog
index 1638ade7ab0f..cc424c931c7a 100644
--- a/net-misc/minidlna/ChangeLog
+++ b/net-misc/minidlna/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for net-misc/minidlna
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/ChangeLog,v 1.19 2012/07/16 16:34:03 xmw Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/ChangeLog,v 1.20 2012/07/20 08:08:33 xmw Exp $
+
+*minidlna-1.0.25-r1 (20 Jul 2012)
+
+ 20 Jul 2012; Michael Weber <xmw@gentoo.org> +minidlna-1.0.25-r1.ebuild,
+ +files/minidlna-1.0.25.confd, +files/minidlna-1.0.25.initd:
+ Revbump adding minidlna user/group, adding /var/lib/minidlna and
+ /var/log/minidlna.log (bug 426726, thanks snowy.mail@gmx.net and BT), adding
+ NEWS (bug 427014, thanks Tanktalus@gmail.com)
*minidlna-1.0.25 (16 Jul 2012)
diff --git a/net-misc/minidlna/files/minidlna-1.0.25.confd b/net-misc/minidlna/files/minidlna-1.0.25.confd
new file mode 100644
index 000000000000..97d15b00c391
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.25.confd
@@ -0,0 +1,14 @@
+# /etc/conf.d/minidlna
+
+# Should minidlna rescan the entire collection on startup?
+# Warning: This may take a long time!
+RESCAN="false"
+
+# The location of the config file
+#CONFIG="/etc/minidlna.conf"
+
+# Specify the user/group minidlna should run as
+#M_USER="minidlna"
+#M_GROUP="minidlna"
+
+# vim: ft=gentoo-conf-d
diff --git a/net-misc/minidlna/files/minidlna-1.0.25.initd b/net-misc/minidlna/files/minidlna-1.0.25.initd
new file mode 100644
index 000000000000..13fe3a78602d
--- /dev/null
+++ b/net-misc/minidlna/files/minidlna-1.0.25.initd
@@ -0,0 +1,53 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/files/minidlna-1.0.25.initd,v 1.1 2012/07/20 08:08:33 xmw Exp $
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting MiniDLNA"
+ local params=""
+ local stop=0
+
+ checkpath -q -d -m 0755 -o ${M_USER:-minidlna}:${M_GROUP:-minidlna} /var/run/minidlna
+
+ params="$params -P /var/run/minidlna/minidlna.pid"
+
+ if [[ "${RESCAN}" = "true" || "{$RESCAN}" = yes ]]; then
+ params="$params -R"
+ fi
+
+ #set the config file and check if it exists
+ if [ -z "${CONFIG}" ]; then
+ if [ ! -f "/etc/minidlna.conf" ]; then
+ ewarn "You did not set the config file correctly"
+ stop=1
+ fi
+ params="$params -f /etc/minidlna.conf"
+ else
+ if [ ! -f "${CONFIG}" ]; then
+ ewarn "The specified config file does not exist"
+ stop=1
+ fi
+ params="$params -f ${CONFIG}"
+ fi
+
+
+ if [ $stop -eq 1 ]; then
+ eend 1
+ else
+ start-stop-daemon --start \
+ --user ${M_USER:-minidlna} --group ${M_GROUP:-minidlna} \
+ --exec /usr/sbin/minidlna -- ${params}
+ eend $?
+ fi
+}
+
+stop() {
+ ebegin "Stopping MiniDLNA"
+ start-stop-daemon --stop --quiet --exec /usr/sbin/minidlna
+ eend $?
+}
diff --git a/net-misc/minidlna/minidlna-1.0.25-r1.ebuild b/net-misc/minidlna/minidlna-1.0.25-r1.ebuild
new file mode 100644
index 000000000000..03a65cae82c8
--- /dev/null
+++ b/net-misc/minidlna/minidlna-1.0.25-r1.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/minidlna/minidlna-1.0.25-r1.ebuild,v 1.1 2012/07/20 08:08:33 xmw Exp $
+
+EAPI=4
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="DLNA/UPnP-AV compliant media server"
+HOMEPAGE="http://minidlna.sourceforge.net/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV}_src.tar.gz"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE=""
+
+RDEPEND="dev-db/sqlite
+ media-libs/flac
+ media-libs/libexif
+ media-libs/libid3tag
+ media-libs/libogg
+ media-libs/libvorbis
+ virtual/ffmpeg
+ virtual/jpeg"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig"
+
+pkg_setup() {
+ locale my_is_new=yes
+ [ -e "${EPREFIX}"/var/lib/${PN} ] && my_is_new=""
+ enewgroup ${PN}
+ enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ if [ -n ${my_is_new} ] ; then
+ chown ${PN}:${PN} /var/lib/${PN} || die
+ chmod 0750 /var/lib/${PN} || die
+ fi
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.0.18-Makefile.patch
+
+ sed -e "/^DB_PATH=/s:\".*\":\"${EPREFIX}/var/lib/${PN}\":" \
+ -e "/^LOG_PATH=/s:\".*\":\"${EPREFIX}/var/log\":" \
+ -i ./genconfig.sh || die
+}
+
+src_configure() {
+ ./genconfig.sh || die
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install install-conf
+
+ newconfd "${FILESDIR}"/${P}.confd ${PN}
+ newinitd "${FILESDIR}"/${P}.initd ${PN}
+
+ dodir /var/lib/${PN} /var/log
+ echo -n > "${ED}"/var/log/${PN}.log
+ fowners ${PN}:${PN} /var/lib/${PN} /var/log/${PN}.log
+ fperms 0750 /var/lib/${PN}
+ fperms 0640 /var/log/${PN}.log
+
+ dodoc NEWS README TODO
+}
+
+pkg_postinst() {
+ elog "minidlna now runs as minidlna:minidlna (bug 426726),"
+ elog "logfile is moved to /var/log/minidlna.log,"
+ elog "cache is moved to /var/lib/minidlna."
+ elog "Please edit /etc/conf.d/${PN} and file ownerships to suit your needs."
+}