summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 44e6335a757b5c3ebb3b9b521b696bd22d4258ec (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
# Maintainer: Daan van Rossum <d.r.vanrossum_at gmx.de>
# Contributor: Christopher Heien <chris.h.heien@gmail.com>
# Contributor: Lazaros Koromilas <koromilaz@gmail.com>

pkgname=basex
pkgver=9.4.2
pkgrel=1
pkgdesc="Light-weight, high-performance XML database system and XPath/XQuery processor."
arch=('i686' 'x86_64')
url="http://basex.org/"
license=('BSD')
makedepends=('java-environment')
depends=('java-runtime' 'bash')
source=("http://files.basex.org/releases/${pkgver}/BaseX${pkgver//./}.zip" 
        "basex.sh" 
        "BaseX.desktop")
sha1sums=('8149efe550ed078fb3a28b2c3bc377f7a85169da'
          'b82c43d2f247d65b93b2f073543b8ceee038bfd1'
          '1f2e10e989258cc41e8d516efa80801038142358')

package() {
  # install profile.d script
  install -dm755 ${pkgdir}/etc/profile.d || return 1
  install -m755 ${srcdir}/${pkgname}.sh ${pkgdir}/etc/profile.d || return 1

  # Get the BASEX_HOME env var
  source ${srcdir}/${pkgname}.sh || return 1

  cd ${srcdir}
  install -dm755 ${pkgdir}/${BASEX_HOME}/{bin,lib,img} || return 1

  # install gui shortcuts
  install -dm755 ${pkgdir}/usr/share/applications || return 1 
  install -m755 BaseX.desktop ${pkgdir}/usr/share/applications || return 1

  # install licence
  install -D -m644 basex/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  
  # extract and install logo
  jar -xf basex/BaseX.jar img/logo_256.png
  install -m644 img/logo_256.png ${pkgdir}/${BASEX_HOME}/img || return 1	 

  install -m644 basex/*.jar ${pkgdir}/${BASEX_HOME} || return 1
  install -m644 basex/lib/*.jar ${pkgdir}/${BASEX_HOME}/lib || return 1
  cp -Rp basex/etc ${pkgdir}/${BASEX_HOME} || return 1

  # Do not copy Windows .bat/.cmd files
  find basex/bin -type f -a ! -name \*.bat -a ! -name \*.cmd \
    -exec install -m755 {} ${pkgdir}/${BASEX_HOME}/bin \; || return 1
}