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