summaryrefslogtreecommitdiff
path: root/pcr/java-naga/PKGBUILD
blob: ee312cb3641f69921b76f755c781db08e313482c (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
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_libname=naga
pkgname=java-${_libname}
_pkgver=3_0
pkgver=3.0
pkgrel=1
pkgdesc='Simplified Java NIO asynchronous sockets'
arch=('any')
url='http://code.google.com/p/naga/'
license=('MIT')
depends=('java-runtime')
makedepends=('apache-ant' 'git')
source=("git+https://github.com/lerno/${_libname}"
        'naga-encoding.patch')
sha1sums=('SKIP' 'bf27779084d38279e7cd8004ad4898aca50cfa87')

prepare() {
  cd ${_libname}
  patch -Np1 -i "${srcdir}/naga-encoding.patch"
}

build() {
  cd ${_libname}
  ant build
}

package() {
  cd ${_libname}

  # Install documentation
  install -d "$pkgdir/usr/share/doc/$pkgname"
  cp -r _BUILD/docs/api "$pkgdir/usr/share/doc/$pkgname"

  # Install jars
  install -d "$pkgdir/usr/share/java"
  for _jar in $_libname $_libname-debug $_libname-no-em; do
    install -m644 "_DIST/$_jar-$_pkgver.jar" \
      "$pkgdir/usr/share/java/$_jar-$_pkgver-$pkgver.jar"
    ln -s "/usr/share/java/$_jar-$_pkgver-$pkgver.jar" \
      "${pkgdir}/usr/share/java/$_jar-$_pkgver.jar"
  done
}