annotate dev-util/subversion/subversion-1.5.6.ebuild @ 135:d836e68caf96

bump samba to 3.3.5
author holger
date Tue, 16 Jun 2009 19:45:06 +0200
parents ee276ccfcc7b
children 3ba6723f8197
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
87
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
1 # Copyright 1999-2008 Gentoo Foundation
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
2 # Distributed under the terms of the GNU General Public License v2
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
3 # $Header: /var/cvsroot/gentoo-x86/dev-util/subversion/subversion-1.5.4.ebuild,v 1.11 2008/12/07 12:13:48 vapier Exp $
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
4
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
5 EAPI="1"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
6 WANT_AUTOMAKE="none"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
7
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
8 inherit autotools bash-completion confutils depend.apache elisp-common eutils flag-o-matic java-pkg-opt-2 libtool multilib perl-module python
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
9
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
10 DESCRIPTION="Advanced version control system"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
11 HOMEPAGE="http://subversion.tigris.org/"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
12 SRC_URI="http://subversion.tigris.org/downloads/${P/_/-}.tar.bz2"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
13
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
14 LICENSE="Subversion"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
15 SLOT="0"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
16 KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
17 IUSE="apache2 berkdb debug doc +dso emacs extras java nls perl python ruby sasl vim-syntax +webdav-neon webdav-serf"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
18 RESTRICT="test"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
19
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
20 CDEPEND=">=dev-libs/apr-1.2.8
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
21 >=dev-libs/apr-util-1.2.8
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
22 dev-libs/expat
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
23 sys-libs/zlib
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
24 berkdb? ( =sys-libs/db-4* )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
25 emacs? ( virtual/emacs )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
26 ruby? ( >=dev-lang/ruby-1.8.2 )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
27 sasl? ( dev-libs/cyrus-sasl )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
28 webdav-neon? ( >=net-misc/neon-0.28 )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
29 webdav-serf? ( net-libs/serf )"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
30
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
31 RDEPEND="${CDEPEND}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
32 java? ( >=virtual/jre-1.5 )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
33 nls? ( virtual/libintl )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
34 perl? ( dev-perl/URI )"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
35
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
36 DEPEND="${CDEPEND}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
37 doc? ( app-doc/doxygen )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
38 java? ( >=virtual/jdk-1.5 )
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
39 nls? ( sys-devel/gettext )"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
40
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
41 want_apache
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
42
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
43 S="${WORKDIR}"/${P/_/-}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
44
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
45 # Allow for custom repository locations.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
46 # This can't be in pkg_setup because the variable needs to be available to
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
47 # pkg_config.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
48 : ${SVN_REPOS_LOC:=/var/svn}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
49
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
50 pkg_setup() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
51 confutils_use_depend_built_with_all berkdb dev-libs/apr-util berkdb
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
52 java-pkg-opt-2_pkg_setup
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
53
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
54 if ! use webdav-neon && ! use webdav-serf; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
55 ewarn
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
56 ewarn "WebDAV support is disabled. You need WebDAV to"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
57 ewarn "access repositories through the HTTP protocol."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
58 ewarn
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
59 ewarn "WebDAV support needs one of the following USE flags enabled:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
60 ewarn " webdav-neon webdav-serf"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
61 ewarn
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
62 ewarn "You can do this by enabling one of these flags in /etc/portage/package.use:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
63 ewarn " =${CATEGORY}/${PF} webdav-neon webdav-serf"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
64 ewarn
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
65 ebeep
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
66 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
67 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
68
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
69 src_unpack() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
70 unpack ${A}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
71 cd "${S}"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
72
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
73 epatch "${FILESDIR}"/1.5.0/disable-unneeded-linking.patch
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
74
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
75 sed -i \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
76 -e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
77 -e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
78
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
79 sed -e 's:@bindir@/svn-contrib:@libdir@/subversion/bin:' \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
80 -e 's:@bindir@/svn-tools:@libdir@/subversion/bin:' \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
81 -i Makefile.in
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
82
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
83 eautoconf
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
84 elibtoolize
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
85 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
86
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
87 src_compile() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
88 local myconf
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
89
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
90 if use python || use perl || use ruby; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
91 myconf="${myconf} --with-swig"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
92 else
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
93 myconf="${myconf} --without-swig"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
94 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
95
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
96 if use debug; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
97 append-cppflags -DSVN_DEBUG -DAP_DEBUG
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
98 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
99
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
100 append-flags -fno-strict-aliasing
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
101
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
102 econf ${myconf} \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
103 $(use_with apache2 apxs "${APXS}") \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
104 $(use_with berkdb berkeley-db) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
105 $(use_enable dso runtime-module-search) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
106 $(use_enable java javahl) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
107 $(use_with java jdk "${JAVA_HOME}") \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
108 $(use_enable nls) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
109 $(use_with sasl) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
110 $(use_with webdav-neon neon /usr) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
111 $(use_with webdav-serf serf /usr) \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
112 --with-apr=/usr/bin/apr-1-config \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
113 --with-apr-util=/usr/bin/apu-1-config \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
114 --disable-experimental-libtool \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
115 --without-jikes \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
116 --without-junit \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
117 --disable-mod-activation
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
118
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
119 emake local-all || die "Building of core Subversion failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
120
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
121 if use python; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
122 emake swig-py || die "Building of Subversion Python bindings failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
123 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
124
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
125 if use perl; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
126 emake -j1 swig-pl || die "Building of Subversion Perl bindings failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
127 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
128
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
129 if use ruby; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
130 emake swig-rb || die "Building of Subversion Ruby bindings failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
131 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
132
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
133 if use java; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
134 make JAVAC_FLAGS="$(java-pkg_javac-args) -encoding iso8859-1" javahl \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
135 || die "Building of Subversion JavaHL library failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
136 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
137
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
138 if use emacs; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
139 elisp-compile contrib/client-side/emacs/{dsvn,psvn,vc-svn}.el \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
140 doc/svn-doc.el doc/tools/svnbook.el \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
141 || die "Compilation of Emacs modules failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
142 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
143
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
144 if use extras; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
145 emake contrib || die "Building of contrib failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
146 emake tools || die "Building of tools failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
147 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
148
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
149 if use doc; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
150 doxygen doc/doxygen.conf || die "Building of Subversion HTML documentation failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
151
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
152 if use java; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
153 emake doc-javahl || die "Building of Subversion JavaHL library HTML documentation failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
154 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
155 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
156 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
157
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
158 src_install() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
159 python_version
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
160 PYTHON_DIR=/usr/$(get_libdir)/python${PYVER}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
161
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
162 emake -j1 DESTDIR="${D}" local-install || die "Installation of core of Subversion failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
163
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
164 if use python; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
165 emake -j1 DESTDIR="${D}" DISTUTIL_PARAM="--prefix=${D}" LD_LIBRARY_PATH="-L${D}/usr/$(get_libdir)" install-swig-py \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
166 || die "Installation of Subversion Python bindings failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
167
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
168 # Move Python bindings.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
169 dodir "${PYTHON_DIR}/site-packages"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
170 mv "${D}"/usr/$(get_libdir)/svn-python/svn "${D}${PYTHON_DIR}/site-packages"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
171 mv "${D}"/usr/$(get_libdir)/svn-python/libsvn "${D}${PYTHON_DIR}/site-packages"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
172 rm -Rf "${D}"/usr/$(get_libdir)/svn-python
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
173 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
174
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
175 if use perl; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
176 emake -j1 DESTDIR="${D}" INSTALLDIRS="vendor" install-swig-pl || die "Installation of Subversion Perl bindings failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
177 fixlocalpod
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
178 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
179
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
180 if use ruby; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
181 emake -j1 DESTDIR="${D}" install-swig-rb || die "Installation of Subversion Ruby bindings failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
182 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
183
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
184 if use java; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
185 emake -j1 DESTDIR="${D}" install-javahl || die "Installation of Subversion JavaHL library failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
186 java-pkg_regso "${D}"/usr/$(get_libdir)/libsvnjavahl*.so
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
187 java-pkg_dojar "${D}"/usr/$(get_libdir)/svn-javahl/svn-javahl.jar
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
188 rm -Rf "${D}"/usr/$(get_libdir)/svn-javahl/*.jar
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
189 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
190
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
191 # Install Apache module configuration.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
192 if use apache2; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
193 dodir "${APACHE_MODULES_CONFDIR}"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
194 cat <<EOF >"${D}/${APACHE_MODULES_CONFDIR}"/47_mod_dav_svn.conf
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
195 <IfDefine SVN>
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
196 LoadModule dav_svn_module modules/mod_dav_svn.so
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
197 <IfDefine SVN_AUTHZ>
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
198 LoadModule authz_svn_module modules/mod_authz_svn.so
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
199 </IfDefine>
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
200
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
201 # Example configuration:
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
202 #<Location /svn/repos>
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
203 # DAV svn
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
204 # SVNPath ${SVN_REPOS_LOC}/repos
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
205 # AuthType Basic
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
206 # AuthName "Subversion repository"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
207 # AuthUserFile ${SVN_REPOS_LOC}/conf/svnusers
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
208 # Require valid-user
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
209 #</Location>
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
210 </IfDefine>
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
211 EOF
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
212 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
213
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
214 # Install Bash Completion, bug 43179.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
215 dobashcompletion tools/client-side/bash_completion subversion
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
216 rm -f tools/client-side/bash_completion
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
217
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
218 # Install hot backup script, bug 54304.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
219 newbin tools/backup/hot-backup.py svn-hot-backup
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
220 rm -fr tools/backup
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
221
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
222 # Install svn_load_dirs.pl.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
223 if use perl; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
224 newbin contrib/client-side/svn_load_dirs/svn_load_dirs.pl svn-load-dirs
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
225 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
226 rm -f contrib/client-side/svn_load_dirs/svn_load_dirs.pl
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
227
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
228 # Install svnserve init-script and xinet.d snippet, bug 43245.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
229 newinitd "${FILESDIR}"/svnserve.initd svnserve
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
230 if use apache2; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
231 newconfd "${FILESDIR}"/svnserve.confd svnserve
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
232 else
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
233 newconfd "${FILESDIR}"/svnserve.confd2 svnserve
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
234 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
235 insinto /etc/xinetd.d
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
236 newins "${FILESDIR}"/svnserve.xinetd svnserve
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
237
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
238 # Install documentation.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
239 dodoc CHANGES COMMITTERS README
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
240 dohtml www/hacking.html
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
241 dodoc tools/xslt/svnindex.{css,xsl}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
242 rm -fr tools/xslt
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
243
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
244 # Install Vim syntax files.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
245 if use vim-syntax; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
246 insinto /usr/share/vim/vimfiles/syntax
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
247 doins contrib/client-side/vim/svn.vim
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
248 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
249 rm -f contrib/client-side/vim/svn.vim
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
250
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
251 # Install Emacs Lisps.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
252 if use emacs; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
253 elisp-install ${PN} contrib/client-side/emacs/{dsvn,psvn}.{el,elc} \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
254 doc/svn-doc.{el,elc} doc/tools/svnbook.{el,elc} \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
255 || die "Installation of Emacs modules failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
256 elisp-install ${PN}/compat contrib/client-side/emacs/vc-svn.{el,elc} \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
257 || die "Installation of Emacs modules failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
258 touch "${D}${SITELISP}/${PN}/compat/.nosearch"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
259 elisp-site-file-install "${FILESDIR}"/1.5.0/70svn-gentoo.el \
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
260 || die "Installation of Emacs site-init file failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
261 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
262 rm -fr contrib/client-side/emacs
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
263
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
264 # Install extra files.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
265 if use extras; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
266 doenvd "${FILESDIR}"/1.5.0/80subversion-extras
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
267
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
268 emake DESTDIR="${D}" install-contrib || die "Installation of contrib failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
269 emake DESTDIR="${D}" install-tools || die "Installation of tools failed"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
270
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
271 find contrib tools '(' -name "*.bat" -o -name "*.in" -o -name ".libs" ')' -print0 | xargs -0 rm -fr
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
272 rm -fr contrib/client-side/{svn-push,svnmucc}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
273 rm -fr tools/server-side/{svn-populate-node-origins-index,svnauthz-validate}*
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
274 rm -fr tools/{buildbot,dev,diff,po}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
275
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
276 insinto /usr/share/${PN}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
277 doins -r contrib tools
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
278 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
279
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
280 if use doc; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
281 dohtml doc/doxygen/html/*
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
282
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
283 insinto /usr/share/doc/${PF}
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
284 doins -r notes
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
285 ecompressdir /usr/share/doc/${PF}/notes
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
286
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
287 if use java; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
288 java-pkg_dojavadoc doc/javadoc
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
289 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
290 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
291 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
292
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
293 pkg_preinst() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
294 # Compare versions of Berkeley DB, bug 122877.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
295 if use berkdb && [[ -f "${ROOT}usr/bin/svn" ]] ; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
296 OLD_BDB_VERSION="$(scanelf -nq "${ROOT}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
297 NEW_BDB_VERSION="$(scanelf -nq "${D}usr/$(get_libdir)/libsvn_subr-1.so.0" | grep -Eo "libdb-[[:digit:]]+\.[[:digit:]]+" | sed -e "s/libdb-\(.*\)/\1/")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
298 if [[ "${OLD_BDB_VERSION}" != "${NEW_BDB_VERSION}" ]] ; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
299 CHANGED_BDB_VERSION=1
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
300 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
301 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
302 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
303
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
304 pkg_postinst() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
305 use emacs && elisp-site-regen
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
306 use perl && perl-module_pkg_postinst
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
307
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
308 elog "Subversion Server Notes"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
309 elog "-----------------------"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
310 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
311 elog "If you intend to run a server, a repository needs to be created using"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
312 elog "svnadmin (see man svnadmin) or the following command to create it in"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
313 elog "${SVN_REPOS_LOC}:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
314 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
315 elog " emerge --config =${CATEGORY}/${PF}"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
316 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
317 elog "Subversion has multiple server types, take your pick:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
318 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
319 elog " - svnserve daemon: "
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
320 elog " 1. Edit /etc/conf.d/svnserve"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
321 elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
322 elog " 3. Start daemon: /etc/init.d/svnserve start"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
323 elog " 4. Make persistent: rc-update add svnserve default"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
324 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
325 elog " - svnserve via xinetd:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
326 elog " 1. Edit /etc/xinetd.d/svnserve (remove disable line)"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
327 elog " 2. Fix the repository permissions (see \"Fixing the repository permissions\")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
328 elog " 3. Restart xinetd.d: /etc/init.d/xinetd restart"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
329 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
330 elog " - svn over ssh:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
331 elog " 1. Fix the repository permissions (see \"Fixing the repository permissions\")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
332 elog " Additionally run:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
333 elog " groupadd svnusers"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
334 elog " chown -R root:svnusers ${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
335 elog " 2. Create an svnserve wrapper in /usr/local/bin to set the umask you"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
336 elog " want, for example:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
337 elog " #!/bin/bash"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
338 elog " . /etc/conf.d/svnserve"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
339 elog " umask 007"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
340 elog " exec /usr/bin/svnserve \${SVNSERVE_OPTS} \"\$@\""
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
341 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
342
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
343 if use apache2; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
344 elog " - http-based server:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
345 elog " 1. Edit /etc/conf.d/apache2 to include both \"-D DAV\" and \"-D SVN\""
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
346 elog " 2. Create an htpasswd file:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
347 elog " htpasswd2 -m -c ${SVN_REPOS_LOC}/conf/svnusers USERNAME"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
348 elog " 3. Fix the repository permissions (see \"Fixing the repository permissions\")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
349 elog " 4. Restart Apache: /etc/init.d/apache2 restart"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
350 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
351 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
352
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
353 elog " Fixing the repository permissions:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
354 elog " chmod -Rf go-rwx ${SVN_REPOS_LOC}/conf"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
355 elog " chmod -Rf g-w,o-rwx ${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
356 elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/db"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
357 elog " chmod -Rf g+rw ${SVN_REPOS_LOC}/repos/locks"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
358 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
359
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
360 elog "If you intend to use svn-hot-backup, you can specify the number of"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
361 elog "backups to keep per repository by specifying an environment variable."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
362 elog "If you want to keep e.g. 2 backups, do the following:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
363 elog "echo '# hot-backup: Keep that many repository backups around' > /etc/env.d/80subversion"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
364 elog "echo 'SVN_HOTBACKUP_BACKUPS_NUMBER=2' >> /etc/env.d/80subversion"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
365 elog
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
366
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
367 if [[ -n "${CHANGED_BDB_VERSION}" ]] ; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
368 ewarn "You upgraded from an older version of Berkeley DB and may experience"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
369 ewarn "problems with your repository. Run the following commands as root to fix it:"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
370 ewarn " db4_recover -h ${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
371 ewarn " chown -Rf apache:apache ${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
372 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
373 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
374
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
375 pkg_postrm() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
376 use emacs && elisp-site-regen
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
377 use perl && perl-module_pkg_postrm
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
378 }
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
379
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
380 pkg_config() {
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
381 if [[ ! -x "${ROOT}usr/bin/svnadmin" ]] ; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
382 die "You seem to only have built the Subversion client"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
383 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
384
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
385 einfo ">>> Initializing the database in ${ROOT}${SVN_REPOS_LOC} ..."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
386 if [[ -e "${ROOT}${SVN_REPOS_LOC}/repos" ]] ; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
387 echo "A Subversion repository already exists and I will not overwrite it."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
388 echo "Delete \"${ROOT}${SVN_REPOS_LOC}/repos\" first if you're sure you want to have a clean version."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
389 else
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
390 mkdir -p "${ROOT}${SVN_REPOS_LOC}/conf"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
391
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
392 einfo ">>> Populating repository directory ..."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
393 # Create initial repository.
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
394 "${ROOT}usr/bin/svnadmin" create "${ROOT}${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
395
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
396 einfo ">>> Setting repository permissions ..."
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
397 SVNSERVE_USER="$(. "${ROOT}etc/conf.d/svnserve" ; echo "${SVNSERVE_USER}")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
398 SVNSERVE_GROUP="$(. "${ROOT}etc/conf.d/svnserve" ; echo "${SVNSERVE_GROUP}")"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
399 if use apache2 ; then
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
400 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="apache"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
401 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="apache"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
402 else
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
403 [[ -z "${SVNSERVE_USER}" ]] && SVNSERVE_USER="svn"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
404 [[ -z "${SVNSERVE_GROUP}" ]] && SVNSERVE_GROUP="svnusers"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
405 enewgroup "${SVNSERVE_GROUP}"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
406 enewuser "${SVNSERVE_USER}" -1 -1 "${SVN_REPOS_LOC}" "${SVNSERVE_GROUP}"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
407 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
408 chown -Rf "${SVNSERVE_USER}:${SVNSERVE_GROUP}" "${ROOT}${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
409 chmod -Rf go-rwx "${ROOT}${SVN_REPOS_LOC}/conf"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
410 chmod -Rf o-rwx "${ROOT}${SVN_REPOS_LOC}/repos"
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
411 fi
e948db201a1e bump subversion and mercurial
holger@hoho.dyndns.org
parents:
diff changeset
412 }