1 |
a3li 10/07/28 07:58:09 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: rbot-0.9.15.ebuild |
5 |
Log: |
6 |
Version bump, closes bug 330125 by Jens Pranaitis. Ebuild now uses the ruby-ng eclass. Adds support for specifying a Ruby interpreter for rbot. Add fi to LINGUAS. |
7 |
(Portage version: 2.2_rc67/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.43 net-irc/rbot/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/ChangeLog?rev=1.43&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/ChangeLog?rev=1.43&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/ChangeLog?r1=1.42&r2=1.43 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v |
19 |
retrieving revision 1.42 |
20 |
retrieving revision 1.43 |
21 |
diff -u -r1.42 -r1.43 |
22 |
--- ChangeLog 7 Nov 2009 20:28:12 -0000 1.42 |
23 |
+++ ChangeLog 28 Jul 2010 07:58:09 -0000 1.43 |
24 |
@@ -1,6 +1,14 @@ |
25 |
# ChangeLog for net-irc/rbot |
26 |
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.42 2009/11/07 20:28:12 a3li Exp $ |
28 |
+# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.43 2010/07/28 07:58:09 a3li Exp $ |
30 |
+ |
31 |
+*rbot-0.9.15 (28 Jul 2010) |
32 |
+ |
33 |
+ 28 Jul 2010; Alex Legler <a3li@g.o> +rbot-0.9.15.ebuild, |
34 |
+ +files/rbot.conf2, +files/rbot.init2: |
35 |
+ Version bump, closes bug 330125 by Jens Pranaitis. Ebuild now uses the |
36 |
+ ruby-ng eclass. Adds support for specifying a Ruby interpreter for rbot. |
37 |
+ Add fi to LINGUAS. |
38 |
|
39 |
07 Nov 2009; Alex Legler <a3li@g.o> -rbot-0.9.11_rc2.ebuild, |
40 |
rbot-0.9.14.ebuild, metadata.xml: |
41 |
|
42 |
|
43 |
|
44 |
1.1 net-irc/rbot/rbot-0.9.15.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/rbot-0.9.15.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-irc/rbot/rbot-0.9.15.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: rbot-0.9.15.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2010 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/rbot-0.9.15.ebuild,v 1.1 2010/07/28 07:58:09 a3li Exp $ |
54 |
|
55 |
EAPI="2" |
56 |
# ruby19 needs ruby-gettext on 19 first |
57 |
USE_RUBY="ruby18" |
58 |
|
59 |
inherit ruby-ng eutils |
60 |
|
61 |
DESCRIPTION="rbot is a ruby IRC bot" |
62 |
HOMEPAGE="http://ruby-rbot.org/" |
63 |
SRC_URI="http://ruby-rbot.org/download/${P}.tgz" |
64 |
|
65 |
LICENSE="GPL-2 as-is" |
66 |
SLOT="0" |
67 |
KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" |
68 |
IUSE="spell aspell timezone translator shorturl nls dict figlet |
69 |
fortune cal host toilet hunspell" |
70 |
ILINGUAS="zh_CN zh_TW ru nl de fi fr it ja" |
71 |
|
72 |
for lang in $ILINGUAS; do |
73 |
IUSE="${IUSE} linguas_${lang}" |
74 |
done |
75 |
|
76 |
RDEPEND=" |
77 |
spell? ( |
78 |
aspell? ( app-text/aspell ) |
79 |
!aspell? ( |
80 |
hunspell? ( app-text/hunspell ) |
81 |
!hunspell? ( app-text/ispell ) |
82 |
) |
83 |
) |
84 |
figlet? ( app-misc/figlet ) |
85 |
toilet? ( app-misc/toilet ) |
86 |
fortune? ( games-misc/fortune-mod ) |
87 |
cal? ( || ( sys-apps/util-linux sys-freebsd/freebsd-ubin ) ) |
88 |
host? ( net-dns/bind-tools )" |
89 |
|
90 |
ruby_add_rdepend " |
91 |
dev-ruby/ruby-bdb |
92 |
timezone? ( dev-ruby/tzinfo ) |
93 |
translator? ( dev-ruby/mechanize ) |
94 |
shorturl? ( dev-ruby/shorturl ) |
95 |
nls? ( dev-ruby/ruby-gettext ) |
96 |
dict? ( dev-ruby/ruby-dict )" |
97 |
|
98 |
# gettext does not yet work on 1.9, so generate locales on 1.8 |
99 |
DEPEND=" |
100 |
nls? ( |
101 |
>=dev-ruby/ruby-gettext-2[ruby_targets_ruby18] |
102 |
dev-ruby/rake[ruby_targets_ruby18] |
103 |
)" |
104 |
|
105 |
pkg_setup() { |
106 |
enewuser rbot -1 -1 /var/lib/rbot nobody |
107 |
} |
108 |
|
109 |
all_ruby_compile() { |
110 |
disable_rbot_plugin() { |
111 |
mv "${S}"/data/rbot/plugins/$1.rb{,.disabled} |
112 |
} |
113 |
use_rbot_plugin() { |
114 |
use $1 && return |
115 |
disable_rbot_plugin "$2" |
116 |
} |
117 |
rbot_conf() { |
118 |
echo "$1: $2" >> "${T}"/rbot.conf |
119 |
} |
120 |
use_rbot_conf_path() { |
121 |
use "$1" \ |
122 |
&& rbot_conf "$2" "$3" \ |
123 |
|| rbot_conf "$2" /bin/false |
124 |
} |
125 |
|
126 |
local spell_program="/usr/bin/ispell" |
127 |
if use !spell; then |
128 |
disable_rbot_plugin spell |
129 |
spell_program="/bin/false" |
130 |
elif use aspell; then |
131 |
spell_program="/usr/bin/ispell-aspell" |
132 |
elif use hunspell; then |
133 |
spell_program="/usr/bin/hunspell -i" |
134 |
fi |
135 |
|
136 |
rbot_conf spell.program "${spell_program}" |
137 |
|
138 |
if use !figlet && use !toilet; then |
139 |
disable_rbot_plugin figlet |
140 |
fi |
141 |
|
142 |
use_rbot_conf_path figlet figlet.path /usr/bin/figlet |
143 |
use_rbot_conf_path toilet toilet.path /usr/bin/toilet |
144 |
|
145 |
use_rbot_plugin timezone time |
146 |
use_rbot_plugin translator translator |
147 |
use_rbot_plugin shorturl shortenurls |
148 |
use_rbot_plugin dict dictclient |
149 |
|
150 |
use_rbot_plugin fortune fortune |
151 |
use_rbot_conf_path fortune fortune.path /usr/bin/fortune |
152 |
|
153 |
use_rbot_plugin cal cal |
154 |
use_rbot_conf_path cal cal.path /usr/bin/cal |
155 |
|
156 |
use_rbot_plugin host host |
157 |
use_rbot_conf_path host host.path /usr/bin/host |
158 |
|
159 |
local rbot_datadir="${D}"/usr/share/rbot |
160 |
|
161 |
# This is unfortunately pretty manual at the moment, but it's just |
162 |
# to avoid having to run special scripts to package new versions |
163 |
# of rbot. The default if new languages are added that are not |
164 |
# considered for an opt-out here is to install them, so you just |
165 |
# need to add them later. |
166 |
if use nls; then |
167 |
strip-linguas ${ILINGUAS} |
168 |
if [[ -n ${LINGUAS} ]]; then |
169 |
# As the the language name used by the rbot data files does |
170 |
# not correspond to the ISO codes we usually use for LINGUAS, |
171 |
# the following list of local varables will work as a |
172 |
# dictionary to get the name used by rbot from the ISO code. |
173 |
local lang_rbot_zh_CN="traditional_chinese" |
174 |
local lang_rbot_ru="russian" |
175 |
local lang_rbot_nl="dutch" |
176 |
local lang_rbot_de="german" |
177 |
local lang_rbot_fi="finnish" |
178 |
local lang_rbot_fr="french" |
179 |
local lang_rbot_it="italian" |
180 |
local lang_rbot_ja="japanese" |
181 |
|
182 |
for lang in ${ILINGUAS}; do |
183 |
use linguas_${lang} && continue |
184 |
|
185 |
lang_varname="lang_rbot_${lang}" |
186 |
lang_rbot=${!lang_varname} |
187 |
|
188 |
rm -r \ |
189 |
"${S}"/data/rbot/languages/${lang_rbot}.lang \ |
190 |
"${S}"/data/rbot/templates/lart/larts-${lang_rbot} \ |
191 |
"${S}"/data/rbot/templates/lart/praises-${lang_rbot} \ |
192 |
"${S}"/data/rbot/templates/salut/salut-${lang_rbot} \ |
193 |
"${S}"/po/${lang} &>/dev/null |
194 |
done |
195 |
fi |
196 |
|
197 |
ruby18 /usr/bin/rake makemo || die "locale generation failed" |
198 |
fi |
199 |
} |
200 |
|
201 |
each_ruby_compile() { |
202 |
${RUBY} setup.rb config --prefix="/usr" \ |
203 |
|| die "setup.rb install failed" |
204 |
} |
205 |
|
206 |
each_ruby_install() { |
207 |
${RUBY} setup.rb install --prefix="${D}" \ |
208 |
|| die "setup.rb install failed" |
209 |
} |
210 |
|
211 |
all_ruby_install() { |
212 |
diropts -o rbot -g nobody -m 0700 |
213 |
keepdir /var/lib/rbot |
214 |
|
215 |
insinto /etc |
216 |
doins "${T}"/rbot.conf |
217 |
|
218 |
newinitd "${FILESDIR}/rbot.init2" rbot |
219 |
newconfd "${FILESDIR}/rbot.conf2" rbot |
220 |
} |
221 |
|
222 |
pkg_postinst() { |
223 |
einfo |
224 |
elog "rbot can be started as a normal service." |
225 |
elog "Check /etc/conf.d/rbot file for more information about this feature." |
226 |
einfo |
227 |
} |