1 |
arfrever 09/03/22 02:07:57 |
2 |
|
3 |
Modified: metadata.xml ChangeLog |
4 |
Added: subversion-1.6.0.ebuild |
5 |
Log: |
6 |
Version bump. Delete .packlist files (bug #221179). |
7 |
(Portage version: 13139-svn/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.9 dev-util/subversion/metadata.xml |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/metadata.xml?rev=1.9&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/metadata.xml?rev=1.9&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/metadata.xml?r1=1.8&r2=1.9 |
15 |
|
16 |
Index: metadata.xml |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/metadata.xml,v |
19 |
retrieving revision 1.8 |
20 |
retrieving revision 1.9 |
21 |
diff -u -r1.8 -r1.9 |
22 |
--- metadata.xml 21 Mar 2009 00:45:31 -0000 1.8 |
23 |
+++ metadata.xml 22 Mar 2009 02:07:57 -0000 1.9 |
24 |
@@ -2,7 +2,7 @@ |
25 |
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> |
26 |
<pkgmetadata> |
27 |
<maintainer> |
28 |
- <email>Arfrever@g.o</email> |
29 |
+ <email>arfrever@g.o</email> |
30 |
<name>Arfrever Frehtes Taifersar Arahesis</name> |
31 |
<description>Gentoo Subversion maintainer and Subversion upstream representative</description> |
32 |
</maintainer> |
33 |
@@ -12,6 +12,7 @@ |
34 |
<description>Gentoo Subversion maintainer</description> |
35 |
</maintainer> |
36 |
<use> |
37 |
+ <flag name="ctypes-python">Build and install ctypes python bindings</flag> |
38 |
<flag name="dso">Enable runtime module search</flag> |
39 |
<flag name="extras">Install extras scripts (examples, tools, hooks)</flag> |
40 |
<flag name="nowebdav">Disables WebDAV support via neon library</flag> |
41 |
|
42 |
|
43 |
|
44 |
1.352 dev-util/subversion/ChangeLog |
45 |
|
46 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.352&view=markup |
47 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?rev=1.352&content-type=text/plain |
48 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/ChangeLog?r1=1.351&r2=1.352 |
49 |
|
50 |
Index: ChangeLog |
51 |
=================================================================== |
52 |
RCS file: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v |
53 |
retrieving revision 1.351 |
54 |
retrieving revision 1.352 |
55 |
diff -u -r1.351 -r1.352 |
56 |
--- ChangeLog 21 Mar 2009 00:45:31 -0000 1.351 |
57 |
+++ ChangeLog 22 Mar 2009 02:07:57 -0000 1.352 |
58 |
@@ -1,10 +1,18 @@ |
59 |
# ChangeLog for dev-util/subversion |
60 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
61 |
-# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.351 2009/03/21 00:45:31 arfrever Exp $ |
62 |
+# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/ChangeLog,v 1.352 2009/03/22 02:07:57 arfrever Exp $ |
63 |
+ |
64 |
+*subversion-1.6.0 (22 Mar 2009) |
65 |
+ |
66 |
+ 22 Mar 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
67 |
+ +files/subversion-1.6.0-disable_linking_against_unneeded_libraries.patch, |
68 |
+ +files/subversion-1.6.0-various_fixes.patch, metadata.xml, |
69 |
+ +subversion-1.6.0.ebuild: |
70 |
+ Version bump. Delete .packlist files (bug #221179). |
71 |
|
72 |
*subversion-1.5.6 (21 Mar 2009) |
73 |
|
74 |
- 21 Mar 2009; Arfrever Frehtes Taifersar Arahesis <Arfrever@g.o> |
75 |
+ 21 Mar 2009; Arfrever Frehtes Taifersar Arahesis <arfrever@g.o> |
76 |
+subversion-1.5.6.ebuild: |
77 |
Version bump (bug #260636). |
78 |
|
79 |
|
80 |
|
81 |
|
82 |
1.1 dev-util/subversion/subversion-1.6.0.ebuild |
83 |
|
84 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.0.ebuild?rev=1.1&view=markup |
85 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/dev-util/subversion/subversion-1.6.0.ebuild?rev=1.1&content-type=text/plain |
86 |
|
87 |
Index: subversion-1.6.0.ebuild |
88 |
=================================================================== |
89 |
# Copyright 1999-2009 Gentoo Foundation |
90 |
# Distributed under the terms of the GNU General Public License v2 |
91 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.6.0.ebuild,v 1.1 2009/03/22 02:07:57 arfrever Exp $ |
92 |
|
93 |
EAPI="1" |
94 |
|
95 |
WANT_AUTOMAKE="none" |
96 |
|
97 |
inherit autotools bash-completion db-use depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
98 |
|
99 |
DESCRIPTION="Advanced version control system" |
100 |
HOMEPAGE="http://subversion.tigris.org/" |
101 |
SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2" |
102 |
|
103 |
LICENSE="Subversion" |
104 |
SLOT="0" |
105 |
KEYWORDS="~amd64" |
106 |
IUSE="apache2 berkdb ctypes-python debug doc +dso emacs extras gnome-keyring java kde nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf" |
107 |
RESTRICT="test" |
108 |
|
109 |
CDEPEND=">=dev-db/sqlite-3.4 |
110 |
>=dev-libs/apr-1.3:1 |
111 |
>=dev-libs/apr-util-1.3:1 |
112 |
dev-libs/expat |
113 |
sys-libs/zlib |
114 |
berkdb? ( =sys-libs/db-4* ) |
115 |
emacs? ( virtual/emacs ) |
116 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
117 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui =kde-base/kdelibs-4* ) |
118 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
119 |
sasl? ( dev-libs/cyrus-sasl ) |
120 |
webdav-neon? ( >=net-misc/neon-0.28 ) |
121 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
122 |
|
123 |
RDEPEND="${CDEPEND} |
124 |
java? ( >=virtual/jre-1.5 ) |
125 |
nls? ( virtual/libintl ) |
126 |
perl? ( dev-perl/URI )" |
127 |
|
128 |
DEPEND="${CDEPEND} |
129 |
ctypes-python? ( dev-python/ctypesgen ) |
130 |
doc? ( app-doc/doxygen ) |
131 |
gnome-keyring? ( dev-util/pkgconfig ) |
132 |
java? ( >=virtual/jdk-1.5 ) |
133 |
kde? ( dev-util/pkgconfig ) |
134 |
nls? ( sys-devel/gettext ) |
135 |
webdav-neon? ( dev-util/pkgconfig )" |
136 |
|
137 |
want_apache |
138 |
|
139 |
S="${WORKDIR}/${P/_/-}" |
140 |
|
141 |
# Allow for custom repository locations. |
142 |
# This can't be in pkg_setup() because the variable needs to be available to pkg_config(). |
143 |
: ${SVN_REPOS_LOC:=/var/svn} |
144 |
|
145 |
pkg_setup() { |
146 |
if use kde && ! use nls; then |
147 |
eerror "Support for KWallet (KDE) requires Native Language Support (NLS)." |
148 |
die "Enable \"nls\" USE flag" |
149 |
fi |
150 |
|
151 |
java-pkg-opt-2_pkg_setup |
152 |
|
153 |
if ! use webdav-neon && ! use webdav-serf; then |
154 |
ewarn |
155 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
156 |
ewarn "access repositories through the HTTP protocol." |
157 |
ewarn |
158 |
ewarn "WebDAV support needs one of the following USE flags enabled:" |
159 |
ewarn " webdav-neon webdav-serf" |
160 |
ewarn |
161 |
ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:" |
162 |
ewarn " =${CATEGORY}/${PF} webdav-neon webdav-serf" |
163 |
ewarn |
164 |
ebeep |
165 |
fi |
166 |
} |
167 |
|
168 |
src_unpack() { |
169 |
unpack ${A} |
170 |
cd "${S}" |
171 |
|
172 |
epatch "${FILESDIR}/${P}-disable_linking_against_unneeded_libraries.patch" |
173 |
|
174 |
# Various fixes which will be included in 1.6.1. |
175 |
epatch "${FILESDIR}/${P}-various_fixes.patch" |
176 |
|
177 |
# Fix 2 messages in Polish translation. They will be fixed in 1.6.1. |
178 |
sed -e "7420d;8586d" -i subversion/po/pl.po |
179 |
|
180 |
sed -i \ |
181 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
182 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
183 |
|
184 |
sed -e "s:@bindir@/svn-contrib:@libdir@/subversion/bin:" \ |
185 |
-e "s:@bindir@/svn-tools:@libdir@/subversion/bin:" \ |
186 |
-i Makefile.in |
187 |
|
188 |
eautoconf |
189 |
elibtoolize |
190 |
} |
191 |
|
192 |
src_compile() { |
193 |
local myconf |
194 |
|
195 |
if use python || use perl || use ruby; then |
196 |
myconf="${myconf} --with-swig" |
197 |
else |
198 |
myconf="${myconf} --without-swig" |
199 |
fi |
200 |
|
201 |
if use debug; then |
202 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
203 |
fi |
204 |
|
205 |
append-flags -fno-strict-aliasing |
206 |
|
207 |
econf --libdir="/usr/$(get_libdir)" \ |
208 |
${myconf} \ |
209 |
$(use_with apache2 apxs "${APXS}") \ |
210 |
$(use_with berkdb berkeley-db "db.h:$(db_includedir 2>/dev/null)::$(db_libname 2>/dev/null)") \ |
211 |
$(use_with ctypes-python ctypesgen /usr) \ |
212 |
$(use_enable dso runtime-module-search) \ |
213 |
$(use_with gnome-keyring) \ |
214 |
$(use_enable java javahl) \ |
215 |
$(use_with java jdk "${JAVA_HOME}") \ |
216 |
$(use_with kde kwallet) \ |
217 |
$(use_enable nls) \ |
218 |
$(use_with sasl) \ |
219 |
$(use_with webdav-neon neon) \ |
220 |
$(use_with webdav-serf serf /usr) \ |
221 |
--with-apr=/usr/bin/apr-1-config \ |
222 |
--with-apr-util=/usr/bin/apu-1-config \ |
223 |
--disable-experimental-libtool \ |
224 |
--without-jikes \ |
225 |
--without-junit \ |
226 |
--disable-mod-activation \ |
227 |
--disable-neon-version-check \ |
228 |
--with-sqlite=/usr |
229 |
|
230 |
einfo |
231 |
einfo "Building of core of Subversion" |
232 |
einfo |
233 |
emake local-all || die "Building of core of Subversion failed" |
234 |
|
235 |
if use ctypes-python; then |
236 |
einfo |
237 |
einfo "Building of Subversion Ctypes Python bindings" |
238 |
einfo |
239 |
emake ctypes-python || die "Building of Subversion Ctypes Python bindings failed" |
240 |
fi |
241 |
|
242 |
if use python; then |
243 |
einfo |
244 |
einfo "Building of Subversion SWIG Python bindings" |
245 |
einfo |
246 |
emake swig-py || die "Building of Subversion SWIG Python bindings failed" |
247 |
fi |
248 |
|
249 |
if use perl; then |
250 |
einfo |
251 |
einfo "Building of Subversion SWIG Perl bindings" |
252 |
einfo |
253 |
emake -j1 swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
254 |
fi |
255 |
|
256 |
if use ruby; then |
257 |
einfo |
258 |
einfo "Building of Subversion SWIG Ruby bindings" |
259 |
einfo |
260 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
261 |
fi |
262 |
|
263 |
if use java; then |
264 |
einfo |
265 |
einfo "Building of Subversion JavaHL library" |
266 |
einfo |
267 |
make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \ |
268 |
|| die "Building of Subversion JavaHL library failed" |
269 |
fi |
270 |
|
271 |
if use emacs; then |
272 |
einfo |
273 |
einfo "Compilation of Emacs support" |
274 |
einfo |
275 |
elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el doc/svn-doc.el doc/tools/svnbook.el || die "Compilation of Emacs modules failed" |
276 |
fi |
277 |
|
278 |
if use extras; then |
279 |
einfo |
280 |
einfo "Building of contrib and tools" |
281 |
einfo |
282 |
emake contrib || die "Building of contrib failed" |
283 |
emake tools || die "Building of tools failed" |
284 |
fi |
285 |
|
286 |
if use doc; then |
287 |
einfo |
288 |
einfo "Building of Subversion HTML documentation" |
289 |
einfo |
290 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
291 |
|
292 |
if use java; then |
293 |
einfo |
294 |
einfo "Building of Subversion JavaHL library HTML documentation" |
295 |
einfo |
296 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
297 |
fi |
298 |
fi |
299 |
} |
300 |
|
301 |
src_install() { |
302 |
python_version |
303 |
PYTHON_DIR=/usr/$(get_libdir)/python${PYVER} |
304 |
|
305 |
einfo |
306 |
einfo "Installation of core of Subversion" |
307 |
einfo |
308 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
309 |
|
310 |
if use ctypes-python; then |
311 |
einfo |
312 |
einfo "Installation of Subversion Ctypes Python bindings" |
313 |
einfo |
314 |
emake DESTDIR="${D}" install-ctypes-python || die "Installation of Subversion Ctypes Python bindings failed" |
315 |
fi |
316 |
|
317 |
if use python; then |
318 |
einfo |
319 |
einfo "Installation of Subversion SWIG Python bindings" |
320 |
einfo |
321 |
emake -j1 DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}usr/$(get_libdir)" install-swig-py \ |
322 |
|| die "Installation of Subversion SWIG Python bindings failed" |
323 |
|
324 |
# Move Python bindings. |
325 |
dodir "${PYTHON_DIR}/site-packages" |
326 |
mv "${D}usr/$(get_libdir)/svn-python/svn" "${D}${PYTHON_DIR}/site-packages" |
327 |
mv "${D}usr/$(get_libdir)/svn-python/libsvn" "${D}${PYTHON_DIR}/site-packages" |
328 |
rm -fr "${D}usr/$(get_libdir)/svn-python" |
329 |
fi |
330 |
|
331 |
if use perl; then |
332 |
einfo |
333 |
einfo "Installation of Subversion SWIG Perl bindings" |
334 |
einfo |
335 |
emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
336 |
fixlocalpod |
337 |
find "${D}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
338 |
fi |
339 |
|
340 |
if use ruby; then |
341 |
einfo |
342 |
einfo "Installation of Subversion SWIG Ruby bindings" |
343 |
einfo |
344 |
emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
345 |
fi |
346 |
|
347 |
if use java; then |
348 |
einfo |
349 |
einfo "Installation of Subversion JavaHL library" |
350 |
einfo |
351 |
emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
352 |
java-pkg_regso "${D}"usr/$(get_libdir)/libsvnjavahl*.so |
353 |
java-pkg_dojar "${D}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
354 |
rm -fr "${D}"usr/$(get_libdir)/svn-javahl/*.jar |
355 |
fi |
356 |
|
357 |
# Install Apache module configuration. |
358 |
if use apache2; then |
359 |
dodir "${APACHE_MODULES_CONFDIR}" |
360 |
cat <<EOF >"${D}${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf |
361 |
<IfDefine SVN> |
362 |
LoadModule dav_svn_module modules/mod_dav_svn.so |
363 |
<IfDefine SVN_AUTHZ> |
364 |
LoadModule authz_svn_module modules/mod_authz_svn.so |
365 |
</IfDefine> |
366 |
|
367 |
# Example configuration: |
368 |
#<Location /svn/repos> |
369 |
# DAV svn |
370 |
# SVNPath ${SVN_REPOS_LOC}/repos |
371 |
# AuthType Basic |
372 |
# AuthName "Subversion repository" |
373 |
# AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers |
374 |
# Require valid-user |
375 |
#</Location> |
376 |
</IfDefine> |
377 |
EOF |
378 |
fi |
379 |
|
380 |
# Install Bash Completion, bug 43179. |
381 |
dobashcompletion tools/client-side/bash_completion subversion |
382 |
rm -f tools/client-side/bash_completion |
383 |
|
384 |
# Install hot backup script, bug 54304. |
385 |
newbin tools/backup/hot-backup.py svn-hot-backup |
386 |
rm -fr tools/backup |
387 |
|
388 |
# Install svn_load_dirs.pl. |
389 |
if use perl; then |
390 |
dobin contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
391 |
fi |
392 |
rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl |
393 |
|
394 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
395 |
newinitd "${FILESDIR}"/svnserve.initd svnserve |
396 |
if use apache2; then |
397 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
398 |
else |
399 |
newconfd "${FILESDIR}"/svnserve.confd2 svnserve |
400 |
fi |
401 |
insinto /etc/xinetd.d |
402 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
403 |
|
404 |
# Install documentation. |
405 |
dodoc CHANGES COMMITTERS README |
406 |
dohtml www/hacking.html |
407 |
dodoc tools/xslt/svnindex.{css,xsl} |
408 |
rm -fr tools/xslt |
409 |
|
410 |
# Install Vim syntax files. |
411 |
if use vim-syntax; then |
412 |
insinto /usr/share/vim/vimfiles/syntax |
413 |
doins contrib/client-side/vim/svn.vim |
414 |
fi |
415 |
rm -f contrib/client-side/vim/svn.vim |
416 |
|
417 |
# Install Emacs Lisps. |
418 |
if use emacs; then |
419 |
elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} || die "Installation of Emacs modules failed" |
420 |
elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} || die "Installation of Emacs modules failed" |
421 |
touch "${D}${SITELISP}/${PN}/compat/.nosearch" |
422 |
elisp-site-file-install "${FILESDIR}/1.5.0/70svn-gentoo.el" || die "Installation of Emacs site-init file failed" |
423 |
fi |
424 |
rm -fr contrib/client-side/emacs |
425 |
|
426 |
# Install extra files. |
427 |
if use extras; then |
428 |
einfo |
429 |
einfo "Installation of contrib and tools" |
430 |
einfo |
431 |
doenvd "${FILESDIR}/1.5.0/80subversion-extras" |
432 |
emake DESTDIR="${D}" install-contrib || die "Installation of contrib failed" |
433 |
emake DESTDIR="${D}" install-tools || die "Installation of tools failed" |
434 |
|
435 |
find contrib tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
436 |
rm -fr contrib/client-side/svn-push |
437 |
rm -fr contrib/server-side/svnstsw |
438 |
rm -fr tools/client-side/svnmucc |
439 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
440 |
rm -fr tools/{buildbot,dev,diff,po} |
441 |
|
442 |
insinto /usr/share/${PN} |
443 |
doins -r contrib tools |
444 |
fi |
445 |
|
446 |
if use doc; then |
447 |
einfo |
448 |
einfo "Installation of Subversion HTML documentation" |
449 |
einfo |
450 |
dohtml doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
451 |
|
452 |
insinto /usr/share/doc/${PF} |
453 |
doins -r notes |
454 |
ecompressdir /usr/share/doc/${PF}/notes |
455 |
|
456 |
# if use ruby; then |
457 |
# make DESTDIR="${D}" install-swig-rb-doc |
458 |
# fi |
459 |
|
460 |
if use java; then |
461 |
java-pkg_dojavadoc doc/javadoc |
462 |
fi |
463 |
fi |
464 |
} |
465 |
|
466 |
pkg_preinst() { |
467 |
# Compare versions of Berkeley DB, bug 122877. |
468 |
if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]]; then |
469 |
OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
470 |
NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
471 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
472 |
CHANGED_BDB_VERSION=1 |
473 |
fi |
474 |
fi |
475 |
} |
476 |
|
477 |
pkg_postinst() { |
478 |
use emacs && elisp-site-regen |
479 |
use perl && perl-module_pkg_postinst |
480 |
|
481 |
if use ctypes-python; then |
482 |
python_mod_compile "$(python_get_sitedir)/csvn/"{.,core,ext}/*.py |
483 |
fi |
484 |
|
485 |
elog "Subversion Server Notes" |
486 |
elog "-----------------------" |
487 |
elog |
488 |
elog "If you intend to run a server, a repository needs to be created using" |
489 |
elog "svnadmin (see man svnadmin) or the following command to create it in" |
490 |
elog "${SVN_REPOS_LOC}:" |
491 |
elog |
492 |
elog " emerge --config =${CATEGORY}/${PF}" |
493 |
elog |
494 |
elog "Subversion has multiple server types, take your pick:" |
495 |
elog |
496 |
elog " - svnserve daemon: " |
497 |
elog " 1. Edit /etc/conf.d/svnserve" |
498 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
499 |
elog " 3. Start daemon: /etc/init.d/svnserve start" |
500 |
elog " 4. Make persistent: rc-update add svnserve default" |
501 |
elog |
502 |
elog " - svnserve via xinetd:" |
503 |
elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)" |
504 |
elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")" |
505 |
elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart" |
506 |
elog |
507 |
elog " - svn over ssh:" |
508 |
elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")" |
509 |
elog " Additionally run:" |
510 |
elog " groupadd svnusers" |
511 |
elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos" |
512 |
elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you" |
513 |
elog " want, for example:" |
514 |
elog " #!/bin/bash" |
515 |
elog " . /etc/conf.d/svnserve" |
516 |
elog " umask 007" |
517 |
elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\"" |
518 |
elog |
519 |
|
520 |
if use apache2; then |
521 |
elog " - http-based server:" |
522 |
elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\"" |
523 |
elog " 2. Create an htpasswd file:" |
524 |
elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME" |
525 |
elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")" |
526 |
elog " 4. Restart Apache: /etc/init.d/apache2 restart" |
527 |
elog |
528 |
fi |
529 |
|
530 |
elog " Fixing the repository permissions:" |
531 |
elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf" |
532 |
elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos" |
533 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db" |
534 |
elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks" |
535 |
elog |
536 |
|
537 |
elog "If you intend to use svn-hot-backup, you can specify the number of" |
538 |
elog "backups to keep per repository by specifying an environment variable." |
539 |
elog "If you want to keep e.g. 2 backups, do the following:" |
540 |
elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion" |
541 |
elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion" |
542 |
elog |
543 |
|
544 |
elog "Subversion contains support for the use of Memcached" |
545 |
elog "to cache data of FSFS repositories." |
546 |
elog "You should install \"net-misc/memcached\", start memcached" |
547 |
elog "and configure your FSFS repositories, if you want to use this feature." |
548 |
elog "See the documentation for details." |
549 |
elog |
550 |
epause 6 |
551 |
|
552 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
553 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
554 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
555 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
556 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
557 |
fi |
558 |
} |
559 |
|
560 |
pkg_postrm() { |
561 |
use emacs && elisp-site-regen |
562 |
use perl && perl-module_pkg_postrm |
563 |
|
564 |
if use ctypes-python; then |
565 |
python_mod_cleanup |
566 |
fi |
567 |
} |
568 |
|
569 |
pkg_config() { |
570 |
if [[ ! -x "${ROOT}usr/bin/svnadmin" ]]; then |
571 |
die "You seem to only have built the Subversion client" |
572 |
fi |
573 |
|
574 |
einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..." |
575 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
576 |
echo "A Subversion repository already exists and I will not overwrite it." |
577 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
578 |
else |
579 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
580 |
|
581 |
einfo ">>> Populating repository directory ..." |
582 |
# Create initial repository. |
583 |
"${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
584 |
|
585 |
einfo ">>> Setting repository permissions ..." |
586 |
SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
587 |
SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
588 |
if use apache2; then |
589 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
590 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
591 |
else |
592 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
593 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
594 |
enewgroup "${SVNSERVE_GROUP}" |
595 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
596 |
fi |
597 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
598 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
599 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
600 |
fi |
601 |
} |