1 |
george 10/05/10 22:07:06 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: coda-6.9.5.ebuild |
5 |
Log: |
6 |
new version out. FHS compliance and gcc-4.4 support |
7 |
(Portage version: 2.1.8.3/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.35 net-fs/coda/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/coda/ChangeLog?rev=1.35&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/coda/ChangeLog?rev=1.35&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/coda/ChangeLog?r1=1.34&r2=1.35 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v |
19 |
retrieving revision 1.34 |
20 |
retrieving revision 1.35 |
21 |
diff -u -r1.34 -r1.35 |
22 |
--- ChangeLog 20 Jan 2010 13:37:33 -0000 1.34 |
23 |
+++ ChangeLog 10 May 2010 22:07:06 -0000 1.35 |
24 |
@@ -1,6 +1,13 @@ |
25 |
# ChangeLog for net-fs/coda |
26 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.34 2010/01/20 13:37:33 george Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/ChangeLog,v 1.35 2010/05/10 22:07:06 george Exp $ |
29 |
+ |
30 |
+*coda-6.9.5 (10 May 2010) |
31 |
+ |
32 |
+ 10 May 2010; George Shapovalov <george@g.o> +coda-6.9.5.ebuild, |
33 |
+ +files/vice-setup.in.patch: |
34 |
+ new version out. Looks like upstream decided to transition to FHS |
35 |
+ compliant paths. |
36 |
|
37 |
20 Jan 2010; George Shapovalov <george@g.o> coda-6.9.4.ebuild: |
38 |
fixed omission in path substitution in server-setup scripts |
39 |
|
40 |
|
41 |
|
42 |
1.1 net-fs/coda/coda-6.9.5.ebuild |
43 |
|
44 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/coda/coda-6.9.5.ebuild?rev=1.1&view=markup |
45 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-fs/coda/coda-6.9.5.ebuild?rev=1.1&content-type=text/plain |
46 |
|
47 |
Index: coda-6.9.5.ebuild |
48 |
=================================================================== |
49 |
# Copyright 1999-2010 Gentoo Foundation |
50 |
# Distributed under the terms of the GNU General Public License v2 |
51 |
# $Header: /var/cvsroot/gentoo-x86/net-fs/coda/coda-6.9.5.ebuild,v 1.1 2010/05/10 22:07:06 george Exp $ |
52 |
|
53 |
inherit autotools eutils toolchain-funcs |
54 |
|
55 |
IUSE="client server coda_layout coda_symlinks kerberos" |
56 |
# client : causes the coda client (venus) to be built. |
57 |
# server : causes the coda server (vice) to be built. |
58 |
# coda_layout : doesn't apply FHS compliancy patches. Use this if using any directory |
59 |
# other than /coda for the mount point makes you upset. |
60 |
# coda_symlinks : create legacy symlinks if FHS layout is used. |
61 |
|
62 |
DESCRIPTION="Coda is an advanced networked filesystem developed at Carnegie Mellon Univ." |
63 |
HOMEPAGE="http://www.coda.cs.cmu.edu/" |
64 |
SRC_URI="http://www.coda.cs.cmu.edu/pub/coda/src/${P}.tar.gz" |
65 |
|
66 |
SLOT="0" |
67 |
LICENSE="GPL-2" |
68 |
KEYWORDS="~amd64 ~ppc ~x86" |
69 |
|
70 |
# partly based on the deps suggested by Mandrake's RPM, and/or on my current versions |
71 |
# Also, definely needs coda.h from linux-headers. |
72 |
RDEPEND=">=sys-libs/lwp-2.1 |
73 |
>=net-libs/rpc2-2.6 |
74 |
>=sys-libs/rvm-1.15 |
75 |
>=sys-libs/db-3 |
76 |
>=sys-libs/ncurses-4 |
77 |
>=sys-libs/readline-3 |
78 |
>=dev-lang/perl-5.8 |
79 |
kerberos? ( virtual/krb5 )" |
80 |
|
81 |
DEPEND="${RDEPEND} |
82 |
sys-apps/gawk |
83 |
sys-devel/bison |
84 |
sys-apps/grep |
85 |
virtual/os-headers" |
86 |
|
87 |
pkg_setup() { |
88 |
echo |
89 |
einfo "gcc-version = $(gcc-version)" |
90 |
echo |
91 |
|
92 |
if ! use client && ! use server; then |
93 |
eerror "Neither client nor server is enabled." |
94 |
eerror "Please enable at least one of these flags!" |
95 |
die "at least one of client or server flags should be on!" |
96 |
fi |
97 |
|
98 |
if use coda_layout; then |
99 |
einfo |
100 |
ewarn "You selected coda (legacy) layout." |
101 |
ewarn "Please note, that coda itself have transitioned to more FHS" |
102 |
ewarn "compilant layout starting with version 6.9.5. Although not all" |
103 |
ewarn "internal paths seem to have been updated." |
104 |
ewarn "Use with care!" |
105 |
einfo |
106 |
ewarn "In case you are updating existing installation it is" |
107 |
ewarn "recommended to keep old layout in conf files or perform a clean" |
108 |
ewarn "transition - copying data externally to fresh version." |
109 |
einfo |
110 |
sleep 5 |
111 |
fi |
112 |
} |
113 |
|
114 |
src_unpack() { |
115 |
unpack ${A} |
116 |
|
117 |
cd "${S}" |
118 |
tar xjpf "${FILESDIR}"/scripts.tar.bz2 |
119 |
epatch "${FILESDIR}"/fixdeps.patch |
120 |
epatch "${FILESDIR}"/vice-setup.in.patch |
121 |
|
122 |
if ! use coda_layout; then |
123 |
einfo "seding sources.." |
124 |
# First, some common substitutions. |
125 |
# As this is a rather critical subsystem and screwing paths can break |
126 |
# user's data, protect all seds by die. |
127 |
# |
128 |
# NOTE: gentoo specific init scripts installed as a part of unpack ${A} |
129 |
# have some paths specified inside. However these will be autoupdated by |
130 |
# below seds for free, no need for special care. |
131 |
# |
132 |
# first, special cases under /usr/coda |
133 |
# for spool, look only in subdirs, as we do not want to touch ChangeLog |
134 |
grep -rl "/usr/coda/spool" "${S}"/*/* | xargs \ |
135 |
sed -i -e "s:/usr/coda/spool:/var/spool/coda:" \ |
136 |
|| die "setting FHS compliant paths failed" |
137 |
|
138 |
# coda/etc used to contain vstab file, which normally would reside in |
139 |
# /etc/coda. However this file was deprecated, so no special handling.. |
140 |
# do only subdirs here too. |
141 |
grep -rl "/usr/coda/etc" "${S}"/*/* | xargs \ |
142 |
sed -i -e "s:/usr/coda/etc:/var/log/coda:" \ |
143 |
|| die "setting FHS compliant paths failed" |
144 |
|
145 |
# stuff uder venus.cache need special care |
146 |
# "real cache" goues under /var/cache and pid related files under |
147 |
# /var/run |
148 |
grep -rl "cachedir=/usr/coda/venus.cache" "${S}"/* | xargs \ |
149 |
sed -i -e "s:cachedir=/usr/coda/venus.cache:cachedir=/var/cache/coda:" \ |
150 |
|| die "setting FHS compliant paths failed" |
151 |
sed -i -e "s:DFLT_CD \"/usr/coda/venus.cache\":DFLT_CD \"/var/cache/coda\":" \ |
152 |
"${S}"/coda-src/venus/venus.private.h || die "seding venus.private.h failed" |
153 |
grep -rl "/usr/coda/venus.cache" "${S}"/* | xargs \ |
154 |
sed -i -e "s:/usr/coda/venus.cache:/var/run/coda:" \ |
155 |
|| die "setting FHS compliant paths failed" |
156 |
|
157 |
# what's left in /usr/coda goes to /var/lib/coda |
158 |
# NOTE: dumplits.5 man page seems unduly touched by this sed, ignoring |
159 |
# for now.. |
160 |
grep -rl "/usr/coda" "${S}"/*/* | xargs \ |
161 |
sed -i -e "s:/usr/coda:/var/lib/coda:" \ |
162 |
|| die "setting FHS compliant paths failed" |
163 |
|
164 |
# move /coda to /mnt/coda |
165 |
grep -rle "[[:space:]\"=]/coda" "${S}"/*/* | xargs \ |
166 |
sed -i -e "s:\([[:space:]\"=]\)/coda:\1/mnt/coda:" \ |
167 |
|| die "setting FHS compliant paths failed" |
168 |
|
169 |
# move /vice and /vicepX under /var/lib/coda/ |
170 |
grep -rle "[[:space:]\"=\[]/vice" "${S}"/*/* | xargs \ |
171 |
sed -i -e "s:\([[:space:]\"=\[]\)/vice:\1/var/lib/coda/vice:g" \ |
172 |
|| die "setting FHS compliant paths failed" |
173 |
fi |
174 |
|
175 |
eautoreconf |
176 |
} |
177 |
|
178 |
my_build_venus_prereqs() { |
179 |
# Coda uses a recursive make with some directories depending |
180 |
# on objects built in other directories, so run make inside |
181 |
# the prerequisite dirs first. This builds everything required |
182 |
# by venus in the order listed in coda-src/Makefile.am. |
183 |
|
184 |
cd "${S}/lib-src" |
185 |
emake || die "emake failed" |
186 |
|
187 |
# auth2 depends on kerndep |
188 |
cd "${S}/coda-src/kerndep" |
189 |
emake || die "emake failed" |
190 |
|
191 |
# auth2 depends on util. |
192 |
cd "${S}/coda-src/util" |
193 |
emake || die "emake failed" |
194 |
|
195 |
# librepair depends on vicedep |
196 |
cd "${S}/coda-src/vicedep" |
197 |
emake || die "emake failed" |
198 |
|
199 |
# venus depends on dir |
200 |
cd "${S}/coda-src/dir" |
201 |
emake || die "emake failed" |
202 |
|
203 |
# venus depends on al |
204 |
cd "${S}/coda-src/al" |
205 |
emake || die "emake failed" |
206 |
|
207 |
# librepair depends on auth2 |
208 |
cd "${S}/coda-src/auth2" |
209 |
emake || die "emake failed" |
210 |
|
211 |
# venus depends on vv |
212 |
cd "${S}/coda-src/vv" |
213 |
emake || die "emake failed" |
214 |
|
215 |
# venus depends on lka |
216 |
cd "${S}/coda-src/lka" |
217 |
emake || die "emake failed" |
218 |
|
219 |
# venus depends on vol |
220 |
cd "${S}/coda-src/vol" |
221 |
emake || die "emake failed" |
222 |
|
223 |
# venus depends on librepair |
224 |
cd "${S}/coda-src/librepair" |
225 |
emake || die "emake failed" |
226 |
} |
227 |
|
228 |
src_compile() { |
229 |
local myflags="" |
230 |
|
231 |
# Coda uses type punning in a way that violates assumptions made by -O2 |
232 |
# and friends (via -fstrict-aliasing). Disable this optimization where |
233 |
# required. |
234 |
local my_safe_cflags="${CFLAGS} -fno-strict-aliasing" |
235 |
local my_safe_cxxflags="${CXXFLAGS} -fno-strict-aliasing" |
236 |
|
237 |
# Include the server/client code. |
238 |
use client && myflags="${myflags} --enable-client" |
239 |
use server && myflags="${myflags} --enable-server" |
240 |
|
241 |
# Enable kerboeros? |
242 |
if use kerberos; then |
243 |
myflags="${myflags} --with-crypto --with-krb5" |
244 |
myflags="${myflags} --with-krb5-includes=/usr/include/krb5" |
245 |
myflags="${myflags} --with-krb5-libs=/usr/lib" |
246 |
fi |
247 |
|
248 |
# Perform the actual configure. |
249 |
econf ${myflags} || die "configure failed" |
250 |
|
251 |
# Build any prerequisites for venus. |
252 |
my_build_venus_prereqs |
253 |
|
254 |
# Venus uses unsafe type punning, so disable |
255 |
# some optimizations for venus. |
256 |
pushd coda-src/venus |
257 |
emake \ |
258 |
CFLAGS="${my_safe_cflags}" \ |
259 |
CXXFLAGS="${my_safe_cxxflags}" \ |
260 |
|| die "emake failed" |
261 |
popd |
262 |
|
263 |
# Now run make in the source directory to finish the compile. |
264 |
emake -j1 || die "emake failed" |
265 |
} |
266 |
|
267 |
src_install () { |
268 |
emake DESTDIR="${D}" install |
269 |
|
270 |
dodoc INSTALL* README* NEWS ChangeLog AUTHORS |
271 |
|
272 |
use server && doinitd coda-src/scripts/codasrv |
273 |
use client && doinitd coda-src/scripts/venus |
274 |
|
275 |
# Fix conflict with backup.sh from tar |
276 |
mv -f "${D}"/usr/sbin/backup{,-coda}.sh |
277 |
|
278 |
if use coda_layout; then |
279 |
# Create coda specific layout |
280 |
dodir /usr/coda |
281 |
dodir /usr/coda/etc |
282 |
dodir /usr/coda/spool |
283 |
if use server; then |
284 |
dodir /vice |
285 |
dodir /vicepa |
286 |
fi |
287 |
if use client; then |
288 |
dodir /coda |
289 |
diropts -m0700 |
290 |
dodir /usr/coda/venus.cache |
291 |
fi |
292 |
else |
293 |
# Create FHS compliant layout |
294 |
dodir /var/lib/coda |
295 |
dodir /var/log/coda |
296 |
dodir /var/spool/coda |
297 |
|
298 |
if use server; then |
299 |
dodir /var/lib/coda/vice |
300 |
dodir /var/lib/coda/vicepa |
301 |
fi |
302 |
|
303 |
if use client; then |
304 |
dodir /mnt/coda |
305 |
dosym mnt/coda /coda |
306 |
diropts -m0700 |
307 |
dodir /var/cache/coda |
308 |
fi |
309 |
|
310 |
if use coda_symlinks; then |
311 |
# Symlink traditional coda dirs to gentoo dirs. |
312 |
# NOTE: /coda symlink is unconditional for compatibility of client apps |
313 |
dosym ../var/lib/coda /usr/coda |
314 |
if use server; then |
315 |
dosym var/lib/coda/vice /vice |
316 |
dosym var/lib/coda/vicepa /vicepa |
317 |
fi |
318 |
fi |
319 |
fi |
320 |
} |
321 |
|
322 |
pkg_preinst () { |
323 |
enewgroup codaroot |
324 |
enewuser codaroot -1 -1 -1 codaroot |
325 |
} |
326 |
|
327 |
pkg_postinst () { |
328 |
einfo |
329 |
elog "To enable the coda server at boot up, please do:" |
330 |
elog " rc-update add codasrv default" |
331 |
elog |
332 |
elog "To enable the coda client at boot up, do:" |
333 |
elog " rc-update add venus default" |
334 |
elog |
335 |
elog "To get started, run vice-setup and/or venus-setup." |
336 |
einfo |
337 |
} |