-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
243 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,11 @@ | ||
# snapcraft specifics | ||
parts | ||
stage | ||
prime | ||
*.snap | ||
.snapcraft | ||
__pycache__ | ||
*.pyc | ||
|
||
# generated | ||
snap/snapcraft.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# all sources should have &r=1 amended | ||
latest: 2024-12R | ||
2024-12R: | ||
eclipse-java: | ||
amd64: | ||
source: https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-12/R/eclipse-java-2024-12-R-linux-gtk-x86_64.tar.gz&r=1 | ||
checksum: "sha512/dae3fdace259f237afaadad98ac3c16bf571eb7e2704200e5159de9a6bde594c4112e983dd0eac3c35c0fd5325f1cf9d798e2fd511a5059fc02ceca71391927c" | ||
arm64: | ||
source: https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-12/R/eclipse-java-2024-12-R-linux-gtk-aarch64.tar.gz&r=1 | ||
checksum: "sha512/03f0cd430c106995396acd4cb9a59037174bab75eee0089521b4872281b837c1ed5e6975d8e942ff96419ef4c87158fd4f0936f7dac2d6229197c4c79ef337f1" | ||
eclipse-pde: | ||
amd64: | ||
source: https://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/2024-12/R/eclipse-committers-2024-12-R-linux-gtk-x86_64.tar.gz&r=1 | ||
checksum: "sha512/133dfeb699fe604c24d96ec521dfb201196505eaceaefd62f1d00e5d87953ee224839f113a1603c4c8dfec433155827c2d175a5ad838e6d32a7dd477a728c620" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
yglu | ||
setuptools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
SOURCE=$(dirname -- ${BASH_SOURCE[0]}) | ||
echo source-root: $SOURCE | ||
|
||
export ECLIPSE_PACKAGE=${ECLIPSE_PACKAGE:='eclipse-java'} | ||
echo setting up for $ECLIPSE_PACKAGE | ||
export ECLIPSE_CONFINED=${ECLIPSE_CONFINED:=false} | ||
echo confinedment is enabled? $ECLIPSE_CONFINED | ||
|
||
SNAPCRAFT_YAML=$SOURCE/snap/snapcraft.yaml | ||
if $ECLIPSE_CONFINED; then | ||
SNAPCRAFT_YAML_TEMPLATE=snapcraft.yaml.template_confined | ||
else | ||
SNAPCRAFT_YAML_TEMPLATE=snapcraft.yaml.template | ||
fi | ||
|
||
YGLU_ENABLE_ENV=true pipx run --pip-args "-r requirements.txt" yglu snapcraft.yaml.template | tee $SNAPCRAFT_YAML | ||
|
||
if [ $? -eq 0 ]; then | ||
echo written $SNAPCRAFT_YAML for $ECLIPSE_PACKAGE. | ||
else | ||
echo ERROR see above. | ||
return 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,137 @@ | ||
ename: !- $env[ECLIPSE_PACKAGE] | ||
name: !? .ename | ||
base: core24 | ||
|
||
epackages: !- $import('eclipse-packages.yaml') | ||
version: !? .epackages.latest | ||
|
||
summary: Extensible Tool Platform and Java IDE | ||
description: | ||
Eclipse provides IDEs and platforms for nearly every language and architecture. | ||
We are famous for our Java IDE, C/C++, JavaScript and PHP IDEs built on extensible | ||
platforms for creating desktop, Web and cloud IDEs. These platforms deliver the most | ||
extensive collection of add-on tools available for software developers. | ||
|
||
grade: stable | ||
confinement: strict | ||
|
||
compression: lzo | ||
|
||
platforms: | ||
amd64: | ||
build-on: amd64 | ||
|
||
apps: | ||
!? .ename: | ||
command: bin/eclipse-wrapper | ||
extensions: [gnome] | ||
desktop: eclipse.desktop | ||
environment: | ||
## https://docs.gtk.org/glib/running.html#environment-variables | ||
G_MESSAGES_DEBUG: all | ||
## https://docs.mesa3d.org/envvars.html | ||
LIBGL_DEBUG: 1 | ||
DRI_PRIME_DEBUG: 1 | ||
MESA_DEBUG: 1 | ||
MESA_VK_DEVICE_SELECT_DEBUG: 1 | ||
# AMD_DEBUG: all | ||
## https://trac.webkit.org/wiki/EnvironmentVariables | ||
WEBKIT_DEBUG: all | ||
plugs: | ||
- personal-sourcedir | ||
- personal-workspace | ||
- personal-gitconfig | ||
- personal-sshid | ||
- personal-maven-cache | ||
- network | ||
|
||
plugs: | ||
personal-sourcedir: | ||
interface: personal-files | ||
write: | ||
- $HOME/projs | ||
personal-workspace: | ||
interface: personal-files | ||
write: | ||
- $HOME/eclipse-workspace | ||
personal-gitconfig: | ||
interface: personal-files | ||
write: | ||
- $HOME/.gitconfig | ||
personal-sshid: | ||
interface: ssh-keys | ||
personal-maven-cache: | ||
interface: personal-files | ||
write: | ||
- $HOME/.m2 | ||
|
||
parts: | ||
eclipse: | ||
plugin: dump | ||
source-type: tar | ||
source: # TODO use for loop here | ||
- on amd64: !? .epackages[$_.version][$_.name].amd64.source | ||
- on arm64: !? .epackages[$_.version][$_.name].arm64.source | ||
# TODO use source-checksum once supported in multiarch setting | ||
organize: | ||
'configuration': 'usr/lib/eclipse/configuration' | ||
'dropins': 'usr/lib/eclipse/dropins' | ||
'features': 'usr/lib/eclipse/features' | ||
'p2': 'usr/lib/eclipse/p2' | ||
'plugins': 'usr/lib/eclipse/plugins' | ||
'readme': 'usr/lib/eclipse/readme' | ||
'.eclipseproduct': 'usr/lib/eclipse/.eclipseproduct' | ||
'artifacts.xml': 'usr/lib/eclipse/artifacts.xml' | ||
'eclipse': 'usr/lib/eclipse/eclipse' | ||
'eclipse.ini': 'usr/lib/eclipse/eclipse.ini' | ||
'icon.xpm': 'usr/lib/eclipse/icon.xpm' | ||
build-attributes: | ||
- no-patchelf | ||
stage-packages: | ||
- libffi7 | ||
- libfreetype6 | ||
- libpng16-16 | ||
- libgdk-pixbuf2.0-0 | ||
- libsecret-1-0 | ||
- libasound2 | ||
- libxi6 | ||
- libxrender1 | ||
- libxtst6 | ||
override-prime: | | ||
craftctl default | ||
find $SNAPCRAFT_PRIME/usr/lib/eclipse/ -type d -exec chmod 755 {} \; | ||
find $SNAPCRAFT_PRIME/usr/lib/eclipse/ -type f -exec chmod 644 {} \; | ||
find $SNAPCRAFT_PRIME/usr/lib/eclipse/ -type f -exec chmod +x {} \; | ||
rm -r $SNAPCRAFT_PRIME/usr/lib/eclipse/plugins/com.sun.jna_*v*/com/sun/jna/aix*/ | ||
rm -r $SNAPCRAFT_PRIME/usr/lib/eclipse/plugins/com.sun.jna_*v*/com/sun/jna/darwin*/ | ||
rm -r $SNAPCRAFT_PRIME/usr/lib/eclipse/plugins/com.sun.jna_*v*/com/sun/jna/freebsd*/ | ||
rm -r $SNAPCRAFT_PRIME/usr/lib/eclipse/plugins/com.sun.jna_*v*/com/sun/jna/openbsd*/ | ||
rm -r $SNAPCRAFT_PRIME/usr/lib/eclipse/plugins/com.sun.jna_*v*/com/sun/jna/sunos*/ | ||
rm -r $SNAPCRAFT_PRIME/usr/lib/eclipse/plugins/com.sun.jna_*v*/com/sun/jna/win32*/ | ||
after: | ||
- eclipse_deps | ||
wrappers: | ||
plugin: dump | ||
source: snap/local/wrappers | ||
organize: | ||
eclipse: bin/eclipse-wrapper | ||
eclipse_desktop: | ||
plugin: dump | ||
source: snap/gui | ||
eclipse_deps: | ||
plugin: nil | ||
stage-snaps: | ||
- git-confined | ||
|
||
layout: | ||
/usr/local/bin: | ||
bind: $SNAP/usr/bin | ||
/usr/libexec/git-core: | ||
symlink: $SNAP/usr/libexec/git-core | ||
/usr/share/git-core: | ||
symlink: $SNAP/usr/share/git-core | ||
|
||
lint: | ||
ignore: | ||
- library: | ||
- usr/lib/**/*.so* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
if [ -n $1 ]; then | ||
ECLIPSE_PACKAGE=$1 | ||
fi | ||
|
||
export ECLIPSE_PACKAGE=${ECLIPSE_PACKAGE:='eclipse-java'} | ||
export ECLIPSE_CONFINED=${ECLIPSE_CONFINED:=false} | ||
|
||
. ./set-eclipse-package.sh | ||
|
||
CLEAN=${CLEAN:=false} | ||
|
||
if $CLEAN; then | ||
sudo snap remove --purge $ECLIPSE_PACKAGE | ||
snapcraft clean | ||
fi | ||
|
||
# sudo less /var/snap/lxd/common/lxd/logs/lxd.log | ||
snapcraft pack --debug | ||
|
||
AUTORUN=${AUTORUN:=false} | ||
if $AUTORUN; then | ||
if $ECLIPSE_CONFINED; then | ||
sudo snap install ./$(echo $ECLIPSE_PACKAGE)_*_$(dpkg --print-architecture).snap --dangerous | ||
else | ||
sudo snap install ./$(echo $ECLIPSE_PACKAGE)_*_$(dpkg --print-architecture).snap --dangerous --classic | ||
fi | ||
snap run $ECLIPSE_PACKAGE & | ||
fi |