1 |
tommy 12/08/21 20:05:14 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: subversion-1.7.6.ebuild |
5 |
Log: |
6 |
Version bump, fixes bug 421575, add GPL-2 to the license var, fixes bug 425940, convert shebang for tools, fixes bug 415507 |
7 |
|
8 |
(Portage version: 2.2.0_alpha116-r1/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.80 dev-vcs/subversion/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.80&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?rev=1.80&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/ChangeLog?r1=1.79&r2=1.80 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v |
20 |
retrieving revision 1.79 |
21 |
retrieving revision 1.80 |
22 |
diff -u -r1.79 -r1.80 |
23 |
--- ChangeLog 20 Aug 2012 20:31:05 -0000 1.79 |
24 |
+++ ChangeLog 21 Aug 2012 20:05:14 -0000 1.80 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for dev-vcs/subversion |
27 |
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.79 2012/08/20 20:31:05 tommy Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/ChangeLog,v 1.80 2012/08/21 20:05:14 tommy Exp $ |
30 |
+ |
31 |
+*subversion-1.7.6 (21 Aug 2012) |
32 |
+ |
33 |
+ 21 Aug 2012; Thomas Sachau (Tommy[D]) <tommy@g.o> |
34 |
+ +subversion-1.7.6.ebuild, |
35 |
+ +files/subversion-1.7.6-revert-mod_dontdothat-move.patch: |
36 |
+ Version bump, fixes bug 421575, add GPL-2 to the license var, fixes bug |
37 |
+ 425940, convert shebang for tools, fixes bug 415507 |
38 |
|
39 |
20 Aug 2012; Thomas Sachau (Tommy[D]) <tommy@g.o> |
40 |
subversion-1.6.17-r7.ebuild: |
41 |
|
42 |
|
43 |
|
44 |
1.1 dev-vcs/subversion/subversion-1.7.6.ebuild |
45 |
|
46 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.7.6.ebuild?rev=1.1&view=markup |
47 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-vcs/subversion/subversion-1.7.6.ebuild?rev=1.1&content-type=text/plain |
48 |
|
49 |
Index: subversion-1.7.6.ebuild |
50 |
=================================================================== |
51 |
# Copyright 1999-2012 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.6.ebuild,v 1.1 2012/08/21 20:05:14 tommy Exp $ |
54 |
|
55 |
EAPI="3" |
56 |
SUPPORT_PYTHON_ABIS="1" |
57 |
RESTRICT_PYTHON_ABIS="3.* *-jython *-pypy-*" |
58 |
WANT_AUTOMAKE="none" |
59 |
MY_P="${P/_/-}" |
60 |
|
61 |
inherit autotools bash-completion-r1 db-use depend.apache elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module python eutils |
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 GPL-2" |
69 |
SLOT="0" |
70 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~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:4 x11-libs/qt-dbus:4 x11-libs/qt-gui:4 >=kde-base/kdelibs-4:4 ) |
82 |
perl? ( dev-lang/perl ) |
83 |
python? ( =dev-lang/python-2* ) |
84 |
ruby? ( >=dev-lang/ruby-1.8.2:1.8 ) |
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? ( virtual/pkgconfig ) |
99 |
java? ( >=virtual/jdk-1.5 ) |
100 |
kde? ( virtual/pkgconfig ) |
101 |
nls? ( sys-devel/gettext ) |
102 |
webdav-neon? ( virtual/pkgconfig )" |
103 |
|
104 |
want_apache |
105 |
|
106 |
pkg_setup() { |
107 |
if use berkdb; then |
108 |
local apu_bdb_version="$(${EPREFIX}/usr/bin/apu-1-config --includes \ |
109 |
| grep -Eoe '-I${EPREFIX}/usr/include/db[[:digit:]]\.[[:digit:]]' \ |
110 |
| sed 's:.*b::')" |
111 |
einfo |
112 |
if [[ -z "${SVN_BDB_VERSION}" ]]; then |
113 |
if [[ -n "${apu_bdb_version}" ]]; then |
114 |
SVN_BDB_VERSION="${apu_bdb_version}" |
115 |
einfo "Matching db version to apr-util" |
116 |
else |
117 |
SVN_BDB_VERSION="$(db_ver_to_slot "$(db_findver sys-libs/db 2>/dev/null)")" |
118 |
einfo "SVN_BDB_VERSION variable isn't set. You can set it to enforce using of specific version of Berkeley DB." |
119 |
fi |
120 |
fi |
121 |
einfo "Using: Berkeley DB ${SVN_BDB_VERSION}" |
122 |
einfo |
123 |
|
124 |
if [[ -n "${apu_bdb_version}" && "${SVN_BDB_VERSION}" != "${apu_bdb_version}" ]]; then |
125 |
eerror "APR-Util is linked against Berkeley DB ${apu_bdb_version}, but you are trying" |
126 |
eerror "to build Subversion with support for Berkeley DB ${SVN_BDB_VERSION}." |
127 |
eerror "Rebuild dev-libs/apr-util or set SVN_BDB_VERSION=\"${apu_bdb_version}\"." |
128 |
eerror "Aborting to avoid possible run-time crashes." |
129 |
die "Berkeley DB version mismatch" |
130 |
fi |
131 |
fi |
132 |
|
133 |
depend.apache_pkg_setup |
134 |
|
135 |
java-pkg-opt-2_pkg_setup |
136 |
|
137 |
if use ctypes-python || use python; then |
138 |
python_pkg_setup |
139 |
fi |
140 |
|
141 |
if ! use webdav-neon && ! use webdav-serf; then |
142 |
ewarn "WebDAV support is disabled. You need WebDAV to" |
143 |
ewarn "access repositories through the HTTP protocol." |
144 |
ewarn "Consider enabling one of the following USE-flags:" |
145 |
ewarn " webdav-neon webdav-serf" |
146 |
echo -ne "\a" |
147 |
fi |
148 |
|
149 |
if use debug; then |
150 |
append-cppflags -DSVN_DEBUG -DAP_DEBUG |
151 |
fi |
152 |
|
153 |
# Allow for custom repository locations. |
154 |
SVN_REPOS_LOC="${SVN_REPOS_LOC:-${EPREFIX}/var/svn}" |
155 |
} |
156 |
|
157 |
src_prepare() { |
158 |
epatch "${FILESDIR}"/${PN}-1.5.4-interix.patch \ |
159 |
"${FILESDIR}"/${PN}-1.5.6-aix-dso.patch \ |
160 |
"${FILESDIR}"/${PN}-1.6.3-hpux-dso.patch \ |
161 |
"${FILESDIR}"/${PN}-fix-parallel-build-support-for-perl-bindings.patch \ |
162 |
"${FILESDIR}"/${P}-revert-mod_dontdothat-move.patch |
163 |
|
164 |
fperms +x build/transform_libtool_scripts.sh |
165 |
|
166 |
sed -i \ |
167 |
-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \ |
168 |
-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac |
169 |
|
170 |
sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed" |
171 |
|
172 |
# this bites us in particular on Solaris |
173 |
sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \ |
174 |
die "/bin/sh is not POSIX shell!" |
175 |
|
176 |
eautoconf |
177 |
elibtoolize |
178 |
|
179 |
sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed" |
180 |
} |
181 |
|
182 |
src_configure() { |
183 |
local myconf |
184 |
|
185 |
if use python || use perl || use ruby; then |
186 |
myconf+=" --with-swig" |
187 |
else |
188 |
myconf+=" --without-swig" |
189 |
fi |
190 |
|
191 |
if use java; then |
192 |
myconf+=" --without-junit" |
193 |
fi |
194 |
|
195 |
if use kde || use nls; then |
196 |
myconf+=" --enable-nls" |
197 |
else |
198 |
myconf+=" --disable-nls" |
199 |
fi |
200 |
|
201 |
case ${CHOST} in |
202 |
*-aix*) |
203 |
# avoid recording immediate path to sharedlibs into executables |
204 |
append-ldflags -Wl,-bnoipath |
205 |
;; |
206 |
*-interix*) |
207 |
# loader crashes on the LD_PRELOADs... |
208 |
myconf+=" --disable-local-library-preloading" |
209 |
;; |
210 |
esac |
211 |
|
212 |
#workaround for bug 387057 |
213 |
has_version =dev-vcs/subversion-1.6* && myconf+=" --disable-disallowing-of-undefined-references" |
214 |
|
215 |
#force ruby-1.8 for bug 399105 |
216 |
ac_cv_path_RUBY="${EPREFIX}"/usr/bin/ruby18 ac_cv_path_RDOC="${EPREFIX}"/usr/bin/rdoc18 \ |
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*$(get_libname) |
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 |
newbashcomp 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 |
#adjust default user and group with disabled apache2 USE flag, bug 381385 |
377 |
use apache2 || sed -e "s\USER:-apache\USER:-svn\g" \ |
378 |
-e "s\GROUP:-apache\GROUP:-svnusers\g" \ |
379 |
-i "${ED}"etc/init.d/svnserve || die |
380 |
use apache2 || sed -e "0,/apache/s//svn/" \ |
381 |
-e "s:apache:svnusers:" \ |
382 |
-i "${ED}"etc/xinetd.d/svnserve || die |
383 |
|
384 |
# Install documentation. |
385 |
dodoc CHANGES COMMITTERS README |
386 |
dodoc tools/xslt/svnindex.{css,xsl} |
387 |
rm -fr tools/xslt |
388 |
|
389 |
# Install extra files. |
390 |
if use extras; then |
391 |
cat << EOF > 80subversion-extras |
392 |
PATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
393 |
ROOTPATH="${EPREFIX}/usr/$(get_libdir)/subversion/bin" |
394 |
EOF |
395 |
doenvd 80subversion-extras |
396 |
|
397 |
emake DESTDIR="${D}" toolsdir="/usr/$(get_libdir)/subversion/bin" install-tools || die "Installation of tools failed" |
398 |
|
399 |
find tools "(" -name "*.bat" -o -name "*.in" -o -name ".libs" ")" -print0 | xargs -0 rm -fr |
400 |
rm -fr tools/client-side/svnmucc |
401 |
rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}* |
402 |
rm -fr tools/{buildbot,dev,diff,po} |
403 |
|
404 |
insinto /usr/share/${PN} |
405 |
python_convert_shebangs -r 2 tools |
406 |
doins -r tools |
407 |
fi |
408 |
|
409 |
if use doc; then |
410 |
dohtml -r doc/doxygen/html/* || die "Installation of Subversion HTML documentation failed" |
411 |
|
412 |
dodoc notes/* |
413 |
|
414 |
if use java; then |
415 |
java-pkg_dojavadoc doc/javadoc |
416 |
fi |
417 |
fi |
418 |
|
419 |
find "${ED}" '(' -name '*.la' ')' -print0 | xargs -0 rm -f |
420 |
|
421 |
cd "${ED}"usr/share/locale |
422 |
for i in * ; do |
423 |
[[ $i == *$LINGUAS* ]] || { rm -r $i || die ; } |
424 |
done |
425 |
} |
426 |
|
427 |
pkg_preinst() { |
428 |
# Compare versions of Berkeley DB, bug 122877. |
429 |
if use berkdb && [[ -f "${EROOT}usr/bin/svn" ]]; then |
430 |
OLD_BDB_VERSION="$(scanelf -nq "${EROOT}usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
431 |
NEW_BDB_VERSION="$(scanelf -nq "${ED}usr/$(get_libdir)/libsvn_subr-1$(get_libname 0)" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")" |
432 |
if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]]; then |
433 |
CHANGED_BDB_VERSION="1" |
434 |
fi |
435 |
fi |
436 |
} |
437 |
|
438 |
pkg_postinst() { |
439 |
use perl && perl-module_pkg_postinst |
440 |
|
441 |
if use ctypes-python; then |
442 |
python_mod_optimize csvn |
443 |
fi |
444 |
|
445 |
if use python; then |
446 |
python_mod_optimize libsvn svn |
447 |
fi |
448 |
|
449 |
if [[ -n "${CHANGED_BDB_VERSION}" ]]; then |
450 |
ewarn "You upgraded from an older version of Berkeley DB and may experience" |
451 |
ewarn "problems with your repository. Run the following commands as root to fix it:" |
452 |
ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos" |
453 |
ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos" |
454 |
fi |
455 |
|
456 |
ewarn "If you run subversion as a daemon, you will need to restart it to avoid module mismatches." |
457 |
} |
458 |
|
459 |
pkg_postrm() { |
460 |
use perl && perl-module_pkg_postrm |
461 |
|
462 |
if use ctypes-python; then |
463 |
python_mod_cleanup csvn |
464 |
fi |
465 |
|
466 |
if use python; then |
467 |
python_mod_cleanup libsvn svn |
468 |
fi |
469 |
} |
470 |
|
471 |
pkg_config() { |
472 |
# Remember: Don't use ${EROOT}${SVN_REPOS_LOC} since ${SVN_REPOS_LOC} |
473 |
# already has EPREFIX in it |
474 |
einfo "Initializing the database in ${SVN_REPOS_LOC}..." |
475 |
if [[ -e "${SVN_REPOS_LOC}/repos" ]]; then |
476 |
echo "A Subversion repository already exists and I will not overwrite it." |
477 |
echo "Delete \"${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version." |
478 |
else |
479 |
mkdir -p "${SVN_REPOS_LOC}/conf" |
480 |
|
481 |
einfo "Populating repository directory..." |
482 |
# Create initial repository. |
483 |
"${EROOT}usr/bin/svnadmin" create "${SVN_REPOS_LOC}/repos" |
484 |
|
485 |
einfo "Setting repository permissions..." |
486 |
SVNSERVE_USER="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_USER}")" |
487 |
SVNSERVE_GROUP="$(. "${EROOT}etc/conf.d/svnserve"; echo "${SVNSERVE_GROUP}")" |
488 |
if use apache2; then |
489 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache" |
490 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache" |
491 |
else |
492 |
[[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn" |
493 |
[[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers" |
494 |
fi |
495 |
chmod -Rf go-rwx "${SVN_REPOS_LOC}/conf" |
496 |
chmod -Rf o-rwx "${SVN_REPOS_LOC}/repos" |
497 |
echo "Please create \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
498 |
echo "Afterwards please create \"${SVNSERVE_USER}\" user with homedir \"${SVN_REPOS_LOC}\"" |
499 |
echo "and as part of the \"${SVNSERVE_GROUP}\" group if it does not exist yet." |
500 |
echo "Finally, execute \"chown -Rf ${SVNSERVE_USER}:${SVNSERVE_GROUP} ${SVN_REPOS_LOC}/repos\"" |
501 |
echo "to finish the configuration." |
502 |
fi |
503 |
} |