summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPacho Ramos <pacho@gentoo.org>2014-04-19 18:08:48 +0000
committerPacho Ramos <pacho@gentoo.org>2014-04-19 18:08:48 +0000
commitdc17f4fa8569a2828cd1fbc8f821610abadfe9dd (patch)
treedf3338f56a17232a3c62c26a3309482598bf08e3 /www-misc
parentVersion bump. (diff)
downloadgentoo-2-dc17f4fa8569a2828cd1fbc8f821610abadfe9dd.tar.gz
gentoo-2-dc17f4fa8569a2828cd1fbc8f821610abadfe9dd.tar.bz2
gentoo-2-dc17f4fa8569a2828cd1fbc8f821610abadfe9dd.zip
Add unit file (#507736 by Joachim Herb)
(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key A188FBD4)
Diffstat (limited to 'www-misc')
-rw-r--r--www-misc/vdradmin-am/ChangeLog9
-rw-r--r--www-misc/vdradmin-am/files/vdradmind.conf2
-rw-r--r--www-misc/vdradmin-am/files/vdradmind.service14
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.9-r1.ebuild163
4 files changed, 186 insertions, 2 deletions
diff --git a/www-misc/vdradmin-am/ChangeLog b/www-misc/vdradmin-am/ChangeLog
index cd9b7f95d716..3bf5304bbed6 100644
--- a/www-misc/vdradmin-am/ChangeLog
+++ b/www-misc/vdradmin-am/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for www-misc/vdradmin-am
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.31 2014/04/12 18:40:30 hd_brummy Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.32 2014/04/19 18:08:48 pacho Exp $
+
+*vdradmin-am-3.6.9-r1 (19 Apr 2014)
+
+ 19 Apr 2014; Pacho Ramos <pacho@gentoo.org> +files/vdradmind.conf,
+ +files/vdradmind.service, +vdradmin-am-3.6.9-r1.ebuild:
+ Add unit file (#507736 by Joachim Herb)
12 Apr 2014; Joerg Bornkessel <hd_brummy@gentoo.org>
-vdradmin-am-3.6.8.ebuild:
@@ -319,4 +325,3 @@
14 Jul 2006; Joerg Bornkessel <hd_brummy@gentoo.org> +files/vdradmin,
+metadata.xml, +vdradmin-am-3.4.6.ebuild:
initial import; find older versions on gentoo.de overlay
-
diff --git a/www-misc/vdradmin-am/files/vdradmind.conf b/www-misc/vdradmin-am/files/vdradmind.conf
new file mode 100644
index 000000000000..a5208a89b1b9
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmind.conf
@@ -0,0 +1,2 @@
+d /var/cache/vdradmin 0755 vdradmin vdradmin -
+d /var/log/vdradmin 0755 vdradmin vdradmin -
diff --git a/www-misc/vdradmin-am/files/vdradmind.service b/www-misc/vdradmin-am/files/vdradmind.service
new file mode 100644
index 000000000000..49dea3e2c257
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmind.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=WWW interface daemon for VDR
+Documentation=man:vdradmind(8)
+Documentation=file:///usr/share/doc/vdradmin-am/INSTALL
+After=vdr.service
+
+[Service]
+ExecStart=/usr/bin/vdradmind --nofork
+User=vdradmin
+StandardOutput=syslog
+SyslogLevel=warning
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.9-r1.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.9-r1.ebuild
new file mode 100644
index 000000000000..129cbed3c2e5
--- /dev/null
+++ b/www-misc/vdradmin-am/vdradmin-am-3.6.9-r1.ebuild
@@ -0,0 +1,163 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/vdradmin-am-3.6.9-r1.ebuild,v 1.1 2014/04/19 18:08:48 pacho Exp $
+
+EAPI="5"
+
+inherit eutils ssl-cert systemd user
+
+DESCRIPTION="WWW Admin for the Video Disk Recorder"
+HOMEPAGE="http://andreas.vdr-developer.org/vdradmin-am/index.html"
+SRC_URI="http://andreas.vdr-developer.org/vdradmin-am/download/${P}.tar.bz2"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="ipv6 ssl +vdr"
+
+DEPEND="dev-lang/perl
+ dev-perl/Template-Toolkit
+ dev-perl/libwww-perl
+ dev-perl/URI
+ dev-perl/Locale-gettext
+ virtual/perl-IO-Compress
+ ipv6? ( dev-perl/IO-Socket-INET6 )
+ ssl? ( dev-perl/IO-Socket-SSL )
+ vdr? ( media-video/vdr )
+ perl-core/libnet
+ dev-perl/Authen-SASL
+ dev-perl/Digest-HMAC"
+RDEPEND="${DEPEND}"
+
+ETC_DIR=/etc/vdradmin
+CERTS_DIR=/etc/vdradmin/certs
+LIB_DIR=/usr/share/vdradmin
+CACHE_DIR=/var/cache/vdradmin
+VDRADMIN_USER=vdradmin
+VDRADMIN_GROUP=vdradmin
+
+create_ssl_cert() {
+ # The ssl-cert eclass is not flexible enough so do some steps manually
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-vdradmin-am}"
+ SSL_COMMONNAME="${SSL_COMMONNAME:-`hostname -f`}"
+
+ gen_cnf || return 1
+
+ gen_key 1 || return 1
+ gen_csr 1 || return 1
+ gen_crt 1 || return 1
+}
+
+pkg_setup() {
+ enewgroup ${VDRADMIN_GROUP}
+ enewuser ${VDRADMIN_USER} -1 /bin/bash ${CACHE_DIR} ${VDRADMIN_GROUP}
+}
+
+src_prepare() {
+ sed -i vdradmind.pl \
+ -e "s-FILES_IN_SYSTEM = 0;-FILES_IN_SYSTEM = 1;-g" || die
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/vdradmin-3.6.7.init vdradmin
+ newconfd "${FILESDIR}"/vdradmin-3.6.6.conf vdradmin
+ systemd_dounit "${FILESDIR}"/vdradmind.service
+ systemd_dotmpfilesd "${FILESDIR}"/vdradmind.conf
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/vdradmin-3.6.6.logrotate vdradmin
+
+ newbin vdradmind.pl vdradmind
+
+ insinto ${LIB_DIR}/template
+ doins -r "${S}"/template/*
+
+ insinto ${LIB_DIR}/lib/Template/Plugin
+ doins -r "${S}"/lib/Template/Plugin/JavaScript.pm
+
+ insinto /usr/share/locale/
+ doins -r "${S}"/locale/*
+
+ newman vdradmind.pl.1 vdradmind.8
+
+ dodoc CREDITS ChangeLog FAQ HISTORY INSTALL README* REQUIREMENTS
+ docinto contrib
+ dodoc "${S}"/contrib/*
+
+ diropts "-m755 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP}"
+ keepdir ${ETC_DIR}
+ use ssl && keepdir ${CERTS_DIR}
+}
+
+pkg_preinst() {
+ install -m 0644 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} /dev/null \
+ "${D}"${ETC_DIR}/vdradmind.conf || die
+
+ if [[ -f "${ROOT}"${ETC_DIR}/vdradmind.conf ]]; then
+ cp "${ROOT}"${ETC_DIR}/vdradmind.conf \
+ "${D}"${ETC_DIR}/vdradmind.conf || die
+ else
+ elog
+ elog "Creating a new config-file."
+ echo
+
+ cat <<-EOF > "${D}"${ETC_DIR}/vdradmind.conf
+ VDRCONFDIR = "${ROOT%/}"/etc/vdr
+ VIDEODIR = "${ROOT%/}"/var/vdr/video
+ EPG_FILENAME = "${ROOT%/}"/var/vdr/video/epg.data
+ EPGIMAGES = "${ROOT%/}"/var/vdr/video/epgimages
+ PASSWORD = gentoo-vdr
+ USERNAME = gentoo-vdr
+ EOF
+ # Feed it with newlines
+ yes "" \
+ | "${D}"/usr/bin/vdradmind --cfgdir "${D}"${ETC_DIR} --config \
+ |sed -e 's/: /: \n/g'
+
+ [[ ${PIPESTATUS[1]} == "0" ]] \
+ || die "Failed to create initial configuration."
+
+ elog
+ elog "Created default user/password: gentoo-vdr/gentoo-vdr"
+ elog
+ elog "You can run \"emerge --config ${PN}\" if the default-values"
+ elog "do not match your installation or change them in the Setup-Menu"
+ elog "of the Web-Interface."
+ fi
+}
+
+pkg_postinst() {
+ if use ipv6; then
+ elog
+ elog "To make use of the ipv6 protocol"
+ elog "you need to enable it in ${ROOT%/}/etc/conf.d/vdradmin"
+ fi
+
+ if use ssl; then
+ elog
+ elog "To use ssl connection to your vdr"
+ elog "you need to enable it in ${ROOT%/}/etc/conf.d/vdradmin"
+
+ if [[ ! -f "${ROOT}"${CERTS_DIR}/server-cert.pem || \
+ ! -f "${ROOT}"${CERTS_DIR}/server-key.pem ]]; then
+ create_ssl_cert
+ local base=$(get_base 1)
+ install -D -m 0400 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} \
+ "${base}".key "${ROOT}"${CERTS_DIR}/server-key.pem || die
+ install -D -m 0444 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} \
+ "${base}".crt "${ROOT}"${CERTS_DIR}/server-cert.pem || die
+ fi
+ fi
+
+ elog
+ elog "To extend ${PN} you can emerge"
+ elog ">=media-plugins/vdr-epgsearch-0.9.25 to search the EPG,"
+ elog "media-plugins/vdr-streamdev for livetv streaming and/or"
+ elog "media-video/vdr with USE=\"liemikuutio/vasarajanauloja/none\" "
+ elog "(depend on your vdr version) to rename recordings"
+ elog "on the machine running the VDR you connect to with ${PN}."
+}
+
+pkg_config() {
+ "${ROOT}"/usr/bin/vdradmind -c
+}