-
Notifications
You must be signed in to change notification settings - Fork 0
/
snapcraft.yaml
58 lines (56 loc) · 2.28 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
name: foglamp
version: 1.1.1
summary: FogLAMP is the ultimate IoT solution stack.
description: FogLAMP is the ultimate IoT solution stack.
confinement: devmode
grade: devel
apps:
foglamp:
command: usr/bin/wrapper-foglamp
plugs: [network]
fogbench:
command: usr/bin/wrapper-fogbench
plugs: [network]
fogupdate:
command: usr/bin/wrapper-fogupdate
plugs: [network]
parts:
foglamp-python-requirements:
source: https://github.com/foglamp/FogLAMP.git
source-branch: master
requirements: python/requirements.txt
plugin: python
python-version: python3
stage-packages:
- python3-dbus
foglamp:
source: https://github.com/foglamp/FogLAMP.git
source-branch: master
build-packages:
- cmake
- g++
- libpq-dev
- libboost-dev
- libboost-system-dev
- libboost-thread-dev
- python-dbus
stage-packages:
- curl
- postgresql
- bluez
plugin: make
install: |
echo -n "Copying Update Task 'scripts/update' to $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/scripts/tasks ..."
cp ../../../scripts/tasks/update $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/scripts/tasks && echo " done" || exit 1
echo -n "Copying Snap Updater 'scripts/package/snap-get.sh' to $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/scripts/common ..."
cp ../../../scripts/package/snap-get.sh $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/scripts/common && echo " done" || exit 1
echo -n "Copying 'foglamp_update' from '${SNAPCRAFT_PART_INSTALL}/../src/scripts/extras/foglamp_update' to '$SNAPCRAFT_PART_INSTALL/usr/local/foglamp/bin' ..."
cp ${SNAPCRAFT_PART_INSTALL}/../src/scripts/extras/foglamp_update $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/bin && echo " done" || exit 1
sed -i "$ a\unix_socket_directories = '/tmp'" $SNAPCRAFT_PART_INSTALL/usr/share/postgresql/*/postgresql.conf.sample
cd $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/plugins/storage/postgres ; ln -s ../../../../../lib/postgresql/* $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/plugins/storage/postgres/pgsql
sed -i 's/"managed" : false/"managed" : true/g' $SNAPCRAFT_PART_INSTALL/usr/local/foglamp/data/etc/foglamp.json
wrapper:
after:
- foglamp
plugin: make
source: .