From c8d60dada2ec8eb48b2d2b290cd6683ccec40e39 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 13 Feb 2021 21:41:11 +0000 Subject: gentoo (valentine's day) resync : 14.02.2021 --- www-misc/vdradmin-am/Manifest | 6 +- www-misc/vdradmin-am/files/vdradmin-3.6.6.conf | 26 --- www-misc/vdradmin-am/files/vdradmind.service | 2 - www-misc/vdradmin-am/metadata.xml | 8 + www-misc/vdradmin-am/vdradmin-am-3.6.10-r2.ebuild | 187 ++++++++++++++++++++++ 5 files changed, 198 insertions(+), 31 deletions(-) delete mode 100644 www-misc/vdradmin-am/files/vdradmin-3.6.6.conf create mode 100644 www-misc/vdradmin-am/vdradmin-am-3.6.10-r2.ebuild (limited to 'www-misc/vdradmin-am') diff --git a/www-misc/vdradmin-am/Manifest b/www-misc/vdradmin-am/Manifest index 1b6a376e39fd..d9e3809a8667 100644 --- a/www-misc/vdradmin-am/Manifest +++ b/www-misc/vdradmin-am/Manifest @@ -1,9 +1,9 @@ AUX vdradmin-3.6.10.conf 387 BLAKE2B ababdd27b66bcbcb47ea5e69774b659c2319d3c9d8756bbbfde64c738b75d0a497778a1a6b3529f118f54519ad3895bd4ec51a613d74273a11b64f8f1e8739a2 SHA512 9308c97fd5354c16ffeb8ddaf983710d4e72a443e30ade596d1f0cd3133e28173062ac30efc18e8ec8fdd0ee9747083f697bd52865624dc3e8c8d64b0d3c8cfc -AUX vdradmin-3.6.6.conf 557 BLAKE2B d5a9991ec16a87986bb9674d1c9b2450f8b34832e45984c731b49f4bb4c55f767e353066b38aa679d78b316431d1ad5d135dedacd9050929fe570da0d9e58455 SHA512 253ad76deb8c4b5d8ca69464381a7322efa6c638bb78049db8dce3dfc44aaa9a36e37ac62d0ac945418dd4afbde573b0b11ecab3ace149c06a8ded2c4832afe6 AUX vdradmin-3.6.6.logrotate 116 BLAKE2B 5db1b231a4a821689c8f6198e02f56e8c8dfb89c56abf6fc4630f59081d34b222f7437186b6cdb169e2a7929c26c8bf86e3f1ae037a57bffdcdb1becca4af8b6 SHA512 27d730b67210adf314c53e87fb4ba7e6ab0a1461db0f8ddb517878341badcb27531eaedc8034ba2e72572bbaa8db07c61781be6063aaee7ef63043d4d5979b98 AUX vdradmin-3.6.7.init 1860 BLAKE2B e8e93378a56a2a2118a5a3ac0cd879690a09c5508a54d6eb0cf7e827c915df2bcbd894fc53f4eee75eaebba0826e6712fbf3a0c1975101799a0d4575b6679fbb SHA512 73a175c7ae8f233442dedc5d2d94a81a4a63d3973c4548d508496f2d99e06eeb0683f51b8621ee8cefd5111ad2240c90d7225b96fef96b15e618b21418136731 AUX vdradmind.conf 92 BLAKE2B 14d1abac4f0718dcf0679ffaab81f2d1867cdca3f3cf8534ddef84129a4bcd4c93c2e18ce9877f44ed9759a81d67b6eb9541c86ac184ffec7705278fcac243b4 SHA512 d54253b0eb684dfcfa924e141b5f0975cea659f3258a519afd625e692855de45d9c863a8d9eb11d4b16597fa76eee955694350f224b443733b238071b3ad9d16 -AUX vdradmind.service 278 BLAKE2B 58b7aca123f3dc6ac00eeed25a241cd4315b93abff33ef66a0a227623a5bfd6fb5c234166a55d66f0d4a7762ab0c9c720f8e2031bf52789a52edc3d07d61bfa2 SHA512 e862d5a54e0f9b1b8c3604933ccea840e1256fac49f1b93cd7c6446f9aa4f6b8371fbd8d8b767574efe2420c7141e7af0cd5578733311a94377db8797de32b28 +AUX vdradmind.service 236 BLAKE2B 605e037f32ab03877b7d33d4cf964cac1a453c2026a34c12e966920c6bdb4e221cff83ca2f54a7288a0fc64cfeec5f1906ad2acbe29024ddbcc77fed1b1e07e4 SHA512 dc674c38be6eb26cda20511c0366c7cff8f70e4d02781508828e8027e4c82c591e62361efa44862382cdf3417c30e679babdc7928a31ad054250aed41c06fff5 DIST vdradmin-am-3.6.10.tar.bz2 606665 BLAKE2B c475b36c840548b6e0d50b2095ce3278b0b526af856c891a25d28bb2f0cb9f950aa9979533a6b6425a2a36a594dc5d6a075fca7713eb1f59071fec854582cf5b SHA512 f7546f79b786ca383c0846656e74bd69dc9faf57fe5794ffd68776123497ec2a96c2f131801e3d5d19247ac36eaa896801e1ac9cd11291418abb518ba208e597 EBUILD vdradmin-am-3.6.10-r1.ebuild 4743 BLAKE2B e0999640ef00b1df683cd36cfd7e4d67420b334b7c3fd66c5ae30b359e6862039859c629fd6015283903ab71c024704bb91f9a6351ad971624bc70b291474fee SHA512 c205fbe8a2995dc9d44270a1e0334010ff6c527f6986414c1e159c6439f8a4606f278a6e94c7c4e8138d78feb615e20266de5ccf7785b818f0b8b885a1447416 -MISC metadata.xml 249 BLAKE2B d4dad5b7d4d1bbb3887888fd8519955b5e1262b2f3af04802d69aef6d836bf8d87d0316d9d3527d3a98c8c8ff98cf61d474bdc4ddbb3873592bae7fbfd9f4551 SHA512 b6440069f895b4d5360dec283faef3b6d3b3d65e7b895d8f8bcc2c7106d19db75ebede53ca8e0e67adf63af73ed54ca4efbc1c58b317dbfa27ed2050e175bde3 +EBUILD vdradmin-am-3.6.10-r2.ebuild 4757 BLAKE2B 30e79cd4044858596fa425eddf3658891b07037117563dee68ba536ac214a18a9e0ddf9d3ff58be5722e7ca97da4bdfef9ccffe81a777011cb964085df22b36b SHA512 f851a6898cfb8c410b1245e312476946770d20bbdfb9761742f0e2c6049732bd425c3b2630aa827073a5f928ffee361cbba3978b8ad20514be044b51d6d1614e +MISC metadata.xml 477 BLAKE2B 082ad4f53e9c433ebb519be1cba7b079d1372d8b18b169092f4dd17cea14c4be99f4a3ca49934305817a45ca8208c079c85fe4d9bb0ba3c9cfb4754b02dec9c1 SHA512 9d317606d6f1dde6af151f99db3e0a119a47e2a6816da518a343777980236f93942e8fc3694fb5f80ad6a1c6b6e4b9d81064dbb7b2bfe4694a65fbd05cf9ac8f diff --git a/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf b/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf deleted file mode 100644 index fe6efecbab89..000000000000 --- a/www-misc/vdradmin-am/files/vdradmin-3.6.6.conf +++ /dev/null @@ -1,26 +0,0 @@ -# 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/vdradmind.service b/www-misc/vdradmin-am/files/vdradmind.service index c7cd8752b3d6..ef4dc4dada15 100644 --- a/www-misc/vdradmin-am/files/vdradmind.service +++ b/www-misc/vdradmin-am/files/vdradmind.service @@ -6,8 +6,6 @@ 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 index 984a01fab265..cd73dfdd5965 100644 --- a/www-misc/vdradmin-am/metadata.xml +++ b/www-misc/vdradmin-am/metadata.xml @@ -1,6 +1,14 @@ + + martin.dummer@gmx.net + Martin Dummer + + + proxy-maint@gentoo.org + Proxy Maintainers + vdr@gentoo.org Gentoo VDR Project diff --git a/www-misc/vdradmin-am/vdradmin-am-3.6.10-r2.ebuild b/www-misc/vdradmin-am/vdradmin-am-3.6.10-r2.ebuild new file mode 100644 index 000000000000..54754bdb1bf8 --- /dev/null +++ b/www-misc/vdradmin-am/vdradmin-am-3.6.10-r2.ebuild @@ -0,0 +1,187 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit ssl-cert systemd tmpfiles + +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="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ipv6 ssl systemd" + +DEPEND=" + acct-group/vdradmin + acct-user/vdradmin + dev-lang/perl + dev-perl/Authen-SASL + dev-perl/CGI + dev-perl/Digest-HMAC + dev-perl/Locale-gettext + dev-perl/Template-Toolkit + dev-perl/URI + dev-perl/libwww-perl + virtual/perl-IO-Compress + virtual/perl-libnet + ipv6? ( dev-perl/IO-Socket-INET6 ) + ssl? ( dev-perl/IO-Socket-SSL ) + systemd? ( sys-apps/systemd ) +" +RDEPEND="${DEPEND}" + +ETC_DIR="/etc/vdradmin" +CERTS_DIR="/etc/vdradmin/certs" +LIB_DIR="/usr/share/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 +} + +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.10.conf vdradmin + + systemd_dounit "${WORKDIR}"/vdradmind.service + dotmpfiles "${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/* + + keepdir "${ETC_DIR}" + fowners "${VDRADMIN_USER}":"${VDRADMIN_GROUP}" "${ETC_DIR}" + + if use ssl; then + keepdir "${CERTS_DIR}" + fowners "${VDRADMIN_USER}":"${VDRADMIN_GROUP}" "${CERTS_DIR}" + fi +} + +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() { + tmpfiles_process vdradmind.conf + + if use ipv6; then + if ! use systemd; then + elog + elog "To make use of the ipv6 protocol" + elog "you need to enable it in ${EROOT}/etc/conf.d/vdradmin" + fi + fi + + if use ssl; then + if ! use systemd; then + elog + elog "To use ssl connection to your vdr" + elog "you need to enable it in ${EROOT}/etc/conf.d/vdradmin" + fi + + 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 to search the EPG" + elog " media-plugins/vdr-streamdev for livetv streaming" + elog "on the machine running the VDR you connect to with ${PN}." +} + +pkg_config() { + "${EROOT}"/usr/bin/vdradmind -c +} -- cgit v1.2.3