1 |
flameeyes 07/11/19 16:42:47 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: rbot-9999-r4.ebuild |
5 |
Removed: rbot-9999-r3.ebuild |
6 |
Log: |
7 |
Make the spell USE flag work, add an aspell USE flag and make tzinfo optional by mean of timezone USE flag. Also allow to disable the languages. |
8 |
(Portage version: 2.1.3.19) |
9 |
|
10 |
Revision Changes Path |
11 |
1.22 net-irc/rbot/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/ChangeLog?rev=1.22&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/ChangeLog?rev=1.22&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/ChangeLog?r1=1.21&r2=1.22 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v |
20 |
retrieving revision 1.21 |
21 |
retrieving revision 1.22 |
22 |
diff -u -r1.21 -r1.22 |
23 |
--- ChangeLog 19 Nov 2007 13:56:54 -0000 1.21 |
24 |
+++ ChangeLog 19 Nov 2007 16:42:46 -0000 1.22 |
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.21 2007/11/19 13:56:54 flameeyes Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-irc/rbot/ChangeLog,v 1.22 2007/11/19 16:42:46 flameeyes Exp $ |
30 |
+ |
31 |
+*rbot-9999-r4 (19 Nov 2007) |
32 |
+ |
33 |
+ 19 Nov 2007; Diego Pettenò <flameeyes@g.o> -rbot-9999-r3.ebuild, |
34 |
+ +rbot-9999-r4.ebuild: |
35 |
+ Make the spell USE flag work, add an aspell USE flag and make tzinfo |
36 |
+ optional by mean of timezone USE flag. Also allow to disable the languages. |
37 |
|
38 |
19 Nov 2007; Diego Pettenò <flameeyes@g.o> ChangeLog: |
39 |
Take maintainership again, and add the live SVN ebuild I had in my overlay. |
40 |
|
41 |
|
42 |
|
43 |
1.1 net-irc/rbot/rbot-9999-r4.ebuild |
44 |
|
45 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/rbot-9999-r4.ebuild?rev=1.1&view=markup |
46 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/rbot/rbot-9999-r4.ebuild?rev=1.1&content-type=text/plain |
47 |
|
48 |
Index: rbot-9999-r4.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-r4.ebuild,v 1.1 2007/11/19 16:42:46 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" |
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 |
DEPEND="" |
79 |
|
80 |
if [[ ${PV} == "9999" ]]; then |
81 |
SRC_URI="" |
82 |
ESVN_REPO_URI="svn://linuxbrit.co.uk/giblet/rbot/trunk" |
83 |
|
84 |
DEPEND="${DEPEND} |
85 |
dev-ruby/rake |
86 |
app-arch/zip" |
87 |
|
88 |
IUSE="${IUSE} snapshot" |
89 |
else |
90 |
SRC_URI="http://www.linuxbrit.co.uk/downloads/${P}.gem" |
91 |
fi |
92 |
|
93 |
pkg_setup() { |
94 |
enewuser rbot -1 -1 /var/lib/rbot nobody |
95 |
} |
96 |
|
97 |
svn_gem_version() { |
98 |
use snapshot && \ |
99 |
echo 9998.${ESVN_WC_REVISION} || \ |
100 |
echo 9999 |
101 |
} |
102 |
|
103 |
src_unpack() { |
104 |
[[ ${PV} == "9999" ]] || return 0 |
105 |
subversion_src_unpack |
106 |
|
107 |
cd "${S}" |
108 |
sed -i -e "/s.version =/s:'.\+':'$(svn_gem_version)':" Rakefile \ |
109 |
|| die "Unable to fix Rakefile version." |
110 |
sed -i -e '/\$version=/s:".\+":"'$(svn_gem_version)'":' bin/rbot \ |
111 |
|| die "Unable to fix rbot script version." |
112 |
} |
113 |
|
114 |
src_compile() { |
115 |
[[ ${PV} == "9999" ]] || return 0 |
116 |
rake || die "Gem generation failed" |
117 |
} |
118 |
|
119 |
src_install() { |
120 |
if [[ ${PV} == "9999" ]]; then |
121 |
GEM_SRC="${S}/pkg/rbot-$(svn_gem_version).gem" |
122 |
MY_P="${PN}-$(svn_gem_version)" |
123 |
else |
124 |
MY_P="${P}" |
125 |
fi |
126 |
gems_src_install |
127 |
|
128 |
diropts -o rbot -g nobody -m 0700 |
129 |
keepdir /var/lib/rbot |
130 |
|
131 |
newinitd "${FILESDIR}/rbot.init" rbot |
132 |
newconfd "${FILESDIR}/rbot.conf" rbot |
133 |
|
134 |
local rbot_datadir="${D}/${GEMSDIR}"/gems/${MY_P}/data/rbot |
135 |
|
136 |
disable_rbot_plugin() { |
137 |
mv "${rbot_datadir}"/plugins/$1.rb{,.disabled} |
138 |
} |
139 |
|
140 |
if ! use spell; then |
141 |
disable_rbot_plugin spell || die "Unable to disable spell plugin" |
142 |
elif use aspell; then |
143 |
# This is not officially supported, but as ispell is quite a |
144 |
# bad piece of code, at least give an opportunity to use |
145 |
# something that works a bit better. |
146 |
sed -i -e 's:ispell:ispell-aspell:' \ |
147 |
"${rbot_datadir}"/plugins/spell.rb \ |
148 |
|| die "Unable to replace ispell with aspell." |
149 |
fi |
150 |
|
151 |
# This is unfortunately pretty manual at the moment, but it's just |
152 |
# to avoid having to run special scripts to package new versions |
153 |
# of rbot. The default if new languages are added that are not |
154 |
# considered for an opt-out here is to install them, so you just |
155 |
# need to add them later. |
156 |
strip-linguas ${ILINGUAS} |
157 |
if [[ -n ${LINGUAS} ]]; then |
158 |
# As the the language name used by the rbot data files does |
159 |
# not correspond to the ISO codes we usually use for LINGUAS, |
160 |
# the following list of local varables will work as a |
161 |
# dictionary to get the name used by rbot from the ISO code. |
162 |
local lang_rbot_zh="traditional_chinese" |
163 |
local lang_rbot_ru="russian" |
164 |
local lang_rbot_nl="dutch" |
165 |
local lang_rbot_de="german" |
166 |
local lang_rbot_fr="french" |
167 |
local lang_rbot_it="italian" |
168 |
local lang_rbot_en="english" |
169 |
local lang_rbot_ja="japanese" |
170 |
|
171 |
for lang in ${ILINGUAS}; do |
172 |
use linguas_${lang} && continue |
173 |
|
174 |
lang="lang_rbot_${lang}" |
175 |
lang_rbot=${!lang} |
176 |
|
177 |
rm \ |
178 |
${rbot_datadir}/languages/${lang_rbot}.lang \ |
179 |
${rbot_datadir}/templates/lart/larts-${lang_rbot} \ |
180 |
${rbot_datadir}/templates/lart/praises-${lang_rbot} \ |
181 |
${rbot_datadir}/templates/salut/salut-${lang_rbot} |
182 |
done |
183 |
fi |
184 |
} |
185 |
|
186 |
pkg_postinst() { |
187 |
einfo |
188 |
elog "rbot now can be started as a normal service." |
189 |
elog "Check /etc/conf.d/rbot file for more information about this feature." |
190 |
einfo |
191 |
} |
192 |
|
193 |
|
194 |
|
195 |
-- |
196 |
gentoo-commits@g.o mailing list |