-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathsnapcraft.yaml
74 lines (69 loc) · 2.27 KB
/
snapcraft.yaml
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
72
73
74
name: jgex
architectures:
- build-on: amd64
base: core18
version: '0.86'
summary: Java Geometry Expert
description: |
JGEX combines dynamic geometry software,
automated geometry theorem prover and an approach for visually
dynamic presentation of proofs.
grade: stable
confinement: strict
apps:
jgex:
extensions:
- gnome-3-28
command: $SNAP/bin/jgex
environment:
JAVA_HOME: $SNAP/usr/lib/jvm/java-11-openjdk-amd64
PATH: $JAVA_HOME/jre/bin:$PATH
JAVA_OPTS: -Djava.util.prefs.userRoot="$SNAP_USER_DATA"
LIBGL_DRIVERS_PATH: $SNAP/usr/lib/x86_64-linux-gnu/dri
LC_ALL: C.UTF-8
LANG: C.UTF-8
plugs:
- home
- network
- cups-control
parts:
jgex:
build-packages: [gettext, openjdk-11-jdk]
source: https://github.com/kovzol/Java-Geometry-Expert.git
plugin: gradle
source-type: git
override-build: |
snapcraftctl build
./gradlew installDist
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/jgex
cp -a build/install/jgex/lib/*.jar $SNAPCRAFT_PART_INSTALL/usr/share/jgex
mkdir -p $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/examples $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/help $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/import $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/rules $SNAPCRAFT_PART_INSTALL/root
echo "#!/bin/bash" > $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "JGEX_WD=~/.jgex # working directory" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "test -d \$JGEX_WD || (mkdir -p \$JGEX_WD; cd \$SNAP/root; cp -a -u * \$JGEX_WD)" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "cd \$JGEX_WD" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "java -cp \$SNAP/usr/share/jgex/\\* wprover.GExpert \$*" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/jgex
stage-packages:
- bash
- libfreetype6
- libpng16-16
- libpango-1.0-0
- libxext6
- libxrender1
- libgtk-3-0
- libxtst6
- libgl1
- libgl1-mesa-dri
- libgtk2.0-0
- libasound2
- openjdk-11-jre
- firefox
override-prime: |
snapcraftctl prime
rm -f usr/lib/jvm/java-11-openjdk-*/lib/security/blacklisted.certs
rm -fr jar