summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: f76260e2d12ebd9ca94f890c93b21384b32aa365 (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
# Contributor: Sergio Tridente <tioduke AT gmail DOT com>

pkgname=gate
pkgver=8.4.1
_build=5753
pkgrel=1
pkgdesc="GATE Developer is a development environment that provides a rich set of graphical interactive tools for the creation, measurement and maintenance of software components for processing human language."
arch=('any')
url="http://gate.ac.uk/"
license=('LGPL')
depends=('java-runtime')
options=(!strip)
source=(http://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}-build${_build}-BIN.zip gate.desktop gate.png)
md5sums=('ac4d179de89c5707c6efeca682c6072d'
         'a7a2cb37bf093d4b4164c7d381661f33'
         'acf3e7a9fcbdedd24589394260d56d12')

build() {
  rm -rf $srcdir/${pkgname}-${pkgver}-build${_build}-BIN/GATE.app
  find $srcdir/${pkgname}-${pkgver}-build${_build}-BIN -name "*.bat" -type f -exec rm {} \;
  find $srcdir/${pkgname}-${pkgver}-build${_build}-BIN -name "*.cmd" -type f -exec rm {} \;
  find $srcdir/${pkgname}-${pkgver}-build${_build}-BIN -name "*.exe" -type f -exec rm {} \;
}

package() {
  mkdir -p $pkgdir/usr/share/java/${pkgname}/
  mkdir -p $pkgdir/usr/bin/
  mkdir -p $pkgdir/usr/share/doc/${pkgname}/
  mkdir -p $pkgdir/usr/share/doc/${pkgname}/lib/
  mkdir -p $pkgdir/usr/share/{pixmaps,applications}

  cp -r $srcdir/${pkgname}-${pkgver}-build${_build}-BIN/* $pkgdir/usr/share/java/${pkgname}/
  find $pkgdir/usr/share/java/${pkgname} -type f -exec chmod 644 {} \;
  find $pkgdir/usr/share/java/${pkgname} -type d -exec chmod 755 {} \;
  find $pkgdir/usr/share/java/${pkgname} -name "*.pl" -type f -exec chmod 755 {} \;
  find $pkgdir/usr/share/java/${pkgname} -type f -exec egrep -q "#\! ?/bin/(ba)?sh" {} \; -exec chmod 755 {} \;

  ln -s /usr/share/java/${pkgname}/bin/gate.sh $pkgdir/usr/bin/${pkgname}

  mv $pkgdir/usr/share/java/${pkgname}/{licence.html,tao.pdf} $pkgdir/usr/share/doc/${pkgname}/
  mv $pkgdir/usr/share/java/${pkgname}/lib/{ivy-report.css,*.html} $pkgdir/usr/share/doc/${pkgname}/lib/

  cd $srcdir
  install -Dm644 gate.png $pkgdir/usr/share/pixmaps/
  install -Dm644 gate.desktop $pkgdir/usr/share/applications/
}