1 # Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
2 # Contributor: Levente Polyak <anthraxx@archlinux.org>
5 pkgname=(grails grails-docs)
8 pkgdesc='Groovy on rails, a web framework'
9 url='https://grails.org/'
12 makedepends=(apache-ant java-environment junit setconf unzip)
13 optdepends=('grails-docs: documentation for grails'
14 'groovy: the groovy programming language')
16 noextract=(${pkgname[1]}-$pkgver.zip)
17 source=(${pkgname[0]}-$pkgver.zip::https://github.com/grails/grails-core/releases/download/v$pkgver/grails-$pkgver.zip
18 ${pkgname[1]}-$pkgver.zip::https://github.com/grails/grails-doc/releases/download/v$pkgver/grails-docs.zip)
19 b2sums=('e01d5e93920709275a82a8f4916fed970d569132a7a1c55785a56047cbc2de594c41846f4f2ff24ba2acc72f1f6a3e5fa5fb76f91bc09c52fe1e35fdcf909376'
20 '3cee73f63dadbea1f7a51ae63ce155ede6e307b2ac2f4588bc29affd1ab5a1b8f7a45a6b1c96b9d695d4c7f1405feb29fdea50b6f517423fc4d24664757a57dd')
23 echo 'export GRAILS_HOME=/usr/share/grails' > $pkgbase.profile
24 setconf $pkgbase-$pkgver/bin/grails APP_HOME /usr/share/grails
28 depends=(bash java-environment junit)
30 install -Dm755 $pkgbase.profile "$pkgdir/etc/profile.d/$pkgname.sh"
32 install -d "$pkgdir/usr/share/pixmaps"
33 cp -r . "$pkgdir/usr/share/$pkgname"
34 install -Dm755 bin/grails "$pkgdir/usr/bin/grails"
35 install -Dm644 media/icons/*.png -t "$pkgdir/usr/share/pixmaps"
38 rm -rf "$pkgdir/usr/share/$pkgname/"{doc,INSTALL,LICENSE,README}
39 find "$pkgdir/usr/share" -name "*.bat" -exec rm {} \;
42 package_grails-docs() {
43 pkgdesc='Documentation for Grails'
44 install -d "$pkgdir/usr/share/doc" "$pkgdir/usr/share/grails"
45 unzip grails-docs-$pkgver.zip -d "$pkgdir/usr/share/doc/grails-$pkgver"
46 ln -s "/usr/share/doc/grails-$pkgver" "$pkgdir/usr/share/grails/doc"