summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/minidlna/minidlna-1.1.4.ebuild
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/minidlna/minidlna-1.1.4.ebuild')
-rw-r--r--net-misc/minidlna/minidlna-1.1.4.ebuild93
1 files changed, 93 insertions, 0 deletions
diff --git a/net-misc/minidlna/minidlna-1.1.4.ebuild b/net-misc/minidlna/minidlna-1.1.4.ebuild
new file mode 100644
index 000000000000..2af071524411
--- /dev/null
+++ b/net-misc/minidlna/minidlna-1.1.4.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 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
+ http://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
+
+ insinto /etc
+ doins ${PN}.conf
+
+ newconfd "${FILESDIR}"/${PN}-1.0.25.confd ${PN}
+ newinitd "${FILESDIR}"/${PN}-1.1.2.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."
+}