-
Notifications
You must be signed in to change notification settings - Fork 49
/
snapcraft.yaml.in
66 lines (60 loc) · 2.78 KB
/
snapcraft.yaml.in
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
name: coq-prover
base: core18
version: '@@PLATFORM_RELEASE@@'
summary: Coq
description: |
@@COQ_DESCRIPTION@@
grade: stable
confinement: strict
parts:
coq:
plugin: nil
build-packages: [build-essential, curl, m4, unzip, git]
stage-packages: [make, libmpfr6, libgmp10]
source: .
source-type: local
override-build: |
if [ -d $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/ ]; then exit 0; fi
# build
echo "COQ_PLATFORM_RELEASE=@@PLATFORM_RELEASE@@" >> package_picks/coq_platform_release.sh
echo "COQ_PLATFORM_SWITCH_NAME=@@PLATFORM_RELEASE@@" >> package_picks/coq_platform_switch_name.sh
echo "COQ_PLATFORM_REPO_NAME=@@PLATFORM_RELEASE@@" >> package_picks/coq_platform_switch_name.sh
COQREGTESTING=y OPAMROOT=$SNAPCRAFT_PART_INSTALL/coq-platform/ ./coq_platform_make.sh @@PLATFORM_ARGS@@ -dumplogs
# cleanup
OPAMROOT=$SNAPCRAFT_PART_INSTALL/coq-platform/ opam clean
find $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/ \( -name '*.byte.exe' -o -name '*.byte' -o -name '*.cm[aioxt]' -o -name '*.cmxa' -o -name '*.[oa]' -o -name '*.cmti' -o -name '*.glob' \) -type f -delete
find $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/bin/ -maxdepth 1 -mindepth 1 \! \( -name 'coq*' -o -name 'clight*' -o -name 'gappa' \) -exec rm -f {} \;
find $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/lib/ -maxdepth 1 -mindepth 1 \! \( -name 'coq*' -o -name 'stublibs' \) -exec rm -rf {} \;
rm -rf $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/share/ocaml-secondary-compiler
rm -rf $SNAPCRAFT_PART_INSTALL/coq-platform/repo/
wrapper:
plugin: nil
after: [coq]
source: .
source-type: local
override-build: |
# install wrapper for apps
mkdir -p $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/bin/
cp linux/snap/coq_wrapper $SNAPCRAFT_PART_INSTALL/coq-platform/@@PLATFORM_RELEASE@@/bin/
apps:
coqide:
command-chain: [ coq-platform/@@PLATFORM_RELEASE@@/bin/coq_wrapper ]
command: coq-platform/@@PLATFORM_RELEASE@@/bin/coqide
plugs: [desktop, home]
extensions: [gnome-3-28]
coqtop:
plugs: [home]
command-chain: [ coq-platform/@@PLATFORM_RELEASE@@/bin/coq_wrapper ]
command: coq-platform/@@PLATFORM_RELEASE@@/bin/coqtop
coqc:
plugs: [home]
command-chain: [ coq-platform/@@PLATFORM_RELEASE@@/bin/coq_wrapper ]
command: coq-platform/@@PLATFORM_RELEASE@@/bin/coqc
coq-makefile:
plugs: [home]
command-chain: [ coq-platform/@@PLATFORM_RELEASE@@/bin/coq_wrapper ]
command: coq-platform/@@PLATFORM_RELEASE@@/bin/coq_makefile
coqidetop:
plugs: [home,network-bind]
command-chain: [ coq-platform/@@PLATFORM_RELEASE@@/bin/coq_wrapper ]
command: coq-platform/@@PLATFORM_RELEASE@@/bin/coqidetop.opt