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 /www-misc/vdradmin-am
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 'www-misc/vdradmin-am')
-rw-r--r--www-misc/vdradmin-am/Manifest2
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.6.conf26
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.6.logrotate9
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.7.init57
-rw-r--r--www-misc/vdradmin-am/files/vdradmind.conf2
-rw-r--r--www-misc/vdradmin-am/files/vdradmind.service13
-rw-r--r--www-misc/vdradmin-am/metadata.xml22
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild178
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.9-r3.ebuild178
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.9.ebuild161
10 files changed, 648 insertions, 0 deletions
diff --git a/www-misc/vdradmin-am/Manifest b/www-misc/vdradmin-am/Manifest
new file mode 100644
index 000000000000..e92b371d60a5
--- /dev/null
+++ b/www-misc/vdradmin-am/Manifest
@@ -0,0 +1,2 @@
+DIST vdradmin-am-3.6.10.tar.bz2 606665 SHA256 a206b85f26860d0adc65bea93756445bf418db1d19e51c83b1caa3355cd496a6 SHA512 f7546f79b786ca383c0846656e74bd69dc9faf57fe5794ffd68776123497ec2a96c2f131801e3d5d19247ac36eaa896801e1ac9cd11291418abb518ba208e597 WHIRLPOOL 91286787f4693a6f5045d50661668254c66afe155866f5c8d3dfa9c2744c36b6109098914bb8f136b2b96af05465d6872310d6b8a7e6f431d2315646dbaaa495
+DIST vdradmin-am-3.6.9.tar.bz2 562006 SHA256 5f0421ca0ea2b4c7669d5332d43b04af8b0c40d2964dd152a265c18f4d7f2715 SHA512 1c84ce56da238db6ab2a2fc3d59582945440436e174b3998c21b6bcb5b99c914a195728aa24fef7de8841c3be09b6e9976497acd873e768aab5fdaacddd473d5 WHIRLPOOL 25f21395fda80a35b7e67fdcf1bdf2a789af73ba59c049d3604da8ecd4863e85c2e551334757d0ac53bfc33d128747ee570520171648be3818a406baa23b0737
diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf b/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf
new file mode 100644
index 000000000000..fe6efecbab89
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf
@@ -0,0 +1,26 @@
+# Settings for vdradmin-am
+
+# Run vdradmin-am as this user:
+#
+# If you want vdradmin to run on a port below 1024 you
+# should nevertheless have vdradmin running as root.
+#
+VDRADMIN_USER="vdradmin"
+
+# Use ssl connection
+# Allowed values: yes no
+# SSL using will disable non SSL connections
+#SSL=no
+
+# Use the ipv6 protocol [EXPERIMENTAL]
+# Allowed values: yes no
+#IPV6=no
+
+# Enable Logging
+# Allowed values: syslog file no
+# Setting this value to file will log to /var/log/vdradmin/vdradmind.log
+#LOGGING=no
+
+# Set loglevel
+# Allowed values: 0-7
+#LOGLEVEL=4
diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.6.logrotate b/www-misc/vdradmin-am/files/vdradmin-3.6.6.logrotate
new file mode 100644
index 000000000000..a4f726c63c15
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmin-3.6.6.logrotate
@@ -0,0 +1,9 @@
+/var/log/vdradmin/vdradmind.log {
+ compress
+ rotate 4
+ weekly
+ delaycompress
+ copytruncate
+ missingok
+ notifempty
+}
diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.7.init b/www-misc/vdradmin-am/files/vdradmin-3.6.7.init
new file mode 100644
index 000000000000..c28fa9b5f961
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmin-3.6.7.init
@@ -0,0 +1,57 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Id$
+
+depend() {
+ use vdr
+}
+
+start() {
+ ebegin "Starting vdradmin"
+
+ : ${VDRADMIN_USER:=vdradmin}
+
+ local dir vdradmin_opts
+
+ # Prepare directories
+ for dir in cache log run; do
+ checkpath -q -d -m 0755 -o ${VDRADMIN_USER}:vdradmin "/var/${dir}/vdradmin"
+ done
+ checkpath -q -d -m 0755 -o ${VDRADMIN_USER}:vdradmin "/etc/vdradmin" \
+ "/etc/vdradmin/certs"
+ checkpath -q -f -m 0644 -o ${VDRADMIN_USER}:vdradmin "/etc/vdradmin/vdradmind.conf" \
+ "/etc/vdradmin/certs/server-cert.pem" \
+ "/etc/vdradmin/certs/server-key.pem"
+
+ if [ "${SSL}" = "yes" ]; then vdradmin_opts="${vdradmin_opts} --ssl"; fi
+ if [ "${IPV6}" = "yes" ]; then vdradmin_opts="${vdradmin_opts} --ipv6"; fi
+ vdradmin_opts="${vdradmin_opts} --log ${LOGLEVEL:=4}"
+
+ if [ "${LOGGING}" = "syslog" ]; then
+ sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 1-" /etc/vdradmin/vdradmind.conf
+ sed -i -e "/LOGFILE/s-LOGFILE.*-LOGFILE = syslog-" /etc/vdradmin/vdradmind.conf
+ elif [ "${LOGGING}" = "file" ]; then
+ sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 1-" /etc/vdradmin/vdradmind.conf
+ sed -i -e "/LOGFILE/s-LOGFILE.*-LOGFILE = vdradmind.log-" /etc/vdradmin/vdradmind.conf
+ else
+ sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 0-" /etc/vdradmin/vdradmind.conf
+ fi
+
+ if [ -n "${RC_UNAME}" ]; then
+ # running on baselayout-2/openrc
+ start-stop-daemon --start --background --user "${VDRADMIN_USER}" \
+ --pidfile /var/run/vdradmin/vdradmind.pid \
+ --exec /usr/bin/perl /usr/bin/vdradmind -- ${vdradmin_opts}
+ else
+ start-stop-daemon --start --background --chuid "${VDRADMIN_USER}" \
+ --exec /usr/bin/vdradmind -- ${vdradmin_opts}
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping vdradmin"
+ start-stop-daemon --stop --quiet --pidfile /var/run/vdradmin/vdradmind.pid
+ eend $?
+}
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..c7cd8752b3d6
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmind.service
@@ -0,0 +1,13 @@
+[Unit]
+Description=WWW interface daemon for VDR
+Documentation=man:vdradmind(8)
+Documentation=file:///usr/share/doc/vdradmin-am/INSTALL
+
+[Service]
+ExecStart=/usr/bin/vdradmind --nofork
+User=vdradmin
+StandardOutput=syslog
+SyslogLevel=warning
+
+[Install]
+WantedBy=multi-user.target
diff --git a/www-misc/vdradmin-am/metadata.xml b/www-misc/vdradmin-am/metadata.xml
new file mode 100644
index 000000000000..613721190802
--- /dev/null
+++ b/www-misc/vdradmin-am/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>media-tv</herd>
+ <maintainer>
+ <email>vdr@gentoo.org</email>
+ <name>Gentoo VDR Project</name>
+ </maintainer>
+ <longdescription lang="en">
+ To program and steer central service over a Browser the VDR
+ </longdescription>
+ <longdescription lang="de">
+ Zentraler Dienst um ueber einen Browser den VDR zu programmiern
+ und zu steuern.
+ </longdescription>
+ <use>
+ <flag name="vdr">
+ Support for media-video/vdr.
+ Disable this if the VDR you want to control runs at a remote machine.
+ </flag>
+ </use>
+</pkgmetadata>
diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild
new file mode 100644
index 000000000000..8a59565a1714
--- /dev/null
+++ b/www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+
+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 )
+ virtual/perl-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_unpack() {
+ unpack ${A}
+ cp "${FILESDIR}"/vdradmind.service "${WORKDIR}"/vdradmind.service
+}
+
+src_prepare() {
+ sed -i vdradmind.pl \
+ -e "s-FILES_IN_SYSTEM = 0;-FILES_IN_SYSTEM = 1;-g" || die
+
+ if use ipv6; then
+ sed -e "s:/usr/bin/vdradmind:/usr/bin/vdradmind --ipv6:" \
+ -i "${WORKDIR}"/vdradmind.service
+ fi
+
+ if use ssl; then
+ sed -e "s:/usr/bin/vdradmind:/usr/bin/vdradmind --ssl:" \
+ -i "${WORKDIR}"/vdradmind.service
+ fi
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/vdradmin-3.6.7.init vdradmin
+ newconfd "${FILESDIR}"/vdradmin-3.6.6.conf vdradmin
+
+ systemd_dounit "${WORKDIR}"/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
+}
diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.9-r3.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.9-r3.ebuild
new file mode 100644
index 000000000000..8a59565a1714
--- /dev/null
+++ b/www-misc/vdradmin-am/vdradmin-am-3.6.9-r3.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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"
+
+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 )
+ virtual/perl-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_unpack() {
+ unpack ${A}
+ cp "${FILESDIR}"/vdradmind.service "${WORKDIR}"/vdradmind.service
+}
+
+src_prepare() {
+ sed -i vdradmind.pl \
+ -e "s-FILES_IN_SYSTEM = 0;-FILES_IN_SYSTEM = 1;-g" || die
+
+ if use ipv6; then
+ sed -e "s:/usr/bin/vdradmind:/usr/bin/vdradmind --ipv6:" \
+ -i "${WORKDIR}"/vdradmind.service
+ fi
+
+ if use ssl; then
+ sed -e "s:/usr/bin/vdradmind:/usr/bin/vdradmind --ssl:" \
+ -i "${WORKDIR}"/vdradmind.service
+ fi
+}
+
+src_install() {
+ newinitd "${FILESDIR}"/vdradmin-3.6.7.init vdradmin
+ newconfd "${FILESDIR}"/vdradmin-3.6.6.conf vdradmin
+
+ systemd_dounit "${WORKDIR}"/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
+}
diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.9.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.9.ebuild
new file mode 100644
index 000000000000..d4ef85fb431d
--- /dev/null
+++ b/www-misc/vdradmin-am/vdradmin-am-3.6.9.ebuild
@@ -0,0 +1,161 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+inherit eutils ssl-cert 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 )
+ virtual/perl-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
+
+ 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
+}