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