blob: 17c41b28d0eda58476e76aa3cf0a8d86ec99fb72 (
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
|
# Maintainer: Pavol Hluchy (Lopo) <lopo AT losys DOT eu>
pkgname=netbeans-incubator
pkgver=20190512
pkgrel=1
pkgdesc='IDE for Java, HTML5, PHP, Groovy, C and C++ (incubator/nightly version)'
license=('Apache')
arch=('any')
url="http://netbeans.apache.org"
depends=('java-environment>=9' 'ttf-font')
makedepends=('gendesk' 'setconf' 'curl')
optdepends=('php: for developing programs in php'
'groovy: for developing programs in groovy'
'lib32-glibc'
)
provides=('netbeans')
backup=("usr/lib/$pkgname/etc/netbeans.conf")
install="netbeans.install"
options=(!strip)
source=('netbeans-nightly.png')
sha512sums=('5ce471647913dd0686511724d9b6045f44e9ae06938a8b6f8478bfd7c261c17fea4fa2b692a8c2d6b766503f00aff9c4b8f9e6c26d3b697b8f9a2361a66d9409')
_webroot="https://builds.apache.org/view/Incubator%20Projects/job/netbeans-linux"
prepare() {
cd "${SRCDEST}"
rm -f webindex
curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o webindex "${_webroot}/lastStableBuild/artifact/nbbuild/"
_file=`grep -e '-release.zip' webindex \
| awk 'BEGIN{FPAT="NetBeans-dev-netbeans-linux-[[:digit:]]+-on-[[:digit:]]+-release.zip";} {print $1}'`
download_file "${_webroot}/lastStableBuild/artifact/nbbuild/${_file}"
cd "$srcdir"
ln -fs "${SRCDEST}/${_file}"
extract_file "${_file}"
}
pkgver() {
cd "${SRCDEST}"
grep -e '-release.zip' webindex \
| awk 'BEGIN{FPAT="NetBeans-dev-netbeans-linux-[[:digit:]]+-on-[[:digit:]]+-release.zip";} {print $1}' \
| awk 'BEGIN{FPAT="[[:digit:]]+";} {print $2"."$1}'
}
build() {
msg2 "cleanup OS specific files"
rm $(find -name '*\.exe' -or -name '*\.bat' -or -name '*\.dll')
rm -r $(find -name 'MacOSX*' -or -name 'Windows*' -or -name 'SunOS*' -or -name 'FreeBSD*')
rm -r $(find -name 'hpux*' -or -name 'mac*' -or -name 'solaris*' -or -name 'windows*')
rm -r $(find -name '*-sparc_64' -or -name 'linux-arm*')
gendesk -f -n --pkgname "$pkgname" --pkgdesc "$pkgdesc" \
--custom "StartupWMClass=NetBeans IDE Dev"
setconf "netbeans/bin/netbeans" basedir "/usr/lib/$pkgname"
}
package() {
mkdir -p "$pkgdir"/usr/{bin,lib}
# Resources
cp -r netbeans "$pkgdir/usr/lib/$pkgname"
# Desktop shortcut and icon
install -Dm644 "$pkgname.desktop" "$pkgdir/usr/share/applications/$pkgname.desktop"
install -Dm644 netbeans-nightly.png "$pkgdir/usr/share/pixmaps/$pkgname.png"
ln -fs "/usr/lib/$pkgname/bin/netbeans" "$pkgdir/usr/bin/$pkgname"
}
# vim:set ts=4 sw=4 ai:
|