Gentoo Archives: gentoo-commits

From: "Matthias Schwarzott (zzam)" <zzam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-tv/gentoo-vdr-scripts: ChangeLog gentoo-vdr-scripts-0.4.6-r1.ebuild
Date: Mon, 28 Dec 2009 13:10:07
Message-Id: E1NPFMI-00081O-5C@stork.gentoo.org
1 zzam 09/12/28 13:10:02
2
3 Modified: ChangeLog
4 Added: gentoo-vdr-scripts-0.4.6-r1.ebuild
5 Log:
6 Moved wait_on_pid to its own package.
7 (Portage version: 2.2_rc61/cvs/Linux i686)
8
9 Revision Changes Path
10 1.102 media-tv/gentoo-vdr-scripts/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/gentoo-vdr-scripts/ChangeLog?rev=1.102&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/gentoo-vdr-scripts/ChangeLog?rev=1.102&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/gentoo-vdr-scripts/ChangeLog?r1=1.101&r2=1.102
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/media-tv/gentoo-vdr-scripts/ChangeLog,v
19 retrieving revision 1.101
20 retrieving revision 1.102
21 diff -u -r1.101 -r1.102
22 --- ChangeLog 3 Mar 2009 11:19:42 -0000 1.101
23 +++ ChangeLog 28 Dec 2009 13:10:01 -0000 1.102
24 @@ -1,6 +1,12 @@
25 # ChangeLog for media-tv/gentoo-vdr-scripts
26 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/media-tv/gentoo-vdr-scripts/ChangeLog,v 1.101 2009/03/03 11:19:42 zzam Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/media-tv/gentoo-vdr-scripts/ChangeLog,v 1.102 2009/12/28 13:10:01 zzam Exp $
29 +
30 +*gentoo-vdr-scripts-0.4.6-r1 (28 Dec 2009)
31 +
32 + 28 Dec 2009; Matthias Schwarzott <zzam@g.o>
33 + +gentoo-vdr-scripts-0.4.6-r1.ebuild:
34 + Moved wait_on_pid to its own package.
35
36 03 Mar 2009; Matthias Schwarzott <zzam@g.o>
37 gentoo-vdr-scripts-0.4.6.ebuild:
38
39
40
41 1.1 media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-0.4.6-r1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-0.4.6-r1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-0.4.6-r1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: gentoo-vdr-scripts-0.4.6-r1.ebuild
47 ===================================================================
48 # Copyright 1999-2009 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/media-tv/gentoo-vdr-scripts/gentoo-vdr-scripts-0.4.6-r1.ebuild,v 1.1 2009/12/28 13:10:01 zzam Exp $
51
52 EAPI="2"
53
54 inherit eutils
55
56 DESCRIPTION="Scripts necessary for use of vdr as a set-top-box"
57 HOMEPAGE="http://www.gentoo.org/"
58 SRC_URI="mirror://gentoo/${P}.tar.bz2
59 http://dev.gentoo.org/~zzam/distfiles/${P}.tar.bz2"
60
61 LICENSE="GPL-2"
62 SLOT="0"
63 KEYWORDS="~x86"
64 IUSE="nvram"
65
66 RDEPEND="nvram? ( sys-power/nvram-wakeup )
67 app-admin/sudo
68 sys-process/wait_on_pid
69 !media-tv/vdr-dvd-scripts
70 !media-tv/vdrplugin-rebuild"
71
72 VDR_HOME=/var/vdr
73
74 pkg_setup() {
75 enewgroup vdr
76
77 # Add user vdr to these groups:
78 # video - accessing dvb-devices
79 # audio - playing sound when using software-devices
80 # cdrom - playing dvds/audio-cds ...
81 enewuser vdr -1 /bin/bash "${VDR_HOME}" vdr,video,audio,cdrom
82 }
83
84 src_prepare() {
85 # moved into own package
86 sed -e '/SUBDIRS =/s# bin # #' -i usr/Makefile
87 sed -e '/all:/s#compile##' -i Makefile
88 }
89
90 src_install() {
91 emake -s install DESTDIR="${D}" || die "make install failed"
92 dodoc README TODO ChangeLog
93
94 # create necessary directories
95 diropts -ovdr -gvdr
96 keepdir "${VDR_HOME}"
97
98 local kd
99 for kd in shutdown-data merged-config-files dvd-images tmp; do
100 keepdir "${VDR_HOME}/${kd}"
101 done
102 }
103
104 pkg_preinst() {
105 local PLUGINS_NEW=0
106 if [[ -f "${ROOT}"/etc/conf.d/vdr.plugins ]]; then
107 PLUGINS_NEW=$(grep -v '^#' "${ROOT}"/etc/conf.d/vdr.plugins |grep -v '^$'|wc -l)
108 fi
109 if [[ ${PLUGINS_NEW} > 0 ]]; then
110 cp "${ROOT}"/etc/conf.d/vdr.plugins "${D}"/etc/conf.d/vdr.plugins
111 else
112 einfo "Migrating PLUGINS setting from /etc/conf.d/vdr to /etc/conf.d/vdr.plugins"
113 local PLUGIN
114 for PLUGIN in $(source "${ROOT}"/etc/conf.d/vdr;echo $PLUGINS); do
115 echo ${PLUGIN} >> "${D}"/etc/conf.d/vdr.plugins
116 done
117 fi
118 }
119
120 VDRSUDOENTRY="vdr ALL=NOPASSWD:/usr/share/vdr/bin/vdrshutdown-really.sh"
121
122 pkg_postinst() {
123 elog
124 elog "To make shutdown work add this line to /etc/sudoers"
125 elog "\t${VDRSUDOENTRY}"
126 elog
127 elog "or execute this command:"
128 elog "\temerge --config gentoo-vdr-scripts"
129 elog
130
131 elog "nvram wakeup is optional."
132 elog "To make use of it emerge sys-power/nvram-wakeup."
133 elog
134
135 elog "Plugins which should be used are now set via its"
136 elog "own config-file called /etc/conf.d/vdr.plugins"
137 elog "or enabled via the frontend eselect vdr-plugin."
138 elog
139
140 if [[ -f "${ROOT}/etc/init.d/dvbsplash" ]]; then
141 ewarn
142 ewarn "You have dvbsplash installed!"
143 ewarn "/etc/init.d/dvbsplash will now be deleted"
144 ewarn "as it causes difficult to debug problems."
145 ewarn
146 rm "${ROOT}/etc/init.d/dvbsplash"
147 fi
148
149 if [[ -f "${ROOT}"/etc/conf.d/vdr.dvdswitch ]] &&
150 grep -q ^DVDSWITCH_BURNSPEED= "${ROOT}"/etc/conf.d/vdr.dvdswitch
151 then
152 ewarn "You are setting DVDSWITCH_BURNSPEED in /etc/conf.d/vdr.dvdswitch"
153 ewarn "This no longer has any effect, please use"
154 ewarn "VDR_DVDBURNSPEED in /etc/conf.d/vdr.cd-dvd"
155 fi
156 }
157
158 pkg_config() {
159 if grep -q /usr/share/vdr/bin/vdrshutdown-really.sh "${ROOT}"/etc/sudoers; then
160 einfo "sudoers-entry for vdr already in place."
161 else
162 einfo "Adding this line to /etc/sudoers:"
163 einfo "+ ${VDRSUDOENTRY}"
164
165 cd "${T}"
166 cat >sudoedit-vdr.sh <<-SUDOEDITOR
167 #!/bin/bash
168 echo Commenting out old entry
169 sed -i \${1} -e '/\/usr\/lib\/vdr\/bin\/vdrshutdown-really.sh/s/^/#/'
170 echo Adding new entry
171 echo "" >> \${1}
172 echo "${VDRSUDOENTRY}" >> \${1}
173 SUDOEDITOR
174 chmod a+x sudoedit-vdr.sh
175
176 VISUAL="${T}"/sudoedit-vdr.sh visudo -f "${ROOT}"/etc/sudoers || die "visudo failed"
177
178 einfo "Edited /etc/sudoers"
179 fi
180 }