This repository has been archived by the owner on Jul 20, 2023. It is now read-only.
generated from snapcrafters/snap-repo-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
121 lines (108 loc) · 4.03 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: dogehouse
version: '0.1'
summary: Taking voice conversations to the moon 🚀
description: |
Livestream Discord-like voice rooms
To open the app, just type 'dogehouse' on your terminal. Desktop icon soon.
# Since we're still testing the Electron app, we'll go into
# the edge/devel channel.
grade: devel
# Chnage this into strict once the essentials are added
confinement: devmode
# Ensure that keep things up-to-date with the latest LTS as possible
# but since Gnome 3.x wants Ububtu Core 18, we need to change that
# into core18 until they support Core 20 finally.
base: core18
# No 32-bit (i386) support as per git-branch:staging:
# baklava/package.json scripts. And also I don't like to
# mess up with arm64 again.
architectures:
- build-on: amd64
run-on: amd64
#- build-on: arm64
# run-on: arm64
# WORK IN PROGRESS / PLEASE PROCEED AT YOUR OWN RISK
# Sidenote: This was copied from https://www.electronjs.org/docs/tutorial/snapcraft#step-1-create-sample-snapcraft-project
# and requires additional work and testing.
apps:
dogehouse:
command: DogeHouse/DogeHouse --no-sandbox
# TODO: Migrate to latest LTS, the docs for migration is still WIP.
extensions: [gnome-3-28]
plugs:
- network
- network-observe
- pluseaudio
- system-observe
- x11
- desktop
environment:
# Correct the TMPDIR path for Chromium Framework/Electron to ensure
# libappindicator has readable resources.
TMPDIR: $XDG_RUNTIME_DIR
parts:
dogehouse:
plugin: nil
source: https://github.com/benawad/dogehouse.git
source-branch: staging
build-environment:
- PATH: "$PATH:$SNAPCRAFT_PART_BUILD/node_modules/.bin:/root/.cargo/bin:/home/ubuntu/.cargo/bin"
override-build: |
PATH=$PATH:$SNAPCRAFT_PART_SRC/../npm/bin
export NPM_PATH=$(command -v npm)
export NODEJS_PATH=$(command -v node)
$NPM_PATH config set unsafe-perm True
# workaround for build.snapcraft.io builds
# https://bugs.launchpad.net/bugs/1886861
if [ -n "$http_proxy" ]; then
echo "Proxy detected! It's at ${http_proxy}"
export ELECTRON_GET_USE_PROXY=1
export GLOBAL_AGENT_HTTP_PROXY="${http_proxy}"
export GLOBAL_AGENT_HTTPS_PROXY="${http_proxy}"
npm config set proxy ${http_proxy}
npm config set https-proxy ${http_proxy}
npm config set strict-ssl false
else
echo "No proxy detected, skipping configuring proxy stuff..."
fi
# install Yarn first
cd baklava
echo "==> Installing Yarn..."
DEBUG=* sudo $NPM_PATH --unsafe --without-ssl install yarn -g
export YARN_PATH=$(command -v yarn)
if [ -n "${http_proxy}" ]; then
yarn config set strict-ssl false
fi
echo "==> Installing build deps..."
DEBUG=* $YARN_PATH install
cargo install nj-cli
echo "==> Building Electron app..."
#for the overlay
echo " Running Overlay builder..."
cd resources/overlay && yarn install && yarn build && cd ../../
# for the global keys
echo " Running Global Keys builder..."
DEBUG=* $YARN_PATH build:globkey
# for building the deb
echo " Building the deb..."
DEBUG=* $YARN_PATH build:linux
echo "==> Copying build files into ${SNAPCRAFT_PART_INSTALL}..."
cp -rv ./builds/DogeHouse-*.deb $SNAPCRAFT_PART_INSTALL/DogeHouse
# for validation purposes only
echo "==> Validating if copied successfully..."
ls $SNAPCRAFT_PART_INSTALL -al
ls $SNAPCRAFT_PART_INSTALL/DogeHouse -al || echo "You didn't copied built fipes into the SNAPCRAFT_PART_INSTALL, aborting..." && exit 1
# Desktop Icons stuff
#sed -i 's|Icon=DogeHouse|Icon=${SNAP}/meta/gui/dogehouse\.png|g' ${SNAP}/meta/gui/dogehouse.desktop
build-snaps:
- node/14/stable
build-packages:
- unzip
- libcurl4
- wget
- libxkbcommon-x11-0
- cargo
- rustc
stage-packages:
- libnss3
- libnspr4