From 7b7b760d01d17ce1de23f2e31a6ebaa2f9819aea Mon Sep 17 00:00:00 2001 From: Philip Roche Date: Thu, 25 Aug 2016 10:55:16 +0100 Subject: [PATCH 1/3] Initial snapcraft.yaml for producing snap of fswebcam Using the Snapcraft packaging tool for snappy and the snapcraft.yaml file you can now build an fswebcam snap and install on any OS with snappy installed. See http://snapcraft.io/ for more details on snappy. The current snapcraft.yaml will only work in devmode which is much more permissive than strict mode. A version using strict mode will follow soon. Steps: $ sudo apt install snapcraft $ git clone git@github.com:philroche/fswebcam.git $ snapcraft $ snapcraft install fswebcam_0_amd64.snap --devmode $ /snap/bin/fswebcam photo.jpg --- snapcraft.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 snapcraft.yaml diff --git a/snapcraft.yaml b/snapcraft.yaml new file mode 100644 index 0000000..a58891f --- /dev/null +++ b/snapcraft.yaml @@ -0,0 +1,27 @@ +name: fswebcam # the name of the snap +version: 0 # the version of the snap +summary: Snap of fswebcam # 79 char long summary +description: Snap of fswebcam # a longer description for the snap +confinement: devmode # use "strict" to enforce system access only via declared interfaces + +apps: + fswebcam: + command: fswebcam + +parts: + fswebcam: # Replace with a part name of your liking + # Get more information about plugins by running + # snapcraft help plugins + # and more information about the available plugins + # by running + # snapcraft list-plugins + plugin: autotools + source: . + build-packages: + # Here for the plugins-- they're not linked in automatically. + - libgd-dev + - libgd3 + stage-packages: + # Here for the plugins-- they're not linked in automatically. + - libgd3 + \ No newline at end of file From 4f70317ce2c90527ac40589b17d4fb5a38d4fea8 Mon Sep 17 00:00:00 2001 From: Philip Roche Date: Thu, 25 Aug 2016 10:55:40 +0100 Subject: [PATCH 2/3] Ignore any snappy related build files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 0ab185a..543feca 100644 --- a/.gitignore +++ b/.gitignore @@ -17,3 +17,7 @@ config.log config.status *.cache +/parts/ +/prime/ +/stage/ +*.snap From 25e1a2bcf377d83b05c3efca00e521723c5e514c Mon Sep 17 00:00:00 2001 From: Philip Roche Date: Thu, 25 Aug 2016 12:06:50 +0100 Subject: [PATCH 3/3] Strict mode of fswebcam snapcraft.yaml added. To use strict mode you must connect the camera interface manually. See steps below for usage. Steps to use: $ snapcraft $ snap install fswebcam_1_amd64.snap --devmode $ sudo snap connect fswebcam:camera ubuntu-core:camera $ /snap/bin/fswebcam photo.jpg --- snapcraft.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index a58891f..f94140a 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,12 +1,15 @@ name: fswebcam # the name of the snap -version: 0 # the version of the snap +version: 1 # the version of the snap summary: Snap of fswebcam # 79 char long summary description: Snap of fswebcam # a longer description for the snap -confinement: devmode # use "strict" to enforce system access only via declared interfaces +confinement: strict # use "strict" to enforce system access only via declared interfaces apps: fswebcam: command: fswebcam + plugs: + - home + - camera parts: fswebcam: # Replace with a part name of your liking