diff --git a/guh.pro b/guh.pro index 7d99b274..02103579 100644 --- a/guh.pro +++ b/guh.pro @@ -73,3 +73,24 @@ contains(DEFINES, GPIO433){ } else { message("Radio 433 for GPIO's disabled") } + +ubuntu { + message("Building Ubuntu snappy package.") + meta.files = meta/package.yaml \ + meta/readme.md + meta.path = /meta/ + + wrapper.files = meta/guhd-wrapper.sh + wrapper.path = /usr/bin/ + + # We need to bring our own Qt libs, at least for now + qtlibs.files=/usr/lib/arm-linux-gnueabihf/libQt5Network.so.5 \ + /usr/lib/arm-linux-gnueabihf/libQt5Sql.so.5 \ + /usr/lib/arm-linux-gnueabihf/libQt5Core.so.5 \ + /usr/lib/arm-linux-gnueabihf/libicui18n.so.52 \ + /usr/lib/arm-linux-gnueabihf/libicuuc.so.52 \ + /usr/lib/arm-linux-gnueabihf/libicudata.so.52 + qtlibs.path=/usr/lib/ + + INSTALLS += meta wrapper qtlibs +} diff --git a/meta/create_snap.sh b/meta/create_snap.sh new file mode 100755 index 00000000..7a693aac --- /dev/null +++ b/meta/create_snap.sh @@ -0,0 +1,3 @@ +#!/bin/bash + + diff --git a/meta/guhd-wrapper.sh b/meta/guhd-wrapper.sh new file mode 100755 index 00000000..8a889523 --- /dev/null +++ b/meta/guhd-wrapper.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +export LD_LIBRARY_PATH=$SNAPP_APP_PATH/usr/lib:$LD_LIBRARY_PATH +$SNAPP_APP_PATH/usr/bin/guhd -n diff --git a/meta/package.yaml b/meta/package.yaml new file mode 100644 index 00000000..53d74d01 --- /dev/null +++ b/meta/package.yaml @@ -0,0 +1,16 @@ +name: guh +version: 0.1.0 +architecture: [armhf] +services: + - name: guhd + start: usr/bin/guhd-wrapper.sh + description: "guhd - gear up your home daemon" + security-template: unconfined + caps: + - networking + - network-service +binaries: + - name: guh-webserver + start: usr/bin/guh-webserver + - name: guh-cli + exec: usr/bin/guh-cli diff --git a/meta/readme.md b/meta/readme.md new file mode 100644 index 00000000..9c123744 --- /dev/null +++ b/meta/readme.md @@ -0,0 +1,3 @@ +guh - gear up your home! + +TODO: Some readme stuff