mirror of
https://gitdl.cn/https://github.com/chakralinux/gtk.git
synced 2025-02-03 02:47:14 +08:00
92 lines
2.5 KiB
Bash
92 lines
2.5 KiB
Bash
pkgbase=eclipse
|
|
pkgname=(eclipse-{common,java,jee,cpp,php,javascript})
|
|
pkgver=4.10
|
|
pkgrel=3
|
|
_release=2018-12
|
|
pkgdesc="Highly extensible IDE"
|
|
license=(EPL)
|
|
arch=(x86_64)
|
|
url="https://eclipse.org"
|
|
makedepends=(python3)
|
|
options=(!emptydirs)
|
|
source=(commonify)
|
|
noextract=()
|
|
|
|
for _pkg in ${pkgname[@]}; do
|
|
[[ $_pkg == 'eclipse-common' ]] && continue
|
|
source+=(http://ftp-stud.fht-esslingen.de/pub/Mirrors/eclipse/technology/epp/downloads/release/$_release/R/$_pkg-$_release-R-linux-gtk-x86_64.tar.gz)
|
|
noextract+=($_pkg-$_release-R-linux-gtk-x86_64.tar.gz)
|
|
eval "package_$_pkg() { _package $_pkg; }"
|
|
done
|
|
|
|
sha256sums=('da1eaf6239cb0c2b5009cd8c261e96e7b17a7536b12fe60fcb1e903f5e67dbdc'
|
|
'd3bcf5e428de4d123eea4349f70a53180cc1aba4985c99018172340b9d54e2b7'
|
|
'bfa929e417562d8ef41562c78fd492b5e20e05c039c9e177888dc688878dfcff'
|
|
'ec936dcba42a4b4affe0d6deb8dbc62d68ea3cc4c6fcf0eb534b45ca1c990bbf'
|
|
'5f2c7a456c7c357f98ed1b976d00048f846592c21221e60c76bb263597704543'
|
|
'1bd80dfc177326183af0334f018bff48b4c70331bd0a62f907428faa267932f2')
|
|
|
|
prepare() {
|
|
local pkg
|
|
for pkg in ${pkgname[@]}; do
|
|
mkdir $pkg
|
|
[[ $pkg == eclipse-common ]] && continue
|
|
bsdtar -xf "$pkg-$_release-R-linux-gtk-x86_64.tar.gz" -C $pkg --strip-components 1
|
|
done
|
|
}
|
|
|
|
build() {
|
|
mkdir eclipse-common/dropins
|
|
touch eclipse-common/dropins/.keep
|
|
./commonify --identical ${pkgname[@]}
|
|
}
|
|
|
|
package_eclipse-common() {
|
|
pkgdesc+=" (common files)"
|
|
depends=("java-environment>=8" libwebkit-gtk2 unzip)
|
|
|
|
install -d "$pkgdir/usr/lib"
|
|
cp -a eclipse-common "$pkgdir/usr/lib/eclipse"
|
|
|
|
install -D /dev/stdin "$pkgdir/usr/bin/eclipse" <<END
|
|
#!/bin/bash
|
|
export ECLIPSE_HOME=/usr/lib/eclipse
|
|
exec \$ECLIPSE_HOME/eclipse "\$@"
|
|
END
|
|
|
|
install -Dm644 /dev/stdin "$pkgdir/usr/share/applications/eclipse.desktop" <<END
|
|
[Desktop Entry]
|
|
Name=Eclipse
|
|
Comment=A Java Development Environment
|
|
Icon=eclipse
|
|
Exec=eclipse
|
|
Terminal=false
|
|
Type=Application
|
|
Categories=Development;IDE;Java;
|
|
StartupNotify=true
|
|
END
|
|
|
|
local i
|
|
for i in 16 32 48 256; do
|
|
install -Dm644 eclipse-common/plugins/org.eclipse.platform_*/eclipse$i.png \
|
|
"$pkgdir/usr/share/icons/hicolor/${i}x$i/apps/eclipse.png"
|
|
done
|
|
}
|
|
|
|
_package() {
|
|
local variant=${1#eclipse-}
|
|
pkgdesc+=" (${variant^^} variant)"
|
|
depends=(eclipse-common)
|
|
provides=("eclipse=$pkgver-$pkgrel")
|
|
conflicts=(eclipse)
|
|
|
|
case $variant in
|
|
java) replaces=(eclipse) ;;
|
|
cpp) replaces=(eclipse-cdt) ;;
|
|
esac
|
|
|
|
install -d "$pkgdir/usr/lib"
|
|
cp -a $1 "$pkgdir/usr/lib/eclipse"
|
|
}
|
|
|