summaryrefslogtreecommitdiff
path: root/extra/visualvm/PKGBUILD
blob: 3add21de35b4d3ca45654b23ab539736b39cdf65 (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
# Maintainer: Guillaume ALAUX <guillaume@archlinux.org>
# Contributor: Kristof JOZSA <kristof.jozsa@gmail.com>
pkgname=visualvm
pkgver=1.3.7
_shortver=${pkgver//\./}
pkgrel=1
pkgdesc='Visual tool integrating several commandline JDK tools and lightweight profiling capabilities'
arch=('i686' 'x86_64')
url='http://visualvm.java.net/'
license=('custom:GPL')
depends=('java-environment')
source=("https://java.net/projects/${pkgname}/downloads/download/release${_shortver}/${pkgname}_${_shortver}.zip"
        'visualvm.desktop'
        'icon.png')
sha256sums=('b8ff7762d9f8bb940bab6ec2ec890657682adf85d833e7e89e9cc4feda717b53'
            'e820807e8d78446cf156a3947d97856e24865bb0d8c957e9ce2fed309c737441'
            '452fbd85c968ec7176c5894bc4106b7e25310314d44278d807510675b6a5c864')

package() {
  cd ${srcdir}/${pkgname}_${_shortver}

  mkdir -p ${pkgdir}/usr/share/${pkgname}
  cp -R bin platform profiler visualvm ${pkgdir}/usr/share/${pkgname}

  install -d ${pkgdir}/etc/${pkgname}
  cp -R etc/* ${pkgdir}/etc/${pkgname}
  ln -s /etc/${pkgname} ${pkgdir}/usr/share/${pkgname}/etc

  rm -rf ${pkgdir}/usr/share/${pkgname}/profiler/lib/deployed/jdk*/{hpux*,mac,solaris*,windows*,linux-arm*}
  if [ ${CARCH} == 'i686' ]; then
    rm -rf ${pkgdir}/usr/share/${pkgname}/profiler/lib/deployed/jdk*/linux-amd64 \
           ${pkgdir}/usr/share/${pkgname}/platform/modules/lib/{x86,amd64}
  else
    rm -rf ${pkgdir}/usr/share/${pkgname}/profiler/lib/deployed/jdk*/linux \
           ${pkgdir}/usr/share/${pkgname}/platform/modules/lib/{x86,i386}
  fi

  find ${pkgdir}/usr/share/${pkgname} \( -name "*.exe" -o -name "*.dll" \) -delete

  install -d ${pkgdir}/usr/bin
  ln -s /usr/share/${pkgname}/bin/visualvm ${pkgdir}/usr/bin/${pkgname}

  install -Dm644 ${srcdir}/icon.png ${pkgdir}/usr/share/${pkgname}/icon.png
  install -Dm644 ${srcdir}/visualvm.desktop ${pkgdir}/usr/share/applications/visualvm.desktop

  install -D LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
}