summaryrefslogtreecommitdiff
path: root/libre/jedit/PKGBUILD
blob: f428e68082c19be4c58a89ad6e77729bcf4b7f42 (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
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=jedit
pkgver=5.3.0
pkgrel=4.parabola1
pkgdesc='Editor for programmers'
arch=('any')
url='http://jedit.org/'
license=('GPL')
depends=('java-runtime')
makedepends=('apache-ant' 'apache-ant-contrib' 'apache-ivy' 'beanshell2'
             'gendesk' 'java-hamcrest' 'jsr305' 'junit')
optdepends=('java-environment: for java development'
            'noto-fonts: perfectly usable font')
options=('!emptydirs')
source=("http://sourceforge.net/projects/$pkgname/files/$pkgname/$pkgver/jedit${pkgver}source.tar.bz2"
        'jedit.sh'
        'jeditbg.sh'
        'jedit.props'
        'jedit-fix_build.patch')
sha256sums=('8d56d036be4dd45254748f063ade01293b862a615cdff6aed274ab58085f6304'
            'ae53cda453152dd7835d6428910171ca1383bb5e36a4b9b1164d98a940f6ed10'
            'a1dd1b688f08c5c967861fe80df13cac201afa6dcfcecc9a289b2c3bec7c8915'
            'dc5fe0050321d4f34bce556895fbc39cc6f7df194e14eb4f6ea53166a4d82347'
            '68b91f30a486ac954521f98e1ded152308df220f06a8854b3b995c002f54424e')

prepare() {
  gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" --exec 'jeditbg %U' \
    --name 'jEdit' --genericname 'Editor'

  cd jEdit
  mkdir -p lib/{ant-contrib,compile,docbook,ivy,default-plugins,scripting,test}
  ln -sf /usr/share/java/ant-contrib.jar lib/ant-contrib/ant-contrib.jar
  ln -sf /usr/share/java/bsh.jar lib/ant-contrib/bsh.jar
  ln -sf /usr/share/java/hamcrest-core.jar lib/test/hamcrest-core.jar
  ln -sf /usr/share/java/hamcrest-library.jar lib/test/hamcrest-library.jar
  ln -sf /usr/share/java/jsr305.jar lib/compile/jsr305.jar
  ln -sf /usr/share/java/junit.jar lib/test/junit.jar
  patch -Np1 -i "${srcdir}/jedit-fix_build.patch"
}

build() {
  cd jEdit
  ant build \
    -lib /usr/share/java/apache-ivy/ivy.jar \
    -Divy.done=true
}

package() {
  cd jEdit

  # Install license file
  install -Dm644 doc/COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.txt"
  install -Dm644 doc/COPYING.PLUGINS.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.PLUGINS.txt"
  install -Dm644 doc/COPYING.DOC.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING.DOC.txt"

  # Install documentation
  install -m755 -d "$pkgdir/usr/share/java/$pkgname"
  cp -ru doc "$pkgdir/usr/share/java/$pkgname/doc"
#  install -d "$pkgdir/usr/share/doc/$pkgname"
#  cp -r build/javadoc "${pkgdir}/usr/share/doc/${pkgname}"

  # Install jars
  install -D -m644 build/$pkgname.jar "$pkgdir/usr/share/java/$pkgname/$pkgname.jar"

  # Install keymaps
  cp -r build/keymaps "${pkgdir}/usr/share/java/${pkgname}"

  # Install macros
  cp -r build/macros "${pkgdir}/usr/share/java/${pkgname}"

  # Install modes
  cp -r build/modes "${pkgdir}/usr/share/java/${pkgname}"

  # Install properties
  cp -r build/properties "${pkgdir}/usr/share/java/${pkgname}"

  # Install startup
  cp -r build/startup "${pkgdir}/usr/share/java/${pkgname}"

  # Man pages
  install -Dm644 package-files/linux/$pkgname.1 "$pkgdir/usr/share/man/man1/$pkgname.1"

  # Launchers, properties and desktop shortcuts
  install -d "$pkgdir/usr/bin"
  install -Dm755 "$srcdir/$pkgname.sh" "$pkgdir/usr/bin/$pkgname"
  install -Dm755 "$srcdir/${pkgname}bg.sh" "$pkgdir/usr/bin/${pkgname}bg"
  install -Dm644 "$srcdir/$pkgname.props" "$pkgdir/usr/share/$pkgname/default.props"
  install -Dm644 "$srcdir/$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
  install -Dm644 doc/$pkgname.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
}