mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
63 lines
2.1 KiB
Bash
63 lines
2.1 KiB
Bash
pkgbase=groovy
|
|
pkgname=('groovy' 'groovy-docs')
|
|
pkgver=2.4.11
|
|
pkgrel=1
|
|
pkgdesc='Programming language based on Java, inspired by Python, Ruby and Smalltalk'
|
|
arch=('any')
|
|
url='http://groovy-lang.org/'
|
|
license=('APACHE')
|
|
makedepends=('gendesk')
|
|
source=("http://dl.bintray.com/groovy/maven/apache-$pkgbase-binary-$pkgver.zip"
|
|
"http://dl.bintray.com/groovy/maven/apache-$pkgbase-docs-$pkgver.zip"
|
|
"$pkgbase.png")
|
|
sha256sums=('4479a3653c565b173fc0d0e5e514a06f1c7d6f93926cbe0c5d8d29e5e4a0347c'
|
|
'6cc0221b94fb15378e399a69d36c32e5102942f9a8b18cd3b34258fbaee21d96'
|
|
'24e539235b5762b1220f39d7953a52e9b4a458c2be4f66a60219755363ba6dba')
|
|
|
|
prepare() {
|
|
# Generate desktop shortcut
|
|
gendesk -f -n --pkgname "$pkgbase" --pkgdesc 'Groovy programming language' \
|
|
--exec 'groovyConsole' --name 'Groovy Console'
|
|
|
|
# Set GROOVY_HOME correctly at the top of all the scripts.
|
|
# There are probably better ways to do this, but this works.
|
|
for f in "$pkgbase-$pkgver/bin/"*; do
|
|
sed 's:bin/sh:bin/sh\nGROOVY_HOME=/usr/share/groovy:' -i "$f"
|
|
done
|
|
|
|
cd "$pkgbase-$pkgver/embeddable"
|
|
ln -sf "$pkgbase-all-$pkgver.jar" "$pkgbase-all.jar"
|
|
}
|
|
|
|
package_groovy() {
|
|
depends=('bash' 'java-environment')
|
|
optdepends=('groovy-docs: html and pdf documentation for Groovy')
|
|
cd "$pkgbase-$pkgver"
|
|
|
|
# Create the directories and package the files
|
|
install -d "$pkgdir/usr/share/groovy" "$pkgdir/usr/bin"
|
|
cp -r lib conf embeddable "$pkgdir/usr/share/groovy"
|
|
cp bin/* "$pkgdir/usr/bin"
|
|
|
|
# Remove all DOS/Windows batch files
|
|
find $pkgdir -name '*.bat' -exec rm {} \;
|
|
|
|
# Package the license file
|
|
install -Dm644 LICENSE \
|
|
"$pkgdir/usr/share/licenses/$pkgbase/LICENSE"
|
|
|
|
# Package the desktop shortcut for Groovy Console
|
|
install -Dm644 "$srcdir/$pkgbase.desktop" \
|
|
"$pkgdir/usr/share/applications/$pkgbase.desktop"
|
|
install -Dm644 "$srcdir/$pkgbase.png" \
|
|
"$pkgdir/usr/share/pixmaps/$pkgbase.png"
|
|
}
|
|
|
|
package_groovy-docs() {
|
|
cd "$pkgbase-$pkgver"
|
|
|
|
install -d "$pkgdir/usr/share/doc/$pkgbase-$pkgver"
|
|
cp -r html/* licenses "$pkgdir/usr/share/doc/$pkgbase-$pkgver"
|
|
find "$pkgdir" -type f -exec chmod -x {} \;
|
|
}
|