summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Pielmeier <billie@gentoo.org>2010-03-16 17:18:49 +0000
committerDaniel Pielmeier <billie@gentoo.org>2010-03-16 17:18:49 +0000
commit18d984f59302e906129fb63a45bbdde7da8fce07 (patch)
tree271ca6770d26f55e3afedd8603a095ef64499d2b /www-misc
parentRevision bump to make use of the new python eclass functions. (diff)
downloadgentoo-2-18d984f59302e906129fb63a45bbdde7da8fce07.tar.gz
gentoo-2-18d984f59302e906129fb63a45bbdde7da8fce07.tar.bz2
gentoo-2-18d984f59302e906129fb63a45bbdde7da8fce07.zip
Version bump. Add myself to maintainers.
(Portage version: 2.1.7.17/cvs/Linux i686)
Diffstat (limited to 'www-misc')
-rw-r--r--www-misc/vdradmin-am/ChangeLog11
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.6.conf25
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.6.init54
-rw-r--r--www-misc/vdradmin-am/files/vdradmin-3.6.6.logrotate9
-rw-r--r--www-misc/vdradmin-am/metadata.xml4
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.6.ebuild169
6 files changed, 270 insertions, 2 deletions
diff --git a/www-misc/vdradmin-am/ChangeLog b/www-misc/vdradmin-am/ChangeLog
index 02aaeba2d01c..7012ecbcd42f 100644
--- a/www-misc/vdradmin-am/ChangeLog
+++ b/www-misc/vdradmin-am/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for www-misc/vdradmin-am
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.6 2010/02/06 19:34:10 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/ChangeLog,v 1.7 2010/03/16 17:18:49 billie Exp $
+
+*vdradmin-am-3.6.6 (16 Mar 2010)
+
+ 16 Mar 2010; Daniel Pielmeier <billie@gentoo.org>
+ +vdradmin-am-3.6.6.ebuild, +files/vdradmin-3.6.6.conf,
+ +files/vdradmin-3.6.6.init, +files/vdradmin-3.6.6.logrotate, metadata.xml:
+ Version bump. Add myself to maintainers.
06 Feb 2010; Matthias Schwarzott <zzam@gentoo.org>
vdradmin-am-3.6.4-r1.ebuild:
@@ -32,7 +39,7 @@
15 Feb 2009; Joerg Bornkessel <hd_brummy@gentoo.org> files/vdradmin-rc-3,
files/vdradmin-4:
added --pidfile for baselayout2 start script part, bug 255423; thanks to
- D. Pillmeier
+ D. Pielmeier
13 Jan 2009; Joerg Bornkessel <hd_brummy@gentoo.org> files/vdradmin-4,
metadata.xml, +vdradmin-am-3.6.4-r1.ebuild:
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..d678490505f5
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf
@@ -0,0 +1,25 @@
+# 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=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.init b/www-misc/vdradmin-am/files/vdradmin-3.6.6.init
new file mode 100644
index 000000000000..2d689c803ca9
--- /dev/null
+++ b/www-misc/vdradmin-am/files/vdradmin-3.6.6.init
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2003 Gentoo Technologies, Inc.
+# Distributed under the terms of the GNU General Public License, v2 or later
+# $Header: /var/cvsroot/gentoo-x86/www-misc/vdradmin-am/files/vdradmin-3.6.6.init,v 1.1 2010/03/16 17:18:47 billie Exp $
+
+depend() {
+ use vdr
+}
+
+start() {
+ ebegin "Starting vdradmin"
+
+ : ${VDRADMIN_USER:=vdradmin}
+
+ local vdradmin_opts
+ 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
+ local logfile=/var/log/vdradmin/vdradmind.log
+ 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
+ if [ ! -e ${logfile} ] ; then touch ${logfile}; fi
+ else
+ sed -i -e "/LOGGING/s-LOGGING.*-LOGGING = 0-" /etc/vdradmin/vdradmind.conf
+ fi
+
+ # Guarantee that vdradmin can access its dirs
+ chown -R "${VDRADMIN_USER}:vdradmin" /var/cache/vdradmin
+ chown -R "${VDRADMIN_USER}:vdradmin" /var/log/vdradmin
+ chown -R "${VDRADMIN_USER}:vdradmin" /var/run/vdradmin
+ chown -R "${VDRADMIN_USER}:vdradmin" /etc/vdradmin
+
+ if [ -x /etc/init.d/root ]; 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/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/metadata.xml b/www-misc/vdradmin-am/metadata.xml
index 613721190802..5ffae08572bd 100644
--- a/www-misc/vdradmin-am/metadata.xml
+++ b/www-misc/vdradmin-am/metadata.xml
@@ -6,6 +6,10 @@
<email>vdr@gentoo.org</email>
<name>Gentoo VDR Project</name>
</maintainer>
+ <maintainer>
+ <email>billie@gentoo.org</email>
+ <name>Daniel Pielmeier</name>
+ </maintainer>
<longdescription lang="en">
To program and steer central service over a Browser the VDR
</longdescription>
diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.6.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.6.ebuild
new file mode 100644
index 000000000000..aa1b2f5fa9ff
--- /dev/null
+++ b/www-misc/vdradmin-am/vdradmin-am-3.6.6.ebuild
@@ -0,0 +1,169 @@
+# Copyright 1999-2010 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.6.ebuild,v 1.1 2010/03/16 17:18:49 billie Exp $
+
+EAPI=2
+
+inherit eutils ssl-cert
+
+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/download/${P}.tar.bz2"
+
+KEYWORDS="~amd64 ~x86"
+SLOT="0"
+LICENSE="LGPL-2.1"
+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
+LOG_DIR=/var/log/vdradmin
+PID_DIR=/var/run/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() {
+ enewuser ${VDRADMIN_USER} -1 /bin/bash ${CACHE_DIR} ${VDRADMIN_GROUP}
+ enewgroup ${VDRADMIN_GROUP}
+
+ if ! use vdr; then
+ elog
+ elog "You can run vdradmin-am outside a vdr install. For minimal"
+ elog "functionality you need access to the epg.data file of your VDR."
+ fi
+}
+
+src_prepare() {
+ sed -i vdradmind.pl \
+ -e "/COMPILE_DIR/s-/tmp-${CACHE_DIR}-" \
+ -e "s-FILES_IN_SYSTEM = 0;-FILES_IN_SYSTEM = 1;-g"
+}
+
+src_configure() { : ; }
+
+src_compile() { : ; }
+
+src_install() {
+ newinitd "${FILESDIR}"/vdradmin-${PV}.init vdradmin
+ newconfd "${FILESDIR}"/vdradmin-${PV}.conf vdradmin
+
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/vdradmin-${PV}.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 HISTORY INSTALL README* REQUIREMENTS FAQ ChangeLog
+ docinto contrib
+ dodoc "${S}"/contrib/*
+
+ diropts "-m755 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP}"
+ keepdir "${ETC_DIR}"
+ keepdir "${CACHE_DIR}"
+ keepdir "${LOG_DIR}"
+ keepdir "${PID_DIR}"
+ use ssl && keepdir "${CERTS_DIR}"
+}
+
+pkg_preinst() {
+ if [[ -f ${ROOT}${ETC_DIR}/vdradmind.conf ]]; then
+ cp "${ROOT}"${ETC_DIR}/vdradmind.conf "${D}"${ETC_DIR}/vdradmind.conf
+ else
+ elog
+ elog "Creating a new config-file."
+ echo
+
+ cat <<-EOF > "${D}"${ETC_DIR}/vdradmind.conf
+ VDRCONFDIR = /etc/vdr
+ VIDEODIR = /var/vdr/video
+ EPG_FILENAME = /var/vdr/video/epg.data
+ EPGIMAGES = /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 vdradmin-am\" 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 -m0400 "${base}.key" "${ROOT}${CERTS_DIR}/server-key.pem"
+ install -m0444 "${base}.crt" "${ROOT}${CERTS_DIR}/server-cert.pem"
+ fi
+ fi
+
+ elog
+ elog "To extend vdradmin-am you can emerge"
+ elog ">=media-plugins/vdr-epgsearch-0.9.25 to search the EPG"
+ elog "media-plugins/vdr-streamdev for livetv streaming"
+ elog "media-video/vdr with USE=\"liemikuutio\" to rename recordings"
+ elog "on the machine running the VDR you connect to with vdradmin-am."
+}
+
+pkg_config() {
+ /usr/bin/vdradmind -c
+}