summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2018-11-25 22:08:37 +0100
committerMichał Górny <mgorny@gentoo.org>2018-11-25 22:42:55 +0100
commit05a4e479f950367026e4224293c62049f872765a (patch)
treeb3d0e7752b51654e56bce8dd05dfc67621a70d2d /net-misc/minidlna
parentnet-misc/minidlna: Defer creating user/group to preinst (diff)
downloadgentoo-05a4e479f950367026e4224293c62049f872765a.tar.gz
gentoo-05a4e479f950367026e4224293c62049f872765a.tar.bz2
gentoo-05a4e479f950367026e4224293c62049f872765a.zip
net-misc/minidlna: Inline most uses of PN
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-misc/minidlna')
-rw-r--r--net-misc/minidlna/minidlna-1.2.1-r1.ebuild50
1 files changed, 25 insertions, 25 deletions
diff --git a/net-misc/minidlna/minidlna-1.2.1-r1.ebuild b/net-misc/minidlna/minidlna-1.2.1-r1.ebuild
index 999de5da773d..5e37ec293f71 100644
--- a/net-misc/minidlna/minidlna-1.2.1-r1.ebuild
+++ b/net-misc/minidlna/minidlna-1.2.1-r1.ebuild
@@ -7,8 +7,8 @@ inherit autotools eutils linux-info systemd toolchain-funcs user
DESCRIPTION="DLNA/UPnP-AV compliant media server"
HOMEPAGE="https://sourceforge.net/projects/minidlna/"
-SRC_URI="mirror://sourceforge/${PN}/${PV}/${P}.tar.gz
- https://dev.gentoo.org/~xmw/${PN}-gentoo-artwork.patch.xz"
+SRC_URI="mirror://sourceforge/minidlna/${PV}/${P}.tar.gz
+ https://dev.gentoo.org/~xmw/minidlna-gentoo-artwork.patch.xz"
LICENSE="BSD GPL-2"
SLOT="0"
@@ -30,13 +30,13 @@ DEPEND="${RDEPEND}
CONFIG_CHECK="~INOTIFY_USER"
-PATCHES=( "${WORKDIR}"/${PN}-gentoo-artwork.patch
+PATCHES=( "${WORKDIR}"/minidlna-gentoo-artwork.patch
"${FILESDIR}"/${P}-buildsystem.patch )
src_prepare() {
- sed -e "/log_dir/s:/var/log:/var/log/${PN}:" \
+ sed -e "/log_dir/s:/var/log:/var/log/minidlna:" \
-e "/db_dir/s:/var/cache/:/var/lib/:" \
- -i ${PN}.conf || die
+ -i minidlna.conf || die
default
@@ -46,8 +46,8 @@ src_prepare() {
src_configure() {
econf \
--disable-silent-rules \
- --with-db-path=/var/lib/${PN} \
- --with-log-path=/var/log/${PN} \
+ --with-db-path=/var/lib/minidlna \
+ --with-log-path=/var/log/minidlna \
--enable-tivo \
$(use_enable avahi ) \
$(use_enable netgear) \
@@ -58,37 +58,37 @@ src_install() {
default
#bug 536532
- dosym /usr/sbin/${PN}d /usr/bin/${PN}
+ dosym /usr/sbin/minidlnad /usr/bin/minidlna
insinto /etc
- doins ${PN}.conf
+ doins minidlna.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
+ newconfd "${FILESDIR}"/minidlna-1.0.25.confd minidlna
+ newinitd "${FILESDIR}"/minidlna-1.1.5.initd minidlna
+ systemd_newunit "${FILESDIR}"/minidlna-1.1.2.service minidlna.service
+ echo "d /run/minidlna 0755 minidlna minidlna -" > "${T}"/minidlna.conf
+ systemd_dotmpfilesd "${T}"/minidlna.conf
- keepdir /var/{lib,log}/${PN}
+ keepdir /var/{lib,log}/minidlna
dodoc AUTHORS NEWS README TODO
- doman ${PN}d.8 ${PN}.conf.5
+ doman minidlnad.8 minidlna.conf.5
}
pkg_preinst() {
local my_is_new="yes"
- [ -d "${EPREFIX}"/var/lib/${PN} ] && my_is_new="no"
+ [ -d "${EPREFIX}"/var/lib/minidlna ] && my_is_new="no"
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /var/lib/${PN} ${PN}
+ enewgroup minidlna
+ enewuser minidlna -1 -1 /var/lib/minidlna minidlna
- fowners ${PN}:${PN} /var/{lib,log}/${PN}
- fperms 0750 /var/{lib,log}/${PN}
+ fowners minidlna:minidlna /var/{lib,log}/minidlna
+ fperms 0750 /var/{lib,log}/minidlna
- if [ -d "${EPREFIX}"/var/lib/${PN} ] && [ "${my_is_new}" == "yes" ] ; then
+ if [ -d "${EPREFIX}"/var/lib/minidlna ] && [ "${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
+ chown minidlna:minidlna "${EPREFIX}"/var/lib/minidlna || die
+ chmod 0750 "${EPREFIX}"/var/lib/minidlna || die
# if user already exists, but /var/lib/minidlna is missing
# rely on ${D}/var/lib/minidlna created in src_install
fi
@@ -98,5 +98,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."
+ elog "Please edit /etc/conf.d/minidlna and file ownerships to suit your needs."
}