Gentoo Archives: gentoo-commits

From: Joerg Bornkessel <hd_brummy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-tv/gentoo-vdr-scripts/
Date: Tue, 03 May 2016 16:29:14
Message-Id: 1462292913.13e644bb36a0b1f3ef0c2091ab648978d18f369d.hd_brummy@gentoo
1 commit: 13e644bb36a0b1f3ef0c2091ab648978d18f369d
2 Author: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 3 16:28:33 2016 +0000
4 Commit: Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
5 CommitDate: Tue May 3 16:28:33 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=13e644bb
7
8 eapi6; add support ionice, suggested by T.Loescher
9
10 Package-Manager: portage-2.2.28
11
12 media-tv/gentoo-vdr-scripts/Manifest | 1 +
13 .../gentoo-vdr-scripts-2.7.5.ebuild | 139 +++++++++++++++++++++
14 2 files changed, 140 insertions(+)
15
16 diff --git a/media-tv/gentoo-vdr-scripts/Manifest b/media-tv/gentoo-vdr-scripts/Manifest
17 index b057b8e..c8658d7 100644
18 --- a/media-tv/gentoo-vdr-scripts/Manifest
19 +++ b/media-tv/gentoo-vdr-scripts/Manifest
20 @@ -2,4 +2,5 @@ DIST gentoo-vdr-scripts-2.0.0.tar.bz2 37438 SHA256 6c2025714546a25632c5b8103b3fa
21 DIST gentoo-vdr-scripts-2.5.tar.bz2 39893 SHA256 39a3c5d1cf30f1b07a6218b2154835994bbf9d65358e916260bad970a6ca6432 SHA512 bed3db4e3c4f8195d5715d274a32485d067fa2e539ace417c2d73bac1294d46736754be589d5e18b77e0baa1b4d9cd7df5ff8a13db2850d92d2eb992f9b131a6 WHIRLPOOL 5a7626484784ad49624df92daab0997368f885d4d5f6ad732082c2a77c840f6e23f345cf35816890d43493c57fa70c90eb9a4ab785a8d4ead81f6779714138b9
22 DIST gentoo-vdr-scripts-2.7.2.tar.bz2 48584 SHA256 65de19d3738442a08cdb603ab0e0116e96bbcd8d58b9c9b3f2942e0bcb5365cb SHA512 cb0297c7e78e4c110097d1c08a5f6642d8194d01dd47308f7a41c6d76f7b1675cc612d47a7725eb4f47a393086b034ca09703af0867ae02a36af4be12701f861 WHIRLPOOL 7fe4e106512cca4e26a778320cadf93976897622dac2fd2cf7e21e20e44da27caa69da71f7a779747bc05872e6b90ee7440a7c8fbd2165e6c6a2544804c71da1
23 DIST gentoo-vdr-scripts-2.7.3.tar.bz2 49156 SHA256 a8fb04ca737080dd4fa4d300243d833f835885c0b4c9ca3f1808997713a626ec SHA512 9d00acaf77bbbf52f4a4d4b8284d94b9d191c354de52ea6f7bba0751be661feec4915cca20be3d24a0471efe4b3f24c5dcc025e3e8b0cc6b2c37f8843b91a520 WHIRLPOOL bd30b36284754d4e5c135c381e4114354b1292f4203d0367622c650252d8ecbcaabe58bc40b4d0ad26b54553f5ee0ff5e2e32e13abdd088bd26b0b41a97ee10c
24 +DIST gentoo-vdr-scripts-2.7.5.tar.bz2 49457 SHA256 650220b1061672e5e021f3b2abaad01af0319833c3142aed7d27fe6cfc16469c SHA512 b79460ae73c1914b0057d44469c0ac3e30feab3fc9fa91af618a0753f5061184110af6f2426d0638861e899fe7ef8ddc749bee631e95dbf52da9d32ae3ae7afe WHIRLPOOL b94f40b82ddcce4e85469590136cf874450871abbb07359eb57ecda959e2ae1e66b662bc32e07e65af13a5c1d9f5fb023a62cf78ac64c31e2540e84b2a23beca
25 DIST gentoo-vdr-scripts-2.7.tar.bz2 46618 SHA256 40f6e50e684b4dde9c026887119e80c9680212bfe41854c6526cc1346c0ae2a2 SHA512 95db4d2632d07cc86394fbc2898050d47175f01cc60b61230ba5363c770ba6ad5c5935987ac6a1131bc575887633ed6c8f6242f7de225fc875d0871123665bc5 WHIRLPOOL 889e2379fa9df6ae9992f6569779d4f485488e84c9c1065c43717ae07d15c601ce9a731e612e6bfaaf7df55d5eb4c7901f16bbf0eff680bc5b4ea25662885790
26
27 diff --git a/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.5.ebuild b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.5.ebuild
28 new file mode 100644
29 index 0000000..4e8431b
30 --- /dev/null
31 +++ b/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-2.7.5.ebuild
32 @@ -0,0 +1,139 @@
33 +# Copyright 1999-2015 Gentoo Foundation
34 +# Distributed under the terms of the GNU General Public License v2
35 +# $Id$
36 +
37 +EAPI=6
38 +
39 +inherit eutils user
40 +
41 +DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
42 +HOMEPAGE="https://www.gentoo.org/"
43 +SRC_URI="mirror://gentoo/${P}.tar.bz2
44 + https://dev.gentoo.org/~hd_brummy/distfiles/${P}.tar.bz2"
45 +
46 +LICENSE="GPL-2"
47 +SLOT="0"
48 +KEYWORDS="~amd64 ~arm ~ppc ~x86"
49 +IUSE="nvram"
50 +
51 +RDEPEND="nvram? ( sys-power/nvram-wakeup )
52 + app-admin/sudo
53 + sys-process/wait_on_pid"
54 +
55 +VDR_HOME=/var/vdr
56 +
57 +DOCS=( README* TODO ChangeLog )
58 +
59 +pkg_setup() {
60 + enewgroup vdr
61 +
62 + # Add user vdr to these groups:
63 + # video - accessing dvb-devices
64 + # audio - playing sound when using software-devices
65 + # cdrom - playing dvds/audio-cds ...
66 + enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
67 +}
68 +
69 +src_prepare() {
70 + # moved into own package
71 + sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
72 + sed -e '/all:/s#compile##' -i Makefile
73 +
74 + eapply_user
75 +}
76 +
77 +src_install() {
78 + default
79 +
80 + # create necessary directories
81 + diropts -ovdr -gvdr
82 + keepdir "${VDR_HOME}"
83 +
84 + local kd
85 + for kd in shutdown-data merged-config-files dvd-images; do
86 + keepdir "${VDR_HOME}/${kd}"
87 + done
88 +}
89 +
90 +pkg_preinst() {
91 + local PLUGINS_NEW=0
92 + if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
93 + PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
94 + fi
95 + if [[ ${PLUGINS_NEW} > 0 ]]; then
96 + cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
97 + else
98 + einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
99 + local PLUGIN
100 + for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
101 + echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
102 + done
103 + fi
104 +
105 + has_version "<${CATEGORY}/${PN}-0.5.4"
106 + previous_less_than_0_5_4=$?
107 +
108 + has_version "<${CATEGORY}/${PN}-2.6"
109 + previous_less_than_2_6=$?
110 +}
111 +
112 +VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
113 +
114 +pkg_postinst() {
115 + if [[ $previous_less_than_0_5_4 = 0 ]] ; then
116 + elog "\nVDR use now default the --cachedir parameter to store the epg.file"
117 + elog "Please do not override this with the EPGFILE variable\n"
118 +
119 + elog "svdrp port 2001 support removed\n"
120 +
121 + elog "--rcu support removed, use media-plugin/vdr-rcu\n"
122 + fi
123 +
124 + if [[ $previous_less_than_2_6 = 0 ]]; then
125 + elog "${CATEGORY}/${PN} supports now a init script"
126 + elog "to start a X server"
127 + elog "Please refer for detailed info to"
128 + elog "${CATGORY}/${PN} README.x11-setup\n"
129 + fi
130 +
131 + if use nvram; then
132 + elog "nvram wakeup is optional."
133 + elog "To make use of it emerge sys-power/nvram-wakeup.\n"
134 + fi
135 +
136 + elog "Plugins which should be used are now set via its"
137 + elog "own config-file called /etc/conf.d/vdr.plugins"
138 + elog "or enabled via the frontend eselect vdr-plugin.\n"
139 +
140 + if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
141 + grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
142 + then
143 + ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
144 + ewarn "This no longer has any effect, please use"
145 + ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
146 + fi
147 +
148 + elog "systemd is supported by ${CATEGORY}/${PN}"
149 + elog "Please read for detailed info on this"
150 + elog "${CATEGORY}/${PN} README.systemd"
151 +}
152 +
153 +pkg_config() {
154 + if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
155 +
156 + einfo "Removing depricated entry from /etc/sudoers:"
157 + einfo "- ${VDRSUDOENTRY}"
158 +
159 + cd "${T}"
160 + cat >sudoedit-vdr.sh <<-SUDOEDITOR
161 + #!/bin/bash
162 + sed -i \${1} -e '/\/usr\/share\/vdr\/bin\/vdrshutdown-really.sh *$/d'
163 +
164 + SUDOEDITOR
165 + chmod a+x sudoedit-vdr.sh
166 +
167 + VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
168 +
169 + einfo "Edited /etc/sudoers"
170 + fi
171 +}