summaryrefslogtreecommitdiff
path: root/libre/ditaa/PKGBUILD
blob: 2755544377d898e4f56716f9849b388b19223716 (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>

pkgname=ditaa
pkgver=0.9
pkgrel=2.parabola1
pkgdesc='Java utility to convert diagrams drawn using ascii art to bitmap'
arch=('any')
url='http://ditaa.sf.net/'
license=('GPL')
depends=('java-environment' 'java-commons-cli' 'gsfonts')
makedepends=('apache-ant' 'java-commons-cli' 'java-batik')
source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname/$pkgver/$pkgname${pkgver/./_}-src.zip"
        'ditaa.sh' 'ditaa-fix_imports.patch')
sha256sums=('0c6b92ddbeb435a1b0180b4728284e7d98e1bd94ec4619e73911875026ef63de'
            '8640917f1241e26b3104e733b083eb099dc2b5be87e34348479130c3987e7883'
            '4c24b233dca2ddd2c9a588f09b2aca421706daab68df3304f6ca4f4cd1a79372')

prepare() {
  rm -v lib/*.jar
  patch -Np1 -i "${srcdir}/ditaa-fix_imports.patch"
  mkdir -p bin
}

build() {
  cd "${srcdir}/build"
  ant -f release.xml release-jar \
    -lib "/usr/share/java/batik-anim.jar" \
    -lib "/usr/share/java/batik-awt-util.jar" \
    -lib "/usr/share/java/batik-bridge.jar" \
    -lib "/usr/share/java/batik-codec.jar" \
    -lib "/usr/share/java/batik-dom.jar" \
    -lib "/usr/share/java/batik-gvt.jar" \
    -lib "/usr/share/java/batik-svg-dom.jar" \
    -lib "/usr/share/java/commons-cli.jar" \
    -lib "/usr/share/java/xml-apis-ext.jar"
}

package() {
  install -Dm644 "${srcdir}/COPYING" "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
  install -Dm755 "releases/$pkgname${pkgver/./_}.jar" "$pkgdir/usr/share/java/$pkgname/ditaa-${pkgver/./_}.jar"
  install -Dm755 "$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  sed -i "s:VERSION:${pkgver/./_}:" "$pkgdir/usr/bin/$pkgname"
}