summaryrefslogtreecommitdiff
path: root/www-misc/vdradmin-am
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-12-18 11:06:49 +0000
commitab3da91fb6c91a9df52fff8f991570f456fd3c7a (patch)
treee8f3bfa2c6c3d20ec3b9c352c839e23949068b6b /www-misc/vdradmin-am
parent6abbf81ef2f298e3221ff5e67a1f3c5f23958212 (diff)
gentoo resync : 18.12.2020
Diffstat (limited to 'www-misc/vdradmin-am')
-rw-r--r--www-misc/vdradmin-am/Manifest8
-rw-r--r--www-misc/vdradmin-am/metadata.xml6
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.10-r1.ebuild2
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild180
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.9-r3.ebuild177
-rw-r--r--www-misc/vdradmin-am/vdradmin-am-3.6.9.ebuild160
6 files changed, 3 insertions, 530 deletions
diff --git a/www-misc/vdradmin-am/Manifest b/www-misc/vdradmin-am/Manifest
index 3da678439cab..1b6a376e39fd 100644
--- a/www-misc/vdradmin-am/Manifest
+++ b/www-misc/vdradmin-am/Manifest
@@ -5,9 +5,5 @@ AUX vdradmin-3.6.7.init 1860 BLAKE2B e8e93378a56a2a2118a5a3ac0cd879690a09c5508a5
AUX vdradmind.conf 92 BLAKE2B 14d1abac4f0718dcf0679ffaab81f2d1867cdca3f3cf8534ddef84129a4bcd4c93c2e18ce9877f44ed9759a81d67b6eb9541c86ac184ffec7705278fcac243b4 SHA512 d54253b0eb684dfcfa924e141b5f0975cea659f3258a519afd625e692855de45d9c863a8d9eb11d4b16597fa76eee955694350f224b443733b238071b3ad9d16
AUX vdradmind.service 278 BLAKE2B 58b7aca123f3dc6ac00eeed25a241cd4315b93abff33ef66a0a227623a5bfd6fb5c234166a55d66f0d4a7762ab0c9c720f8e2031bf52789a52edc3d07d61bfa2 SHA512 e862d5a54e0f9b1b8c3604933ccea840e1256fac49f1b93cd7c6446f9aa4f6b8371fbd8d8b767574efe2420c7141e7af0cd5578733311a94377db8797de32b28
DIST vdradmin-am-3.6.10.tar.bz2 606665 BLAKE2B c475b36c840548b6e0d50b2095ce3278b0b526af856c891a25d28bb2f0cb9f950aa9979533a6b6425a2a36a594dc5d6a075fca7713eb1f59071fec854582cf5b SHA512 f7546f79b786ca383c0846656e74bd69dc9faf57fe5794ffd68776123497ec2a96c2f131801e3d5d19247ac36eaa896801e1ac9cd11291418abb518ba208e597
-DIST vdradmin-am-3.6.9.tar.bz2 562006 BLAKE2B d04d7c0c3254942a388fe0f7b9832fb83f5b6c36af8e9021da8b1e5480d0a507c14da3b55590ea3ba4f58e58c7de9f36cc2a3c5f94168be605477244f62da987 SHA512 1c84ce56da238db6ab2a2fc3d59582945440436e174b3998c21b6bcb5b99c914a195728aa24fef7de8841c3be09b6e9976497acd873e768aab5fdaacddd473d5
-EBUILD vdradmin-am-3.6.10-r1.ebuild 4744 BLAKE2B 34b6b7c2dfcebda6d62bd96b5eb1cea20c72c40a64c9f439bd69bc67a6f9e439e63778385474083c108f1dad49d356362fa4efcf5ef25563609710455722c139 SHA512 96283b5e1a46fe31f4cd2a0994396a1bd140b337b929510a2a0d36ae5440a66a7f31c5a585d90de67bacdacc57cdcf62795ff7305b029b6f1715acfb694cafd4
-EBUILD vdradmin-am-3.6.10.ebuild 4768 BLAKE2B cbddb51256653c55a36ffbfab055bf6deb93eba83b1ccafa01c98bd4d8e0237a6b0cf441894281e90d05839098384193666ee9b5a650b87d928cbf420d1f0308 SHA512 cbfe87316898d2cafd01dfb8f3bd681310a80383061c9966d0fc0a246a19cbd1894f7904a2ff94280e17dc148ec1b48c74e71a5475aaa758dacc46f00330b828
-EBUILD vdradmin-am-3.6.9-r3.ebuild 4730 BLAKE2B bdc97dd0b5be9bbf0977c9fd687c9260c14831278e43dbb2ea26a00cb4f494b48ba5571a03b3e049340d381df6beb2891b5c62c9752e0e6dacdda5cf5df72e0a SHA512 69a1ce6c895f45b2b738375bcf14501fb1771f72fbf794b99019398599ed9d553402abb17e7488822cf847440939afa644ab7ce81fdd9d21a2971a91c01d849a
-EBUILD vdradmin-am-3.6.9.ebuild 4315 BLAKE2B b69fc3e119c2ed3eaf70898515b9612012ab3fbd68395eb9c50b59dc8904293f3fd83988db6f0f6d97f47641f0b85787a01547d566dd26ad9b60f7024481c407 SHA512 1ab55053c9eefd90ca28a5cd7659e6da9cb56c1178a1fffff7e7b9a111ec8b1b0ad3631d29c0206c6ddf1996b2ccd7265b62ef5621269056d566930f063499c3
-MISC metadata.xml 399 BLAKE2B a95fbcee2ab7afdea9ec9ce42107fad106c32091ae9f07ed643db2584dd1ba20ce215b3409e4ba19af67bfac565fa2136ee56e2847bc3873ffc14d560b1988c4 SHA512 89baa05100ebab55a1c12f5156f482f152f0bde04b39ebcf584b64694bcc27f1182dec6a2813867b2cce450bc1e562cbb15460f77982d7c5be0e83807181e555
+EBUILD vdradmin-am-3.6.10-r1.ebuild 4743 BLAKE2B e0999640ef00b1df683cd36cfd7e4d67420b334b7c3fd66c5ae30b359e6862039859c629fd6015283903ab71c024704bb91f9a6351ad971624bc70b291474fee SHA512 c205fbe8a2995dc9d44270a1e0334010ff6c527f6986414c1e159c6439f8a4606f278a6e94c7c4e8138d78feb615e20266de5ccf7785b818f0b8b885a1447416
+MISC metadata.xml 249 BLAKE2B d4dad5b7d4d1bbb3887888fd8519955b5e1262b2f3af04802d69aef6d836bf8d87d0316d9d3527d3a98c8c8ff98cf61d474bdc4ddbb3873592bae7fbfd9f4551 SHA512 b6440069f895b4d5360dec283faef3b6d3b3d65e7b895d8f8bcc2c7106d19db75ebede53ca8e0e67adf63af73ed54ca4efbc1c58b317dbfa27ed2050e175bde3
diff --git a/www-misc/vdradmin-am/metadata.xml b/www-misc/vdradmin-am/metadata.xml
index 692eb1a3b640..984a01fab265 100644
--- a/www-misc/vdradmin-am/metadata.xml
+++ b/www-misc/vdradmin-am/metadata.xml
@@ -5,10 +5,4 @@
<email>vdr@gentoo.org</email>
<name>Gentoo VDR Project</name>
</maintainer>
- <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-r1.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.10-r1.ebuild
index 8a225ac3f56e..d3dd72da6047 100644
--- a/www-misc/vdradmin-am/vdradmin-am-3.6.10-r1.ebuild
+++ b/www-misc/vdradmin-am/vdradmin-am-3.6.10-r1.ebuild
@@ -11,7 +11,7 @@ SRC_URI="http://andreas.vdr-developer.org/vdradmin-am/download/${P}.tar.bz2"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
-KEYWORDS="~amd64 x86"
+KEYWORDS="amd64 x86"
IUSE="ipv6 ssl"
DEPEND="acct-group/vdradmin
diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild
deleted file mode 100644
index 4bc211d37054..000000000000
--- a/www-misc/vdradmin-am/vdradmin-am-3.6.10.ebuild
+++ /dev/null
@@ -1,180 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit 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/CGI
- 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() {
- default
-
- 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 || die
- fi
-
- if use ssl; then
- sed -e "s:/usr/bin/vdradmind:/usr/bin/vdradmind --ssl:" \
- -i "${WORKDIR}"/vdradmind.service || die
- 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 \
- "${ED}"${ETC_DIR}/vdradmind.conf || die
-
- if [[ -f "${EROOT}"${ETC_DIR}/vdradmind.conf ]]; then
- cp "${EROOT}"${ETC_DIR}/vdradmind.conf \
- "${ED}"${ETC_DIR}/vdradmind.conf || die
- else
- elog
- elog "Creating a new config-file."
- echo
-
- cat <<-EOF > "${ED}"${ETC_DIR}/vdradmind.conf
- VDRCONFDIR = "${EROOT}"/etc/vdr
- VIDEODIR = "${EROOT}"/var/vdr/video
- EPG_FILENAME = "${EROOT}"/var/vdr/video/epg.data
- EPGIMAGES = "${EROOT}"/var/vdr/video/epgimages
- PASSWORD = gentoo-vdr
- USERNAME = gentoo-vdr
- EOF
- # Feed it with newlines
- yes "" \
- | "${ED}"/usr/bin/vdradmind --cfgdir "${ED}"${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 ${EROOT}/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 ${EROOT}/etc/conf.d/vdradmin"
-
- if [[ ! -f "${EROOT}"${CERTS_DIR}/server-cert.pem || \
- ! -f "${EROOT}"${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 "${EROOT}"${CERTS_DIR}/server-key.pem || die
- install -D -m 0444 -o ${VDRADMIN_USER} -g ${VDRADMIN_GROUP} \
- "${base}".crt "${EROOT}"${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() {
- "${EROOT}"/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
deleted file mode 100644
index 64aadf4d8c1d..000000000000
--- a/www-misc/vdradmin-am/vdradmin-am-3.6.9-r3.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-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
deleted file mode 100644
index 5809bec4db56..000000000000
--- a/www-misc/vdradmin-am/vdradmin-am-3.6.9.ebuild
+++ /dev/null
@@ -1,160 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-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
-}