openrocket/snap/snapcraft.yaml

101 lines
2.7 KiB
YAML
Raw Normal View History

name: openrocket
adopt-info: openrocket
grade: stable
summary: A free, fully featured model rocket simulator.
description: |
OpenRocket is a free, fully featured model rocket simulator that allows you
to design and simulate your rockets before actually building and flying them.
The main features include
* Six-degree-of-freedom flight simulation
* Automatic design optimization
* Realtime simulated altitude, velocity and acceleration display
* Staging and clustering support
* Cross-platform (Java-based)
* Read more about it on the OpenRocket.info.
license: GPL-3.0
base: core22
confinement: strict
plugs:
dot-java-user-prefs-openrocket:
interface: personal-files
read:
- $HOME/.java/.userPrefs/OpenRocket
dot-openrocket:
interface: personal-files
write:
- $HOME/.openrocket
2023-11-20 03:01:36 +01:00
architectures:
- build-on: [amd64]
2023-11-20 03:21:01 +01:00
- build-on: [arm64]
- build-on: [armhf]
- build-on: [ppc64el]
- build-on: [s390x]
2023-11-20 03:01:36 +01:00
apps:
openrocket:
2023-11-21 15:25:30 +01:00
extensions: [gnome]
command: bin/launcher
plugs:
- home
- network
- cups-control
- opengl
- dot-java-user-prefs-openrocket
- dot-openrocket
environment:
2023-11-21 13:20:46 +01:00
JAVA_HOME: "$SNAP/usr/lib/jvm/java-17-openjdk-$CRAFT_TARGET_ARCH"
parts:
openrocket:
plugin: ant
build-packages:
- ant
- ant-contrib
- ant-optional
- openjdk-17-jdk
- openjdk-17-jre
source: .
source-type: git
ant-build-targets:
- clean
- check
- unittest
- jar
override-pull: |
# Override the pull in order to set the version and the grade.
# In the future, the releases can be annotated tags and snapcraft
# will use those for the version numbers.
#
# This can be extended to other parts of OpenRocket (to use the
# git describe --tags command) but the build should be updated at
# the same time so its consistent across all artifacts. Will defer
# that to a later pull request.
#
# Until then, just use the build.version value
2023-11-20 20:41:25 +01:00
craftctl default
VERSION=$(cat core/resources/build.properties | awk -F'=' '/build\.version/ { print $2 }')
2023-11-20 20:41:25 +01:00
craftctl set version="$VERSION"
override-build: |
2023-11-20 20:41:25 +01:00
craftctl default
mv swing/build/jar/OpenRocket.jar $CRAFT_PART_INSTALL/OpenRocket.jar
stage-packages:
2023-11-21 13:20:46 +01:00
- openjdk-17-jdk
2023-11-19 22:24:26 +01:00
- openjdk-17-jre
- ca-certificates
- ca-certificates-java
prime:
- -usr/lib/jvm/java-*/lib/security/cacerts
- -usr/lib/jvm/java-*/jre/lib/security/cacerts
- -usr/lib/jvm/java-*/lib/security/blacklisted.certs
launcher:
plugin: dump
source: snap/local
organize:
'launcher': 'bin/'