summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: fd2836ae89b191ddf83e11e450c52910b8a09c9d (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
# Maintainer: Alexander F Rødseth <xyproto@archlinux.org>
# Contributor: Tom Wizetek <tom@wizetek.com>

pkgname=jxplorer
pkgver=3.3.1.2
pkgrel=1
pkgdesc='Java LDAP client'
url='http://jxplorer.org/'
license=('custom')
arch=('any')
depends=('java-runtime')
makedepends=('setconf')
source=("http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/version/${pkgver}/$pkgname-$pkgver-linux-installer.run")
sha256sums=('7ff5ff0a124d8e16d7688ae093cfcd859f4be3104f3455cc59d4b15d55a61ffa')

prepare() {
  cat > "$pkgname.run" << EOF
#!/bin/sh
cd "/opt/$pkgname"
sh jxplorer.sh "\$@"
EOF

  chmod +x *.run
  ./"$pkgname-$pkgver-linux-installer.run" \
    --mode unattended \
    --prefix "$srcdir/$pkgname"

  cd "$pkgname"
  setconf JXplorer.desktop Version "$pkgver"
  setconf JXplorer.desktop Comment "$pkgdesc"
  setconf JXplorer.desktop Icon "/opt/jxplorer/images/logo_32_trans.gif"
  setconf JXplorer.desktop Exec "/opt/jxplorer/jsxplorer.sh"
}

package() {
  install -d "$pkgdir/opt"

  cp -r "$pkgname" "$pkgdir/opt"
  chmod +x "$pkgdir/opt/$pkgname/jxplorer.sh"
  touch "$pkgdir/opt/$pkgname/"{gssapi.conf,jxconfig.txt}

  # No user settings, only global. Bah.
  chmod 666 "$pkgdir/opt/$pkgname/"{gssapi.conf,jxconfig.txt}
  chmod 777 "$pkgdir/opt/$pkgname/plugins/"

  install -Dm755 "$pkgname.run" "$pkgdir/usr/bin/$pkgname"
  install -Dm644 "$pkgname/JXplorer.desktop" \
    "$pkgdir/usr/share/applications/JXplorer.desktop"

  # Cleanup
  rm -f "$pkgdir/opt/$pkgname/"{uninstall,*.desktop,*.bat}
}

# vim:set ts=2 sw=2 et: