Gentoo Archives: gentoo-commits

From: "Diego Petteno (flameeyes)" <flameeyes@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-irc/rbot: ChangeLog metadata.xml rbot-9999-r5.ebuild rbot-9999-r4.ebuild
Date: Mon, 17 Dec 2007 22:13:18
Message-Id: E1J4OCz-0002cP-QF@stork.gentoo.org
1 flameeyes 07/12/17 22:13:09
2
3 Modified: ChangeLog metadata.xml
4 Added: rbot-9999-r5.ebuild
5 Removed: rbot-9999-r4.ebuild
6 Log:
7 Add a new revision with USE flags for shorturl and translator plugins, with their dependencies added.
8 (Portage version: 2.1.4_rc10)
9
10 Revision Changes Path
11 1.24 net-irc/rbot/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/ChangeLog?rev=1.24&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/ChangeLog?rev=1.24&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/ChangeLog?r1=1.23&r2=1.24
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v
20 retrieving revision 1.23
21 retrieving revision 1.24
22 diff -u -r1.23 -r1.24
23 --- ChangeLog 23 Nov 2007 22:45:44 -0000 1.23
24 +++ ChangeLog 17 Dec 2007 22:13:09 -0000 1.24
25 @@ -1,6 +1,13 @@
26 # ChangeLog for net-irc/rbot
27 # Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.23 2007/11/23 22:45:44 flameeyes Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.24 2007/12/17 22:13:09 flameeyes Exp $
30 +
31 +*rbot-9999-r5 (17 Dec 2007)
32 +
33 + 17 Dec 2007; Diego Pettenò <flameeyes@g.o> metadata.xml,
34 + -rbot-9999-r4.ebuild, +rbot-9999-r5.ebuild:
35 + Add a new revision with USE flags for shorturl and translator plugins, with
36 + their dependencies added.
37
38 23 Nov 2007; Diego Pettenò <flameeyes@g.o> metadata.xml:
39 Add documentation about the snapshot, timezone and aspell USE flags.
40
41
42
43 1.6 net-irc/rbot/metadata.xml
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/metadata.xml?rev=1.6&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/metadata.xml?rev=1.6&content-type=text/plain
47 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/metadata.xml?r1=1.5&r2=1.6
48
49 Index: metadata.xml
50 ===================================================================
51 RCS file: /var/cvsroot/gentoo-x86/net-irc/rbot/metadata.xml,v
52 retrieving revision 1.5
53 retrieving revision 1.6
54 diff -u -r1.5 -r1.6
55 --- metadata.xml 23 Nov 2007 22:45:44 -0000 1.5
56 +++ metadata.xml 17 Dec 2007 22:13:09 -0000 1.6
57 @@ -21,5 +21,15 @@
58 vanilla plugin uses ispell, but enabling this flag makes it use
59 the ispell interface for aspell instead.
60 </flag>
61 + <flag name="translator">
62 + Add dependency over <pkg>dev-ruby/mechanize</pkg>, which is needed
63 + to enable the "translator" plugin for rbot. If the USE flag is
64 + disabled the plugin is also disabled by default.
65 + </flag>
66 + <flag name="shorturl">
67 + Add dependency over <pkg>dev-ruby/shorturl</pkg>, which is needed
68 + to enable the "shortenurl" plugin for rbot. If the USE flag is
69 + disabled the plugin is also disabled by default.
70 + </flag>
71 </use>
72 </pkgmetadata>
73
74
75
76 1.1 net-irc/rbot/rbot-9999-r5.ebuild
77
78 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/rbot-9999-r5.ebuild?rev=1.1&view=markup
79 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/rbot-9999-r5.ebuild?rev=1.1&content-type=text/plain
80
81 Index: rbot-9999-r5.ebuild
82 ===================================================================
83 # Copyright 1999-2007 Gentoo Foundation
84 # Distributed under the terms of the GNU General Public License v2
85 # $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-9999-r5.ebuild,v 1.1 2007/12/17 22:13:09 flameeyes Exp $
86
87 inherit ruby gems eutils
88
89 [[ ${PV} == "9999" ]] && inherit subversion
90
91 DESCRIPTION="rbot is a ruby IRC bot"
92 HOMEPAGE="http://www.linuxbrit.co.uk/rbot/"
93
94 LICENSE="as-is"
95 SLOT="0"
96 KEYWORDS=""
97 IUSE="spell aspell timezone translator shorturl"
98 ILINGUAS="zh ru nl de fr it en ja"
99
100 for lang in $ILINGUAS; do
101 IUSE="${IUSE} linguas_${lang}"
102 done
103
104 RDEPEND=">=virtual/ruby-1.8
105 dev-ruby/ruby-bdb
106 timezone? ( dev-ruby/tzinfo )
107 spell? (
108 aspell? ( app-text/aspell )
109 !aspell? ( app-text/ispell )
110 )
111 translator? ( dev-ruby/mechanize )
112 shorturl? ( dev-ruby/shorturl )"
113 DEPEND=""
114
115 if [[ ${PV} == "9999" ]]; then
116 SRC_URI=""
117 ESVN_REPO_URI="svn://linuxbrit.co.uk/giblet/rbot/trunk"
118
119 DEPEND="${DEPEND}
120 dev-ruby/rake
121 app-arch/zip"
122
123 IUSE="${IUSE} snapshot"
124 else
125 SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.gem"
126 fi
127
128 pkg_setup() {
129 enewuser rbot -1 -1 /var/lib/rbot nobody
130 }
131
132 svn_gem_version() {
133 use snapshot && \
134 echo 9998.${ESVN_WC_REVISION} || \
135 echo 9999
136 }
137
138 src_unpack() {
139 [[ ${PV} == "9999" ]] || return 0
140 subversion_src_unpack
141
142 cd "${S}"
143 sed -i -e "/s.version =/s:'.\+':'$(svn_gem_version)':" Rakefile \
144 || die "Unable to fix Rakefile version."
145 sed -i -e '/\$version=/s:".\+":"'$(svn_gem_version)'":' bin/rbot \
146 || die "Unable to fix rbot script version."
147 }
148
149 src_compile() {
150 [[ ${PV} == "9999" ]] || return 0
151 rake || die "Gem generation failed"
152 }
153
154 src_install() {
155 if [[ ${PV} == "9999" ]]; then
156 GEM_SRC="${S}/pkg/rbot-$(svn_gem_version).gem"
157 MY_P="${PN}-$(svn_gem_version)"
158 else
159 MY_P="${P}"
160 fi
161 gems_src_install
162
163 diropts -o rbot -g nobody -m 0700
164 keepdir /var/lib/rbot
165
166 newinitd "${FILESDIR}/rbot.init" rbot
167 newconfd "${FILESDIR}/rbot.conf" rbot
168
169 local rbot_datadir="${D}/${GEMSDIR}"/gems/${MY_P}/data/rbot
170
171 disable_rbot_plugin() {
172 mv "${rbot_datadir}"/plugins/$1.rb{,.disabled}
173 }
174
175 if ! use spell; then
176 disable_rbot_plugin spell || die "Unable to disable spell plugin"
177 elif use aspell; then
178 # This is not officially supported, but as ispell is quite a
179 # bad piece of code, at least give an opportunity to use
180 # something that works a bit better.
181 sed -i -e 's:ispell:ispell-aspell:' \
182 "${rbot_datadir}"/plugins/spell.rb \
183 || die "Unable to replace ispell with aspell."
184 fi
185
186 use translator || disable_rbot_plugin translator
187 use shorturl || disable_rbot_plugin shortenurls
188
189 # This is unfortunately pretty manual at the moment, but it's just
190 # to avoid having to run special scripts to package new versions
191 # of rbot. The default if new languages are added that are not
192 # considered for an opt-out here is to install them, so you just
193 # need to add them later.
194 strip-linguas ${ILINGUAS}
195 if [[ -n ${LINGUAS} ]]; then
196 # As the the language name used by the rbot data files does
197 # not correspond to the ISO codes we usually use for LINGUAS,
198 # the following list of local varables will work as a
199 # dictionary to get the name used by rbot from the ISO code.
200 local lang_rbot_zh="traditional_chinese"
201 local lang_rbot_ru="russian"
202 local lang_rbot_nl="dutch"
203 local lang_rbot_de="german"
204 local lang_rbot_fr="french"
205 local lang_rbot_it="italian"
206 local lang_rbot_en="english"
207 local lang_rbot_ja="japanese"
208
209 for lang in ${ILINGUAS}; do
210 use linguas_${lang} && continue
211
212 lang="lang_rbot_${lang}"
213 lang_rbot=${!lang}
214
215 rm \
216 ${rbot_datadir}/languages/${lang_rbot}.lang \
217 ${rbot_datadir}/templates/lart/larts-${lang_rbot} \
218 ${rbot_datadir}/templates/lart/praises-${lang_rbot} \
219 ${rbot_datadir}/templates/salut/salut-${lang_rbot}
220 done
221 fi
222 }
223
224 pkg_postinst() {
225 einfo
226 elog "rbot now can be started as a normal service."
227 elog "Check /etc/conf.d/rbot file for more information about this feature."
228 einfo
229 }
230
231
232
233 --
234 gentoo-commits@g.o mailing list