From de2c612bb8965ff473fa7b97483e8f400593fe24 Mon Sep 17 00:00:00 2001 From: Martin Dvorak Date: Mon, 13 Aug 2018 00:09:10 +0200 Subject: [PATCH] Adding snap to documentation and improving build scripts. --- INSTALLATION.md | 24 ++++++++++++++++++++++++ README.md | 1 + build/debian/make-deb.sh | 2 +- build/tarball/tarball-automake.sh | 2 +- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/INSTALLATION.md b/INSTALLATION.md index 254a30c..9011501 100644 --- a/INSTALLATION.md +++ b/INSTALLATION.md @@ -16,6 +16,7 @@ Install: Build: * [build on any Linux distro](#build-on-any-linux-distro) +* [build snap](#snap) * [build on Ubuntu](#build-on-ubuntu) * [build on Debian](#build-on-debian) * [build on Fedora](#build-on-fedora) @@ -196,6 +197,29 @@ hh Optionally [configure](CONFIGURATION.md) `hh` and check its [man page](README.md#documentation). +## Build snap +To build [snap](https://snapcraft.io/) for 'hh' first clone Git repository: + +```bash +git clone https://github.com/dvorka/hstr.git +``` + +Make sure that you can build HSTR from source code +as described in a "Build on ..." section for your +distribution. + +Install [snapcraft](https://snapcraft.io/) and build +snap by running snapcraft in the root of Git repository: + +``` +$ ls ./snap + snapcraft.yaml +$ snapcraft + ... +``` + +Find `hh_0+git..._amd64.snap` in the current directory. + ## Build on Ubuntu To build `hh` on Ubuntu clone Git repository: diff --git a/README.md b/README.md index 18c86d2..e881693 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ Install: Build: * [build on any Linux distro](INSTALLATION.md#build-on-any-linux-distro) +* [build snap](INSTALLATION.md#snap) * [build on Ubuntu](INSTALLATION.md#build-on-ubuntu) * [build on Debian](INSTALLATION.md#build-on-debian) * [build on Fedora](INSTALLATION.md#build-on-fedora) diff --git a/build/debian/make-deb.sh b/build/debian/make-deb.sh index 7c2fca5..6b5658d 100755 --- a/build/debian/make-deb.sh +++ b/build/debian/make-deb.sh @@ -94,7 +94,7 @@ function buildDebPackage() { # 1.2) prune HSTR project source: tests, *.o/... build files, ... echo -e "\n# HSTR project cleanup ########################################" - rm -vrf ./.git ./hstr ./build ./test ./hstr.pro ./doc ./pad.xml + rm -vrf ./.git ./hstr ./build ./test ./hstr.pro ./doc ./pad.xml ./snap find . -type f \( -name "*.a" -or -name "*.o" -or -name "*.*~" -or -name ".gitignore" -or -name ".git" \) | while read F; do rm -vf $F; done # 1.4) create tar archive diff --git a/build/tarball/tarball-automake.sh b/build/tarball/tarball-automake.sh index 5481f91..59a273a 100755 --- a/build/tarball/tarball-automake.sh +++ b/build/tarball/tarball-automake.sh @@ -24,7 +24,7 @@ function tarballClean() { if [ "${1}" = "--purge" ] then # development files - rm -vrf build .git .gitignore .settings Debug Release .cproject .project hstr.pro hstr.pro.user + rm -vrf build .git .gitignore .settings Debug Release .cproject .project hstr.pro hstr.pro.user snap rm -vf .travis.yml pad.xml _config.yml fi # garbage