-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
77 lines (72 loc) · 2.57 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
75
76
77
name: salawat
base: core18
version: '1.0.3'
summary: Ligthweight and elegant prayer times (Adhan) app.
description: |
Fast, elegant and higly customizable prayer times (Adhan) app for Muslims around the world.
It features multi-language support, custom appearance and audio, advanced prayer times options and much more.
grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
apps:
salawat:
command: desktop-launch $SNAP/bin/salawat
plugs: [home, x11, opengl, network, audio-playback, pulseaudio]
extensions: [ gnome-3-28 ]
environment:
XDG_DATA_HOME: "$SNAP/usr/share"
JAVA_HOME: "$SNAP/usr/lib/jvm/java-17-openjdk-amd64"
JAVA_BIN: "$SNAP/usr/lib/jvm/java-17-openjdk-amd64/bin/java"
PATH: "$SNAP/bin:$PATH:$SNAP/usr/lib/jvm/java-17-openjdk-amd64/bin"
LD_LIBRARY_PATH: "$SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/pulseaudio"
ALSA_CONFIG_PATH: "${SNAP}/etc/asound.conf"
SALAWAT_PATH: "$SNAP/bin/Salawat.jar"
layout:
/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib:
bind: $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/alsa-lib
parts:
alsa-pulseaudio:
plugin: dump
source: .
override-pull: |
mkdir etc -p
cat > etc/asound.conf <<EOF
pcm.!default {
type pulse
fallback "sysdefault"
hint {
show on
description "Default ALSA Output (currently PulseAudio Sound Server)"
}
}
ctl.!default {
type pulse
fallback "sysdefault"
}
EOF
salawat:
plugin: nil
override-build: |
mkdir -p $SNAPCRAFT_PART_INSTALL/bin
wget -O $SNAPCRAFT_PART_INSTALL/bin/Salawat.jar https://github.com/DBChoco/Salawat/releases/download/v1.0.3/Salawat-1.0.3.jar
echo '$SNAP/usr/lib/jvm/java-17-openjdk-amd64/bin/java -Djavax.net.ssl.trustStore=$SNAP/etc/ssl/certs/java/cacerts -jar $SNAP/bin/Salawat.jar' > $SNAPCRAFT_PART_INSTALL/bin/salawat
chmod +x $SNAPCRAFT_PART_INSTALL/bin/salawat
stage-packages:
- ca-certificates
- ca-certificates-java
- openjdk-17-jre
- libpulse0
- libpulsedsp
- libasound2-plugins
- ubuntu-restricted-extras
- ffmpeg
build-packages:
- wget
- openjdk-17-jre
- ca-certificates-java
- ca-certificates
prime:
- -usr/lib/jvm/java-*/lib/security/cacerts
- -usr/lib/jvm/java-*/jre/lib/security/cacerts
override-prime: |
snapcraftctl prime
rm -vf usr/lib/jvm/java-11-openjdk-*/lib/security/blacklisted.certs