102.11.0-1
[arch-packages.git] / subversion / trunk / PKGBUILD
blob68d25de128b190074996514534f9f81466ba4822
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
2 # Contributor: Angel Velasquez <angvp@archlinux.org>
3 # Contributor: Stéphane Gaudreault <stephane@archlinux.org>
4 # Contributor: Paul Mattal <paul@archlinux.org>
5 # Contributor: Jason Chu <jason@archlinux.org>
7 pkgname=subversion
8 pkgver=1.14.2
9 pkgrel=7
10 pkgdesc="A Modern Concurrent Version Control System"
11 arch=('x86_64')
12 url="https://subversion.apache.org/"
13 license=('APACHE')
14 depends=('apr' 'apr-util' 'bash' 'dbus' 'expat' 'file' 'gcc-libs' 'glibc' 'libsasl' 'libutf8proc' 'lz4' 'serf' 'sqlite'
15          'systemd' 'zlib' )
16 makedepends=('apache' 'python' 'python-py3c' 'perl' 'swig' 'java-environment>=8'
17              'libgnome-keyring' 'kwallet' 'kdelibs4support' 'ruby')
18 optdepends=('libgnome-keyring: for GNOME Keyring for auth credentials'
19             'kwallet: for KWallet for auth credentials'
20             'bash-completion: for svn bash completion'
21             'python: for some hook scripts'
22             'java-environment: for Java support'
23             'ruby: for some hook scripts')
24 checkdepends=('ruby-test-unit')
25 provides=('svn')
26 backup=('etc/xinetd.d/svn' 'etc/conf.d/svnserve')
27 options=('!makeflags' '!emptydirs')
28 source=(https://www.apache.org/dist/subversion/subversion-${pkgver}.tar.bz2{,.asc}
29         svn
30         svnserve.conf
31         svnserve.tmpfiles
32         svnserve.service
33         subversion.rpath.fix.patch
34         ruby-frozen-nil.patch
35         subversion-1.14.1-python-3.11-build.patch
36         subversion-1.14.2-swig-py-Fix-conditionals-by-SWIG-version-and-by-Pyth.patch
38 sha512sums=('20ada4688ca07d9fb8da4b7d53b5084568652a3b9418c65e688886bae950a16a3ff37710fcfc9c29ef14a89e75b2ceec4e9cf35d5876a7896ebc2b512cfb9ecc'
39             'SKIP'
40             '3df59e92aa0314ff6adce26e2e1162bf2872ca03ff1f78891081a60e67b521b6046b4a2f85f718dcd27f9d5709594658817a09548cdb74e3976d371dbe47e7db'
41             'f7f2ceac2446cc94ac2be3404083cc54a0f1f4d04d5301f600dfafca38819669bcffdfa45f1b90b9f3cdb042469385a764f11dc1a827f10c23ddf73b7ac6c9da'
42             '7775f4da5003970c9ebdc2f696ba090df194a77d9daed791875488c943f72ae496b5f9cc6f3ff9f3f4de9f352a3b518137babdea38947d1a2d5dd16aa1844036'
43             '8cc23ae71bd7ce7c337eaf12929f1af0a11b55250808e88f06397b874daf2efb9491c464be3d082d937a82c2b0b7c3ed06d6695cfd8a3fda1f803bbfd15837de'
44             '60d538160e738eb3b3e84a3881fe5a8d75c79053d3f31c4c29ef6ace6ccc5dd4367ed712766c911bae3436e9706e4dd144b270bb45161a6c1834a37e154d0440'
45             'bb772e55acd9601121ad06b254c364e8d8cf772ca59b8df0cf4c5c5ecba110d4108d0363672f121f770550cdd052802474029e57643258f398aacd2b63ccb898'
46             'cad1ef6359c4eecce4fc44fb0c8a01a7b9b94cd8b1b3f9bdd9d72b3591f75bada814a9597cea039c6e045f3f07807f17bd720e27cf7d8a92640bb45faaa6a982'
47             '9885226c2eea79712f316194fd9710bd940bce517cb2d3f1fcfbcb1edb8f10ae8496e7d03cd377cb991efa7259ff6930c488c603df206611bae4aa30a62cc596')
48 validpgpkeys=('19BBCAEF7B19B280A0E2175E62D48FAD16A0DE01'
49               '8BC4DAE0C5A4D65F404401074F7DBAA99A59B973'
50               'BA3C15B1337CF0FB222BD41A1BCA6586A347943F'
51               'E7B2A7F4EC28BE9FF8B38BA4B64FFF1209F9FA74'
52               '3D1DC66D6D2E0B9039528138C4A6C625CCC8E1DF'
53               'A844790FB5743606EE95920776D788E1ED1A599C'
54               '7B8CA7F6451AD89C8ADC077B376A3CFD110B1C95'
55               '056F8016D9B87B1BDE41746799EC741B57921ACC'
56               '3F8E467CB3366E3013E1120D583F00ADF981C39F'
57               '91BFBF4D6956BD5DF7B72D23DFE691AE331BA3DB'
58               'EC25FCC105618D04ADB43429C4416167349A3BCB')
59 # Ben Reser / Stefan Sperling / Branko Čibej / Evgeny Kotkov / Bert Huijben / Philip Martin /
60 # Stefan Fuhrmann / Stefan Hett (CODE SIGNING KEY) /Nathan Hartman (CODE SIGNING KEY) / James McCoy /
61 # Mark Phippard
63 prepare() {
64    cd ${pkgname}-${pkgver}
65    patch -Np0 -i ../subversion.rpath.fix.patch
66    patch -p1 -i ../ruby-frozen-nil.patch
67    rm subversion/bindings/swig/proxy/*.swg
68    # fix issues with Python 3.11 and swig
69    patch -Np1 -i ../subversion-1.14.1-python-3.11-build.patch
70    patch -Np1 -i ../subversion-1.14.2-swig-py-Fix-conditionals-by-SWIG-version-and-by-Pyth.patch
72    ./autogen.sh
75 build() {
76    local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
78    cd ${pkgname}-${pkgver}
79    ./configure --prefix=/usr \
80                --with-apxs \
81                --enable-javahl \
82                --with-jdk=/usr/lib/jvm/default \
83                --with-gnome-keyring \
84                --with-kwallet \
85                --with-apache-libexecdir=/usr/lib/httpd/modules \
86                --with-ruby-sitedir=/usr/lib/ruby/vendor_ruby \
87                --disable-static
89    # prevent excessive overlinking due to libtool
90    sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
91    make LT_LDFLAGS="-L$Fdestdir/usr/lib"
92    make swig_pydir=$site_packages/libsvn \
93      swig_pydir_extra=$site_packages/svn swig-py swig-pl javahl swig-rb
96 check() {
97    cd ${pkgname}-${pkgver}
98    export LANG=C LC_ALL=C
99    make check-swig-py check check-swig-pl check-swig-rb CLEANUP=yes # check-javahl
102 package() {
103    local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
105    cd ${pkgname}-${pkgver}
107    export LD_LIBRARY_PATH="${pkgdir}"/usr/lib:${LD_LIBRARY_PATH}
108    make DESTDIR="${pkgdir}" INSTALLDIRS=vendor \
109      swig_pydir=$site_packages/libsvn \
110      swig_pydir_extra=$site_packages/svn \
111      install install-swig-py install-swig-pl install-javahl install-swig-rb
113    install -dm755 "${pkgdir}"/usr/share/subversion
114    cp -a tools/hook-scripts "${pkgdir}"/usr/share/subversion/
115    rm "${pkgdir}"/usr/share/subversion/hook-scripts/*.in
117    ## svnserve ...
119    # xinetd
120    install -D -m 644 "${srcdir}"/svn "${pkgdir}"/etc/xinetd.d/svn
122    # ... systemd
123    install -D -m 644 "${srcdir}"/svnserve.service  "${pkgdir}"/usr/lib/systemd/system/svnserve.service
124    install -D -m 644 "${srcdir}"/svnserve.tmpfiles "${pkgdir}"/usr/lib/tmpfiles.d/svnserve.conf
126    # ... common config
127    install -D -m 644 "${srcdir}"/svnserve.conf "${pkgdir}"/etc/conf.d/svnserve
129    install -Dm 644 tools/client-side/bash_completion \
130      "${pkgdir}"/usr/share/bash-completion/completions/subversion
131    for i in svn svnadmin svndumpfilter svnlook svnsync svnversion; do
132       ln -sf subversion "${pkgdir}"/usr/share/bash-completion/completions/${i}
133    done
136 # vim: ts=2 sw=2 et: