From 226adc4c9bb46c99f42223571f52331c59447f42 Mon Sep 17 00:00:00 2001 From: Lee Trager Date: Tue, 9 Aug 2016 11:16:31 -0700 Subject: [PATCH 1/3] Add snap packaging support --- .gitignore | 5 +++++ Makefile.am | 9 +++++++++ snapcraft.yaml.template | 22 ++++++++++++++++++++++ 3 files changed, 36 insertions(+) create mode 100644 snapcraft.yaml.template diff --git a/.gitignore b/.gitignore index 666749f5bf..464f1ff52b 100644 --- a/.gitignore +++ b/.gitignore @@ -49,3 +49,8 @@ tests/*.trs cscope.in.out cscope.out cscope.po.out + +snapcraft.yaml +jq_*.snap +prime +setup diff --git a/Makefile.am b/Makefile.am index 2a3aded4cd..114bac7d6a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -175,6 +175,15 @@ rpm: dist jq.spec find rpm/RPMS/ -name "*.rpm" -exec mv {} ./ \; rm -rf rpm +snap: snapcraft.yaml.template + @echo "Packaging jq as a snap..." + mkdir -p setup/gui + cp docs/public/jq.png setup/gui/icon.png + cp COPYING setup/license.txt + rm -f snapcraft.yaml + sed 's/@JQ_VERSION@/1.5/g' snapcraft.yaml.template > snapcraft.yaml + snapcraft snap + dist-clean-local: rm -f ${BUILT_SOURCES} diff --git a/snapcraft.yaml.template b/snapcraft.yaml.template new file mode 100644 index 0000000000..5355a1c0d5 --- /dev/null +++ b/snapcraft.yaml.template @@ -0,0 +1,22 @@ +name: jq +version: @JQ_VERSION@ +summary: jq is a lightweight and flexible command-line JSON processor. +description: jq is like sed for JSON data - you can use it to slice and filter and map and transform structured data with the same ease that sed, awk, grep and friends let you play with text. +confinement: strict + +apps: + jq: + command: bin/jq + +parts: + jq: + plugin: autotools + source: . + filesets: + binaries: + - bin/jq + - lib/libjq.so* + stage: + - $binaries + snap: + - $binaries From 9c220c878587603a6ef78c493c691aa8d418482c Mon Sep 17 00:00:00 2001 From: Lee Trager Date: Tue, 9 Aug 2016 11:51:53 -0700 Subject: [PATCH 2/3] Attempt to fix OS X travis.ci build --- .travis.yml | 4 ++++ AUTHORS | 1 + 2 files changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 97596ff838..97b93ad80b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,10 @@ before_install: brew install flex || true; brew install bison || true; brew install oniguruma || true; + - if [ "$TRAVIS_OS_NAME" != "linux" ]; then + brew uninstall libtool || true; + brew install libtool || true; + fi - rm src/{lexer,parser}.{c,h} install: diff --git a/AUTHORS b/AUTHORS index da04d5c4d1..0e5f07805b 100644 --- a/AUTHORS +++ b/AUTHORS @@ -69,3 +69,4 @@ tal@whatexit.org Travis Gockel Zhiming Wang 13ren +Lee Trager - Snap packaging From 2b0bb802133eca5a9bb54b9723ba796d270fe677 Mon Sep 17 00:00:00 2001 From: Lee Trager Date: Tue, 9 Aug 2016 12:00:33 -0700 Subject: [PATCH 3/3] Revert "Attempt to fix OS X travis.ci build" This reverts commit 9c220c878587603a6ef78c493c691aa8d418482c. --- .travis.yml | 4 ---- AUTHORS | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 97b93ad80b..97596ff838 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,10 +30,6 @@ before_install: brew install flex || true; brew install bison || true; brew install oniguruma || true; - - if [ "$TRAVIS_OS_NAME" != "linux" ]; then - brew uninstall libtool || true; - brew install libtool || true; - fi - rm src/{lexer,parser}.{c,h} install: diff --git a/AUTHORS b/AUTHORS index 0e5f07805b..7e30b89c0a 100644 --- a/AUTHORS +++ b/AUTHORS @@ -41,6 +41,7 @@ Kim De Mey - build Kim Toms LCD 47 Lee Thompson - autoconf stuff, rpm +Lee Trager - Snap packaging Marc Abramowitz Marc Bruggmann Markus Lanthaler - doc fixes @@ -69,4 +70,3 @@ tal@whatexit.org Travis Gockel Zhiming Wang 13ren -Lee Trager - Snap packaging