-
Notifications
You must be signed in to change notification settings - Fork 75
/
snapcraft.yaml
237 lines (232 loc) · 6.6 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
# Denarius - Snapcraft Build - Known to build in most Ubuntu versions
# https://denarius.io
# https://github.com/carsenk/denarius
# By Carsen Klock
name: denarius
version: '3.3.9.14'
summary: Denarius
description: |
An open source hybrid cryptocurrency called Denarius, which features Fortuna Stakes (Masternodes), Staking, Mining, Multisig, and much more!
grade: stable
confinement: strict
plugs: # plugs for theming, font settings, cursor and to use gtk3 file chooser
gtk-3-themes:
interface: content
target: $SNAP/data-dir/themes
default-provider: gtk-common-themes:gtk-3-themes
icon-themes:
interface: content
target: $SNAP/data-dir/icons
default-provider: gtk-common-themes:icon-themes
sound-themes:
interface: content
target: $SNAP/data-dir/sounds
default-provider: gtk-common-themes:sounds-themes
apps:
denariusd:
command: bin/denariusd
plugs: [home, network, network-bind]
daemon: forking
daemon:
command: bin/denariusd
plugs: [home, network, network-bind]
environment:
XDG_DATA_DIRS: $SNAP_USER_DATA:/var/lib/snapd/desktop:$XDG_DATA_DIRS
# Override HOME so the datadir is located at
# ~/snap/denarius/common/.denarius/ instead of
# ~/snap/denarius/current/.denarius/, and each new version of the
# snap won't have a different data directory:
# https://docs.snapcraft.io/environment-variables/7983
HOME: $SNAP_USER_COMMON
denarius:
command: desktop-launch $SNAP/bin/Denarius
plugs: [home, network, network-bind, unity7, wayland, desktop-legacy, desktop, x11, gsettings]
desktop: denarius.desktop
environment:
QT_QPA_PLATFORMTHEME: gtk3
XDG_DATA_DIRS: $SNAP_USER_DATA:/var/lib/snapd/desktop:$XDG_DATA_DIRS
HOME: $SNAP_USER_COMMON
parts:
openssl:
plugin: nil
source: https://www.openssl.org/source/openssl-1.0.1j.tar.gz
build-packages:
- g++
- build-essential
- libtool
override-build: |
echo "Downgrading OpenSSL to 1.0.1j"
sudo ./config
sudo make
echo "Make depends OpenSSL to 1.0.1j"
sudo make depend
echo "Make install OpenSSL to 1.0.1j"
sudo make install
echo "Linking OpenSSL to 1.0.1j"
sudo ln -sf /usr/local/ssl/bin/openssl `which openssl`
daemon:
source: https://github.com/carsenk/denarius.git
source-type: git
source-tag: master
plugin: nil
build-packages:
- g++
- jq
- wget
- unzip
- curl
- build-essential
- apt-transport-https
- zlib1g-dev
- libdb++-dev
- libboost-all-dev
- libqrencode-dev
- libminiupnpc-dev
- libevent-dev
- libcurl4-openssl-dev
- libssl-dev
- libtool
stage-packages:
- g++
- jq
- wget
- unzip
- curl
- build-essential
- apt-transport-https
- zlib1g-dev
- libdb++-dev
- libboost-all-dev
- libqrencode-dev
- libminiupnpc-dev
- libevent-dev
- libcurl4-openssl-dev
- libssl-dev
- libtool
override-build: |
set -x
ARCH=$(uname -m)
MF=makefile.unix
if [ "$ARCH" = "x86_64" ]; then
MF="makefile.unix"
elif [ "$ARCH" = "i686" ] || [ "$ARCH" = "i386" ]; then
MF="makefile.arm"
elif [ "$ARCH" = "armv7l" ] || [ "$ARCH" = "armv6l" ]; then
MF="makefile.arm"
elif [ "$ARCH" = *"armv8"* ] || [ "$ARCH" = "aarch64" ]; then
MF="makefile.arm"
elif [ "$ARCH" = *"mips64le"* ]; then
MF="makefile.arm"
elif [ "$ARCH" = *"mips64"* ]; then
MF="makefile.arm"
elif [ "$ARCH" = *"mipsle"* ]; then
MF="makefile.arm"
elif [ "$ARCH" = *"mips"* ]; then
MF="makefile.arm"
elif [[ "$ARCH" == "ppc64le" ]]; then
MF="makefile.arm"
elif [[ "$ARCH" == "ppc64" ]]; then
MF="makefile.arm"
fi
cd src
OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib make -f "${MF}" -j4
cp $SNAPCRAFT_PART_BUILD/src/denariusd $SNAPCRAFT_PART_INSTALL/bin
denarius:
source: https://github.com/carsenk/denarius.git
source-type: git
source-tag: master
plugin: qmake
qt-version: qt5
build-packages:
- g++
- jq
- wget
- unzip
- curl
- build-essential
- apt-transport-https
- zlib1g-dev
- libdb++-dev
- libboost-all-dev
- libqrencode-dev
- libminiupnpc-dev
- libevent-dev
- libcurl4-openssl-dev
- libssl-dev
- libtool
- libqt5gui5
- libqt5core5a
- libqt5dbus5
- qttools5-dev
- qttools5-dev-tools
- qt5-default
- qtbase5-dev-tools
stage-packages:
- g++
- jq
- wget
- unzip
- curl
- build-essential
- apt-transport-https
- zlib1g-dev
- libdb++-dev
- libboost-all-dev
- libqrencode-dev
- libminiupnpc-dev
- libevent-dev
- libcurl4-openssl-dev
- libssl-dev
- libtool
- libqt5gui5
- libqt5core5a
- libqt5dbus5
- qttools5-dev
- qttools5-dev-tools
- qt5-default
- qtbase5-dev-tools
- qtwayland5
override-build: |
set -x
ARCH=$(uname -m)
MF=USE_NATIVETOR=1
if [ "$ARCH" = "x86_64" ]; then
MF="USE_NATIVETOR=1"
elif [ "$ARCH" = "i686" ] || [ "$ARCH" = "i386" ]; then
MF="USE_NATIVETOR=-"
elif [ "$ARCH" = "armv7l" ] || [ "$ARCH" = "armv6l" ]; then
MF="USE_NATIVETOR=-"
elif [ "$ARCH" = *"armv8"* ] || [ "$ARCH" = "aarch64" ]; then
MF="USE_NATIVETOR=-"
elif [ "$ARCH" = *"mips64le"* ]; then
MF="USE_NATIVETOR=-"
elif [ "$ARCH" = *"mips64"* ]; then
MF="USE_NATIVETOR=-"
elif [ "$ARCH" = *"mipsle"* ]; then
MF="USE_NATIVETOR=-"
elif [ "$ARCH" = *"mips"* ]; then
MF="USE_NATIVETOR=-"
elif [[ "$ARCH" == "ppc64le" ]]; then
MF="USE_NATIVETOR=-"
elif [[ "$ARCH" == "ppc64" ]]; then
MF="USE_NATIVETOR=-"
fi
qmake "USE_UPNP=1" "USE_QRCODE=1" "${MF}" OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib denarius-qt.pro
OPENSSL_INCLUDE_PATH=/usr/local/ssl/include OPENSSL_LIB_PATH=/usr/local/ssl/lib make -j4
cp Denarius $SNAPCRAFT_PART_INSTALL/bin
after: [desktop-qt5]
desktop:
source: snap/gui
plugin: dump
hooks:
plugin: dump
source: hooks/
organize:
bin/: snap/hooks/
hooks:
install:
plugs: [network, network-bind]
post-refresh:
plugs: [network, network-bind]
configure:
plugs: [network, network-bind]