From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-865221-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3EC4B1388C0 for <garchives@archives.gentoo.org>; Tue, 23 Feb 2016 20:36:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CBA8F21C003; Tue, 23 Feb 2016 20:36:55 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 439C021C003 for <gentoo-commits@lists.gentoo.org>; Tue, 23 Feb 2016 20:36:55 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 070E2340AC8 for <gentoo-commits@lists.gentoo.org>; Tue, 23 Feb 2016 20:36:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 8237C10AF for <gentoo-commits@lists.gentoo.org>; Tue, 23 Feb 2016 20:36:51 +0000 (UTC) From: "Michael Weber" <xmw@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Weber" <xmw@gentoo.org> Message-ID: <1456259732.944a94cacf7df1c8179eabcbe6d24640ea06bae1.xmw@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/minidlna/files/, net-misc/minidlna/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-misc/minidlna/files/minidlna-1.1.5.initd net-misc/minidlna/minidlna-1.1.5-r1.ebuild X-VCS-Directories: net-misc/minidlna/files/ net-misc/minidlna/ X-VCS-Committer: xmw X-VCS-Committer-Name: Michael Weber X-VCS-Revision: 944a94cacf7df1c8179eabcbe6d24640ea06bae1 X-VCS-Branch: master Date: Tue, 23 Feb 2016 20:36:51 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 702ed4fa-88cf-47aa-aa48-58d4c56e86ed X-Archives-Hash: 2ea5c4ff99c2d449c43c64957b3efeeb commit: 944a94cacf7df1c8179eabcbe6d24640ea06bae1 Author: Michael Weber <xmw <AT> gentoo <DOT> org> AuthorDate: Tue Feb 23 20:30:09 2016 +0000 Commit: Michael Weber <xmw <AT> gentoo <DOT> org> CommitDate: Tue Feb 23 20:35:32 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=944a94ca net-misc/minidlna: Revbump to new init script (https://github.com/gentoo/gentoo/pull/137, thanks jirutka). Package-Manager: portage-2.2.27 net-misc/minidlna/files/minidlna-1.1.5.initd | 33 ++++++++++ net-misc/minidlna/minidlna-1.1.5-r1.ebuild | 96 ++++++++++++++++++++++++++++ 2 files changed, 129 insertions(+) diff --git a/net-misc/minidlna/files/minidlna-1.1.5.initd b/net-misc/minidlna/files/minidlna-1.1.5.initd new file mode 100644 index 0000000..c4cb33f --- /dev/null +++ b/net-misc/minidlna/files/minidlna-1.1.5.initd @@ -0,0 +1,33 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +: ${CONFIG:=/etc/minidlna.conf} +: ${M_USER:=minidlna} +: ${M_GROUP:=minidlna} + +name="MiniDLNA" + +pidfile="/run/minidlna/minidlna.pid" +command="/usr/sbin/minidlnad" +command_args="-P $pidfile -f $CONFIG" +start_stop_daemon_args="--user ${M_USER}:${M_GROUP}" + +required_files="$CONFIG" + +depend() { + need net +} + +start_pre() { + if [ "$M_USER" = "root" ]; then + eerror "It's not a good idea to run minidlna as root!" + fi + + if yesno "$RESCAN"; then + command_args="$command_args -R" + fi + + checkpath -q -d -m 0750 -o "${M_USER}:${M_GROUP}" "$(dirname "$pidfile")" +} diff --git a/net-misc/minidlna/minidlna-1.1.5-r1.ebuild b/net-misc/minidlna/minidlna-1.1.5-r1.ebuild new file mode 100644 index 0000000..877534e --- /dev/null +++ b/net-misc/minidlna/minidlna-1.1.5-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils linux-info systemd toolchain-funcs user + +DESCRIPTION="DLNA/UPnP-AV compliant media server" +HOMEPAGE="http://minidlna.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz + https://dev.gentoo.org/~xmw/${PN}-gentoo-artwork.patch.xz" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~x86" +IUSE="netgear readynas" + +RDEPEND="dev-db/sqlite:3 + media-libs/flac + media-libs/libexif + media-libs/libid3tag + media-libs/libogg + media-libs/libvorbis + virtual/ffmpeg + virtual/jpeg:0" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +CONFIG_CHECK="~INOTIFY_USER" + +pkg_setup() { + local my_is_new="yes" + [ -d "${EPREFIX}"/var/lib/${PN} ] && my_is_new="no" + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} + if [ -d "${EPREFIX}"/var/lib/${PN} ] && [ "${my_is_new}" == "yes" ] ; then + # created by above enewuser command w/ wrong group and permissions + chown ${PN}:${PN} "${EPREFIX}"/var/lib/${PN} || die + chmod 0750 "${EPREFIX}"/var/lib/${PN} || die + # if user already exists, but /var/lib/minidlna is missing + # rely on ${D}/var/lib/minidlna created in src_install + fi + + linux-info_pkg_setup +} + +src_prepare() { + sed -e "/log_dir/s:/var/log:/var/log/${PN}:" \ + -e "/db_dir/s:/var/cache/:/var/lib/:" \ + -i ${PN}.conf || die + + epatch "${WORKDIR}"/${PN}-gentoo-artwork.patch + + epatch_user +} + +src_configure() { + econf \ + --disable-silent-rules \ + --with-db-path=/var/lib/${PN} \ + --with-log-path=/var/log/${PN} \ + --enable-tivo \ + $(use_enable netgear) \ + $(use_enable readynas) +} + +src_install() { + default + + #bug 536532 + dosym /usr/sbin/${PN}d /usr/bin/${PN} + + insinto /etc + doins ${PN}.conf + + newconfd "${FILESDIR}"/${PN}-1.0.25.confd ${PN} + newinitd "${FILESDIR}"/${PN}-1.1.5.initd ${PN} + systemd_newunit "${FILESDIR}"/${PN}-1.1.2.service ${PN}.service + echo "d /run/${PN} 0755 ${PN} ${PN} -" > "${T}"/${PN}.conf + systemd_dotmpfilesd "${T}"/${PN}.conf + + dodir /var/{lib,log}/${PN} + fowners ${PN}:${PN} /var/{lib,log}/${PN} + fperms 0750 /var/{lib,log}/${PN} + + dodoc AUTHORS NEWS README TODO + doman ${PN}d.8 ${PN}.conf.5 +} + +pkg_postinst() { + elog "minidlna now runs as minidlna:minidlna (bug 426726)," + elog "logfile is moved to /var/log/minidlna/minidlna.log," + elog "cache is moved to /var/lib/minidlna." + elog "Please edit /etc/conf.d/${PN} and file ownerships to suit your needs." +}