summaryrefslogtreecommitdiff
path: root/libre/icedtea-web/PKGBUILD
blob: ce4699f82f615feea28f3e5a8240b3a5beb5f19c (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
93
94
95
# Maintainer (Arch): Guillaume ALAUX <guillaume@archlinux.org>
# Contributor (Arch): Andreas Radke <andyrtr@archlinux.org>
# Maintainer: Isaac David <isacdaavid () isacdaavid!info>
# Contributor: Omar Vega Ramos <ovruni@gnu.org.pe>

# parabola changes and rationale:
#  - depending on iceweasel for building instead of firefox

pkgbase=icedtea-web
pkgname=('icedtea-web' 'icedtea-web-doc')
pkgver=1.7
pkgrel=1.parabola2
arch=('x86_64' 'i686' 'armv7h')
url='http://icedtea.classpath.org/wiki/IcedTea-Web'
license=('GPL2')
makedepends=('java-environment-openjdk=8' 'zip' 'libxtst' 'npapi-sdk' 'rhino' 'junit'
             'iceweasel' 'epiphany')
optdepends=('rhino: for using proxy auto config files')
# Due to broken path names in the tarball that fails with LANG=C in our chroot
noextract=("${pkgbase}-${pkgver}.tar.gz")
source=(http://icedtea.classpath.org/download/source/${pkgbase}-${pkgver}.tar.gz{,.sig})
validpgpkeys=('C058EF1E749812E6A486384B53B5CFF671EEED59') # Jiri Vanek <jvanek@redhat.com>
sha256sums=('2030ea323964ae82eabe5436eef076de4b892786424ad9be21f3abc9d76c0291'
            'SKIP')

prepare() {
  cd "${srcdir}"
  LANG=en_US.UTF-8 bsdtar -x -f "${srcdir}"/${pkgbase}-${pkgver}.tar.gz
}

build() {
  cd "${srcdir}"/${pkgbase}-${pkgver}
  ./configure \
      --prefix=/usr/share/${pkgbase} \
      --datarootdir=/usr/share \
      --with-jdk-home=/usr/lib/jvm/default \
      --with-jre-home=/usr/lib/jvm/default-runtime \
      --with-java=/usr/bin/java \
      --with-browser-tests \
      --with-firefox=/usr/bin/iceweasel \
      --with-epiphany=/usr/bin/epiphany
   make
}

#check() {
#  cd "${srcdir}"/${pkgbase}-${pkgver}
#  # as more tests have been added some are expectged to fail
#  # see http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2012-March/017566.html
#  make -k check
#}


package_icedtea-web() {

  pkgdesc='Free web browser plugin to run applets written in Java and an implementation of Java Web Start, without nonfree firefox make dependency'
  depends=('java-runtime-openjdk' 'desktop-file-utils')
  provides=('java-web-start')
  replaces=('icedtea-web-java7')

  cd "${srcdir}"/${pkgbase}-${pkgver}
  # possible make target (see bottom of Makefile.am: install-exec-local install-data-local
  make DESTDIR="${pkgdir}" install-exec-local install-data-local

  # Install desktop files.
  install -m 755 -d "${pkgdir}"/usr/share/{applications,pixmaps}
  install -m 644 javaws.png "${pkgdir}"/usr/share/pixmaps
  install -m 644 {javaws,itweb-settings}.desktop "${pkgdir}"/usr/share/applications
  # remove splitted doc files
  rm -rf "${pkgdir}"/usr/share/doc

  # link binaries into /usr/bin + jre/bin
  install -m 755 -d "${pkgdir}"/usr/bin
  pushd "${pkgdir}"/usr/share/${pkgbase}/bin
  for file in *; do
    ln -sf /usr/share/${pkgbase}/bin/${file} "${pkgdir}"/usr/bin
  done
  popd

  # link the mozilla-plugin - test it here http://www.java.com/en/download/help/testvm.xml
  install -m 755 -d "${pkgdir}"/usr/lib/mozilla/plugins/
  ln -sf /usr/share/${pkgbase}/lib/IcedTeaPlugin.so "${pkgdir}"/usr/lib/mozilla/plugins/
}

package_icedtea-web-doc() {

  pkgdesc='icedtea-web browser plugin + Java WebStart - documentation files'
  replaces=('icedtea-web-java7-doc')

  cd "${srcdir}"/${pkgbase}-${pkgver}
  make DESTDIR="${pkgdir}" install-data-local
  # remove javaws about and man page
  rm -rf "${pkgdir}"/usr/lib
  rm -rf "${pkgdir}"/usr/share/man
  rm -rf "${pkgdir}"/usr/share/icedtea-web # conflicting and unneeded file it seems
}