1 |
chainsaw 11/10/12 19:21:54 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.7.0.ebuild |
5 |
Log: |
6 |
New upstream release, bringing you "svn patch", "svnrdump", "svn upgrade" and many other goodies. The build system has changed significantly so a lot of patching has now gone. Please do file a bug if it seems that this causes issues. |
7 |
|
8 |
(Portage version: 2.1.10.25/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.59 dev-vcs/subversion/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.59&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.59&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?r1=1.58&r2=1.59 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v |
20 |
retrieving revision 1.58 |
21 |
retrieving revision 1.59 |
22 |
diff -u -r1.58 -r1.59 |
23 |
--- ChangeLog 2 Sep 2011 15:46:00 -0000 1.58 |
24 |
+++ ChangeLog 12 Oct 2011 19:21:54 -0000 1.59 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for dev-vcs/subversion |
27 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.58 2011/09/02 15:46:00 chainsaw Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.59 2011/10/12 19:21:54 chainsaw Exp $ |
30 |
+ |
31 |
+*subversion-1.7.0 (12 Oct 2011) |
32 |
+ |
33 |
+ 12 Oct 2011; Tony Vroon <chainsaw@g.o> +subversion-1.7.0.ebuild: |
34 |
+ New upstream release, bringing you "svn patch", "svnrdump", "svn upgrade" and |
35 |
+ many other goodies. The build system has changed significantly so a lot of |
36 |
+ patching has now gone. Please do file a bug if it seems that this causes |
37 |
+ issues. |
38 |
|
39 |
*subversion-1.6.17-r7 (02 Sep 2011) |
40 |
|
41 |
|
42 |
|
43 |
|
44 |
1.1 dev-vcs/subversion/subversion-1.7.0.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.7.0.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.7.0.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: subversion-1.7.0.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2011 Gentoo Foundation |
52 |
# Distributed under the terms of the GNU General Public License v2 |
53 |
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.7.0.ebuild,v 1.1 2011/10/12 19:21:54 chainsaw Exp $ |
54 |
|
55 |
EAPI="3" |
56 |
SUPPORT_PYTHON_ABIS="1" |
57 |
RESTRICT_PYTHON_ABIS="3.* *-jython" |
58 |
WANT_AUTOMAKE="none" |
59 |
MY_P="${P/_/-}" |
60 |
|
61 |
inherit autotools base bash-completion db-use depend.apache elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module python |
62 |
|
63 |
DESCRIPTION="Advanced version control system" |
64 |
HOMEPAGE="http://subversion.apache.org/" |
65 |
SRC_URI="http://www.apache.org/dist/${PN}/${MY_P}.tar.bz2" |
66 |
S="${WORKDIR}/${MY_P}" |
67 |
|
68 |
LICENSE="Subversion" |
69 |
SLOT="0" |
70 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
71 |
IUSE="apache2 berkdb ctypes-python debug doc +dso extras gnome-keyring java kde nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf" |
72 |
|
73 |
CDEPEND=">=dev-db/sqlite-3.4 |
74 |
>=dev-libs/apr-1.3:1 |
75 |
>=dev-libs/apr-util-1.3:1 |
76 |
dev-libs/expat |
77 |
sys-libs/zlib |
78 |
berkdb? ( >=sys-libs/db-4.0.14 ) |
79 |
ctypes-python? ( =dev-lang/python-2* ) |
80 |
gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring ) |
81 |
kde? ( sys-apps/dbus x11-libs/qt-core x11-libs/qt-dbus x11-libs/qt-gui >=kde-base/kdelibs-4 ) |
82 |
perl? ( dev-lang/perl ) |
83 |
python? ( =dev-lang/python-2* ) |
84 |
ruby? ( >=dev-lang/ruby-1.8.2 ) |
85 |
sasl? ( dev-libs/cyrus-sasl ) |
86 |
webdav-neon? ( >=net-libs/neon-0.28 ) |
87 |
webdav-serf? ( >=net-libs/serf-0.3.0 )" |
88 |
RDEPEND="${CDEPEND} |
89 |
apache2? ( www-servers/apache[apache2_modules_dav] ) |
90 |
java? ( >=virtual/jre-1.5 ) |
91 |
kde? ( kde-base/kwalletd ) |
92 |
nls? ( virtual/libintl ) |
93 |
perl? ( dev-perl/URI )" |
94 |
DEPEND="${CDEPEND} |
95 |
!!<sys-apps/sandbox-1.6 |
96 |
ctypes-python? ( dev-python/ctypesgen ) |
97 |
doc? ( app-doc/doxygen ) |
98 |
gnome-keyring? ( dev-util/pkgconfig ) |
99 |
java? ( >=virtual/jdk-1.5 ) |
100 |
kde? ( dev-util/pkgconfig ) |
101 |
nls? ( sys-devel/gettext ) |
102 |
webdav-neon? ( dev-util/pkgconfig )" |
103 |
|
104 |
PATCHES=( |
105 |
"${FILESDIR}/${PN}-1.5.4-interix.patch" |
106 |
"${FILESDIR}/${PN}-1.5.6-aix-dso.patch" |
107 |
"${FILESDIR}/${PN}-1.6.3-hpux-dso.patch" |
108 |
) |
109 |
|
110 |
want_apache |
111 |
|
112 |
pkg_setup() { |
113 |
if use berkdb; then |
114 |
local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
115 |
| grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
116 |
| sed 's:.*b::')" |
117 |
einfo |
118 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
119 |
if [[ -n "${apu_bdb_version}" ]]; then |
120 |
SVN_BDB_VERSION="${apu_bdb_version}" |
121 |
einfo "Matching db version to apr-util" |
122 |
else |
123 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
124 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
125 |
fi |
126 |
fi |
127 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
128 |
einfo |
129 |
|
130 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
131 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
132 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
133 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
134 |
eerror "Aborting to avoid possible run-time crashes." |
135 |
die "Berkeley DB version mismatch" |
136 |
fi |
137 |
fi |
138 |
|
139 |
depend.apache_pkg_setup |
140 |
|
141 |
java-pkg-opt-2_pkg_setup |
142 |
|
143 |
if use ctypes-python || use python; then |
144 |
python_pkg_setup |
145 |
fi |
146 |
|
147 |
if ! use webdav-neon && ! use webdav-serf; then |
148 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
149 |
ewarn "access repositories through the HTTP protocol." |
150 |
ewarn "Consider enabling one of the following USE-flags:" |
151 |
ewarn " webdav-neon webdav-serf" |
152 |
echo -ne "\a" |
153 |
fi |
154 |
|
155 |
if use debug; then |
156 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
157 |
fi |
158 |
|
159 |
# Allow for custom repository locations. |
160 |
SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
161 |
} |
162 |
|
163 |
src_prepare() { |
164 |
base_src_prepare |
165 |
fperms +x build/transform_libtool_scripts.sh |
166 |
|
167 |
sed -i \ |
168 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
169 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
170 |
|
171 |
sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed" |
172 |
|
173 |
# this bites us in particular on Solaris |
174 |
sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
175 |
die "/bin/sh is not POSIX shell!" |
176 |
|
177 |
eautoconf |
178 |
elibtoolize |
179 |
|
180 |
sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed" |
181 |
} |
182 |
|
183 |
src_configure() { |
184 |
local myconf |
185 |
|
186 |
if use python || use perl || use ruby; then |
187 |
myconf+=" --with-swig" |
188 |
else |
189 |
myconf+=" --without-swig" |
190 |
fi |
191 |
|
192 |
if use java; then |
193 |
myconf+=" --without-junit" |
194 |
fi |
195 |
|
196 |
if use kde || use nls; then |
197 |
myconf+=" --enable-nls" |
198 |
else |
199 |
myconf+=" --disable-nls" |
200 |
fi |
201 |
|
202 |
case ${CHOST} in |
203 |
*-solaris*) |
204 |
# -lintl isn't added for some reason (makes Neon check fail) |
205 |
use nls && append-libs -lintl |
206 |
;; |
207 |
*-aix*) |
208 |
# avoid recording immediate path to sharedlibs into executables |
209 |
append-ldflags -Wl,-bnoipath |
210 |
;; |
211 |
*-interix*) |
212 |
# loader crashes on the LD_PRELOADs... |
213 |
myconf="${myconf} --disable-local-library-preloading" |
214 |
;; |
215 |
esac |
216 |
|
217 |
econf --libdir="${EPREFIX}/usr/$(get_libdir)" \ |
218 |
$(use_with apache2 apxs "${APXS}") \ |
219 |
$(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \ |
220 |
$(use_with ctypes-python ctypesgen "${EPREFIX}/usr") \ |
221 |
$(use_enable dso runtime-module-search) \ |
222 |
$(use_with gnome-keyring) \ |
223 |
$(use_enable java javahl) \ |
224 |
$(use_with java jdk "${JAVA_HOME}") \ |
225 |
$(use_with kde kwallet) \ |
226 |
$(use_with sasl) \ |
227 |
$(use_with webdav-neon neon) \ |
228 |
$(use_with webdav-serf serf "${EPREFIX}/usr") \ |
229 |
${myconf} \ |
230 |
--with-apr="${EPREFIX}/usr/bin/apr-1-config" \ |
231 |
--with-apr-util="${EPREFIX}/usr/bin/apu-1-config" \ |
232 |
--disable-experimental-libtool \ |
233 |
--without-jikes \ |
234 |
--enable-local-library-preloading \ |
235 |
--disable-mod-activation \ |
236 |
--disable-neon-version-check \ |
237 |
--disable-static \ |
238 |
--with-sqlite="${EPREFIX}/usr" |
239 |
} |
240 |
|
241 |
src_compile() { |
242 |
emake local-all || die "Building of core of Subversion failed" |
243 |
|
244 |
if use ctypes-python; then |
245 |
python_copy_sources subversion/bindings/ctypes-python |
246 |
rm -fr subversion/bindings/ctypes-python |
247 |
ctypes_python_bindings_building() { |
248 |
rm -f subversion/bindings/ctypes-python |
249 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
250 |
emake ctypes-python |
251 |
} |
252 |
python_execute_function \ |
253 |
--action-message 'Building of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
254 |
--failure-message 'Building of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
255 |
ctypes_python_bindings_building |
256 |
fi |
257 |
|
258 |
if use python; then |
259 |
python_copy_sources subversion/bindings/swig/python |
260 |
rm -fr subversion/bindings/swig/python |
261 |
swig_python_bindings_building() { |
262 |
rm -f subversion/bindings/swig/python |
263 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
264 |
emake \ |
265 |
PYTHON_INCLUDES="-I${EPREFIX}$(python_get_includedir)" \ |
266 |
PYTHON_VERSION="$(python_get_version)" \ |
267 |
swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \ |
268 |
swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \ |
269 |
swig-py |
270 |
} |
271 |
python_execute_function \ |
272 |
--action-message 'Building of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
273 |
--failure-message 'Building of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
274 |
swig_python_bindings_building |
275 |
fi |
276 |
|
277 |
if use perl; then |
278 |
emake swig-pl || die "Building of Subversion SWIG Perl bindings failed" |
279 |
fi |
280 |
|
281 |
if use ruby; then |
282 |
emake swig-rb || die "Building of Subversion SWIG Ruby bindings failed" |
283 |
fi |
284 |
|
285 |
if use java; then |
286 |
emake -j1 JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl || die "Building of Subversion JavaHL library failed" |
287 |
fi |
288 |
|
289 |
if use extras; then |
290 |
emake tools || die "Building of tools failed" |
291 |
fi |
292 |
|
293 |
if use doc; then |
294 |
doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed" |
295 |
|
296 |
if use java; then |
297 |
emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed" |
298 |
fi |
299 |
fi |
300 |
} |
301 |
|
302 |
src_install() { |
303 |
emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed" |
304 |
|
305 |
if use ctypes-python; then |
306 |
ctypes_python_bindings_installation() { |
307 |
rm -f subversion/bindings/ctypes-python |
308 |
ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python |
309 |
emake DESTDIR="${D}" install-ctypes-python |
310 |
} |
311 |
python_execute_function \ |
312 |
--action-message 'Installation of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \ |
313 |
--failure-message 'Installation of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
314 |
ctypes_python_bindings_installation |
315 |
fi |
316 |
|
317 |
if use python; then |
318 |
swig_python_bindings_installation() { |
319 |
rm -f subversion/bindings/swig/python |
320 |
ln -s python-${PYTHON_ABI} subversion/bindings/swig/python |
321 |
emake \ |
322 |
DESTDIR="${D}" \ |
323 |
PYTHON_VERSION="$(python_get_version)" \ |
324 |
swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \ |
325 |
swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \ |
326 |
install-swig-py |
327 |
} |
328 |
python_execute_function \ |
329 |
--action-message 'Installation of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \ |
330 |
--failure-message 'Installation of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \ |
331 |
swig_python_bindings_installation |
332 |
fi |
333 |
|
334 |
if use ctypes-python || use python; then |
335 |
python_clean_installation_image -q |
336 |
fi |
337 |
|
338 |
if use perl; then |
339 |
emake DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion SWIG Perl bindings failed" |
340 |
fixlocalpod |
341 |
find "${ED}" "(" -name .packlist -o -name "*.bs" ")" -print0 | xargs -0 rm -fr |
342 |
fi |
343 |
|
344 |
if use ruby; then |
345 |
emake DESTDIR="${D}" install-swig-rb || die "Installation of Subversion SWIG Ruby bindings failed" |
346 |
fi |
347 |
|
348 |
if use java; then |
349 |
emake DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed" |
350 |
java-pkg_regso "${ED}"usr/$(get_libdir)/libsvnjavahl*.so |
351 |
java-pkg_dojar "${ED}"usr/$(get_libdir)/svn-javahl/svn-javahl.jar |
352 |
rm -fr "${ED}"usr/$(get_libdir)/svn-javahl/*.jar |
353 |
fi |
354 |
|
355 |
# Install Apache module configuration. |
356 |
if use apache2; then |
357 |
keepdir "${APACHE_MODULES_CONFDIR}" |
358 |
insinto "${APACHE_MODULES_CONFDIR}" |
359 |
doins "${FILESDIR}/47_mod_dav_svn.conf" |
360 |
fi |
361 |
|
362 |
# Install Bash Completion, bug 43179. |
363 |
dobashcompletion tools/client-side/bash_completion subversion |
364 |
rm -f tools/client-side/bash_completion |
365 |
|
366 |
# Install hot backup script, bug 54304. |
367 |
newbin tools/backup/hot-backup.py svn-hot-backup |
368 |
rm -fr tools/backup |
369 |
|
370 |
# Install svnserve init-script and xinet.d snippet, bug 43245. |
371 |
newinitd "${FILESDIR}"/svnserve.initd2 svnserve |
372 |
newconfd "${FILESDIR}"/svnserve.confd svnserve |
373 |
insinto /etc/xinetd.d |
374 |
newins "${FILESDIR}"/svnserve.xinetd svnserve |
375 |
|
376 |
# Install documentation. |
377 |
dodoc CHANGES COMMITTERS README |
378 |
dodoc tools/xslt/svnindex.{css,xsl} |
379 |
rm -fr tools/xslt |
380 |
|
381 |
# Install extra files. |
382 |
if use extras; then |
383 |
cat << EOF > 80subversion-extras |
384 |
PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
385 |
ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
386 |
EOF |
387 |
doenvd 80subversion-extras |
388 |
|
389 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
390 |
|
391 |
find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
392 |
rm -fr tools/client-side/svnmucc |
393 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
394 |
rm -fr tools/{buildbot,dev,diff,po} |
395 |
|
396 |
insinto /usr/share/${PN} |
397 |
doins -r tools |
398 |
fi |
399 |
|
400 |
if use doc; then |
401 |
dohtml -r doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
402 |
|
403 |
dodoc notes/* |
404 |
|
405 |
if use java; then |
406 |
java-pkg_dojavadoc doc/javadoc |
407 |
fi |
408 |
fi |
409 |
|
410 |
find "${D}" '(' -name '*.la' ')' -print0 | xargs -0 rm -f |
411 |
} |
412 |
|
413 |
pkg_preinst() { |
414 |
# Compare versions of Berkeley DB, bug 122877. |
415 |
if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]]; then |
416 |
OLD_BDB_VERSION="$(scanelf -nq "${EROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
417 |
NEW_BDB_VERSION="$(scanelf -nq "${ED}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
418 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
419 |
CHANGED_BDB_VERSION="1" |
420 |
fi |
421 |
fi |
422 |
} |
423 |
|
424 |
pkg_postinst() { |
425 |
use perl && perl-module_pkg_postinst |
426 |
|
427 |
if use ctypes-python; then |
428 |
python_mod_optimize csvn |
429 |
fi |
430 |
|
431 |
if use python; then |
432 |
python_mod_optimize libsvn svn |
433 |
fi |
434 |
|
435 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
436 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
437 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
438 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
439 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
440 |
fi |
441 |
|
442 |
ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
443 |
} |
444 |
|
445 |
pkg_postrm() { |
446 |
use perl && perl-module_pkg_postrm |
447 |
|
448 |
if use ctypes-python; then |
449 |
python_mod_cleanup csvn |
450 |
fi |
451 |
|
452 |
if use python; then |
453 |
python_mod_cleanup libsvn svn |
454 |
fi |
455 |
} |
456 |
|
457 |
pkg_config() { |
458 |
# Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
459 |
# already has EPREFIX in it |
460 |
einfo "Initializing the database in ${ROOT}${SVN_REPOS_LOC}..." |
461 |
if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]]; then |
462 |
echo "A Subversion repository already exists and I will not overwrite it." |
463 |
echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
464 |
else |
465 |
mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf" |
466 |
|
467 |
einfo "Populating repository directory..." |
468 |
# Create initial repository. |
469 |
"${EROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos" |
470 |
|
471 |
einfo "Setting repository permissions..." |
472 |
SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
473 |
SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
474 |
if use apache2; then |
475 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
476 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
477 |
else |
478 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
479 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
480 |
enewgroup "${SVNSERVE_GROUP}" |
481 |
enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}" |
482 |
fi |
483 |
chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos" |
484 |
chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf" |
485 |
chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos" |
486 |
fi |
487 |
} |