summaryrefslogtreecommitdiff
path: root/libre/java-common/PKGBUILD
blob: 982d1f881722876397298cfcc8ca8bc8c5d61081 (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
# Maintainer (Arch): Guillaume ALAUX <guillaume@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>
pkgname=java-runtime-common
pkgbase=java-common
pkgver=2
pkgrel=2.parabola1
pkgdesc='Common files for Java Runtime Environments (Parabola rebranded)'
arch=('any')
url='www.parabola.nu'
license=('GPL')
checkdepends=('wget')
conflicts=('java-common')
replaces=('java-common')
backup=(etc/profile.d/jre.sh
        etc/profile.d/jre.csh)
install=install_java-runtime-common.sh
source=(profile_jre.csh
        profile_jre.sh
        bin_parabola-java
        test_parabola-java
        https://shunit2.googlecode.com/files/shunit2-2.1.6.tgz)

sha256sums=('fb981764fbdcb33976085405d002a1427b5401da5f13f1dd00008dbe8306583a'
            '36e07f9387f24ff0c6dff1b4c6d9011eedef4bd22634e0c5a6335817991dc151'
            '103e0cbd0dd3b11376ba61e743f481f1a720c336f7b67d09a6b189f988e2fe6e'
            '6e0f4173d4cfaad5ab0ed953fad770ee70b355349304c3bd34043edf0b6a7ab5'
            '65a313a76fd5cc1c58c9e19fbc80fc0e418a4cbfbd46d54b35ed5b6e0025d4ee')

check() {
  cd "${srcdir}"
  ./test_parabola-java
}

package() {
  cd "${srcdir}"

  install -d -m 755 "${pkgdir}/usr/lib/jvm/"
  ln -s /dev/null "${pkgdir}/usr/lib/jvm/default"
  ln -s /dev/null "${pkgdir}/usr/lib/jvm/default-runtime"

  install -D -m 644 profile_jre.sh  "${pkgdir}/etc/profile.d/jre.sh"
  install -D -m 644 profile_jre.csh "${pkgdir}/etc/profile.d/jre.csh"
  install -D -m 755 bin_parabola-java "${pkgdir}/usr/bin/parabola-java"

  install -d -m 755 "${pkgdir}/usr/bin/"
  # Official list of binaries that Java headless runtime packages MUST provide
  # This list is based on Parabola' default Java implementation: "OpenJDK 7 Icedtea"
  for b in \
    java keytool orbd pack200 policytool rmid rmiregistry servertool tnameserv unpack200;
  do
    ln -s /usr/lib/jvm/default-runtime/bin/${b} "${pkgdir}/usr/bin/${b}"
  done
}