summaryrefslogtreecommitdiff
path: root/extra/subversion/PKGBUILD
blob: 2b794f48137d20116649b5325eb373ba3bfa38b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# $Id: PKGBUILD 186427 2013-05-26 09:26:08Z bluewind $
# Maintainer: Stéphane Gaudreault <stephane@archlinux.org>
# Contributor: Paul Mattal <paul@archlinux.org>
# Contributor: Jason Chu <jason@archlinux.org>

pkgname=subversion
pkgver=1.7.9
pkgrel=6
pkgdesc="A Modern Concurrent Version Control System"
arch=('i686' 'x86_64')
license=('APACHE')
depends=('neon' 'apr-util' 'sqlite' 'file' 'serf' 'systemd')
optdepends=('libgnome-keyring' 'kdeutils-kwallet' 'bash-completion: for svn bash completion' \
            'python2: for some hook scripts' 'java-environment') #'ruby: for some hook scripts')
makedepends=('krb5' 'apache' 'python2' 'perl>=5.18' 'swig' 'java-runtime' 'java-environment'
             'autoconf' 'db' 'e2fsprogs' 'libgnome-keyring' 'kdelibs')
backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
url="http://subversion.apache.org/"
provides=('svn')
options=('!makeflags' '!libtool' '!emptydirs')
install=${pkgname}.install
source=(http://apache.mirror.rafal.ca/subversion/$pkgname-$pkgver.tar.bz2 #{,.asc}
        svn
        svnserve.conf
        svnserve.tmpfiles
        svnserve.service
        subversion.rpath.fix.patch)
md5sums=('8d532025771a67c06c23f299699f056f'
         'a0db6dd43af33952739b6ec089852630'
         'c459e299192552f61578f3438abf0664'
         'bb2857eceafcfac35dde39dcffad2314'
         'e8020c7a1d1a0c47091b5fdd034f81c5'
         '6b4340ba9d8845cd8497e013ae01be3f')
build() {
   cd "${srcdir}/${pkgname}-${pkgver}"
   export PYTHON=/usr/bin/python2

   patch -Np0 -i ../subversion.rpath.fix.patch
   sed -i 's|/usr/bin/env python|/usr/bin/env python2|' tools/hook-scripts/{,mailer/{,tests/}}*.py

   ./configure --prefix=/usr --with-apr=/usr --with-apr-util=/usr \
               --with-zlib=/usr --with-neon=/usr --with-serf=/usr --with-apxs \
               --with-sqlite=/usr --with-berkeley-db=:/usr/include/:/usr/lib:db-5.3 \
               --enable-javahl --with-gnome-keyring --with-kwallet \
               --disable-static

   make external-all
   make LT_LDFLAGS="-L$Fdestdir/usr/lib" local-all
   make swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
     swig_pydir_extra=/usr/lib/python2.7/site-packages/svn swig-py swig-pl javahl #swig-rb
}

#check() {
#   cd "${srcdir}/${pkgname}-${pkgver}"
#   export LANG=C LC_ALL=C
#   make check check-swig-pl check-swig-py check-javahl CLEANUP=yes # check-swig-rb
#}

package() {
   cd "${srcdir}/${pkgname}-${pkgver}"

   export LD_LIBRARY_PATH="${pkgdir}"/usr/lib:${LD_LIBRARY_PATH}
   make DESTDIR="${pkgdir}" INSTALLDIRS=vendor \
     swig_pydir=/usr/lib/python2.7/site-packages/libsvn \
     swig_pydir_extra=/usr/lib/python2.7/site-packages/svn \
     install install-swig-py install-swig-pl install-javahl #install-swig-rb

   install -dm755 "${pkgdir}"/usr/share/subversion
   cp -a tools/hook-scripts "${pkgdir}"/usr/share/subversion/
   rm "${pkgdir}"/usr/share/subversion/hook-scripts/*.in

   rm "${pkgdir}"/usr/lib/perl5/vendor_perl/auto/SVN/_Core/.packlist
   rm -r "${pkgdir}"/usr/lib/perl5/core_perl

   ## svnserve ...

   # xinetd
   install -D -m 644 "${srcdir}"/svn "${pkgdir}"/etc/xinetd.d/svn

   # ... systemd
   install -D -m 644 "${srcdir}"/svnserve.service  "${pkgdir}"/usr/lib/systemd/system/svnserve.service
   install -D -m 644 "${srcdir}"/svnserve.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/svnserve.conf

   # ... common config
   install -D -m 644 "${srcdir}"/svnserve.conf "${pkgdir}"/etc/conf.d/svnserve

   install -Dm 644 tools/client-side/bash_completion \
     "${pkgdir}"/usr/share/bash-completion/completions/subversion
   for i in svn svnadmin svndumpfilter svnlook svnsync svnversion; do
      ln -sf subversion "${pkgdir}"/usr/share/bash-completion/completions/${i}
   done
}