diff options
author | Christian Poessinger <christian@poessinger.com> | 2021-04-03 11:49:23 +0000 |
---|---|---|
committer | Christian Poessinger <christian@poessinger.com> | 2021-04-03 14:13:06 +0200 |
commit | 772c546380c779fbf9815541dfba3c307b256667 (patch) | |
tree | 01380e7e04f3aef4b9af01e99b6da9b6d85431ca /packages/minisign | |
parent | 1b8d035faa91d3948cf0bae2e8d6ae2350e1782e (diff) | |
download | vyos-build-772c546380c779fbf9815541dfba3c307b256667.tar.gz vyos-build-772c546380c779fbf9815541dfba3c307b256667.zip |
packages: add minisign
(cherry picked from commit cb2659c88c9166bec8088368211db42fa82b9129)
Diffstat (limited to 'packages/minisign')
-rw-r--r-- | packages/minisign/.gitignore | 6 | ||||
-rw-r--r-- | packages/minisign/Jenkinsfile | 31 | ||||
-rwxr-xr-x | packages/minisign/build-minisign.sh | 33 |
3 files changed, 70 insertions, 0 deletions
diff --git a/packages/minisign/.gitignore b/packages/minisign/.gitignore new file mode 100644 index 00000000..27c4fdb8 --- /dev/null +++ b/packages/minisign/.gitignore @@ -0,0 +1,6 @@ +minisign/ +*.deb +*.dsc +*.buildinfo +*.changes +*.git diff --git a/packages/minisign/Jenkinsfile b/packages/minisign/Jenkinsfile new file mode 100644 index 00000000..b9ec5788 --- /dev/null +++ b/packages/minisign/Jenkinsfile @@ -0,0 +1,31 @@ +// Copyright (C) 2020-2021 VyOS maintainers and contributors +// +// This program is free software; you can redistribute it and/or modify +// in order to easy exprort images built to "external" world +// it under the terms of the GNU General Public License version 2 or later as +// published by the Free Software Foundation. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see <http://www.gnu.org/licenses/>. +@NonCPS + +// Using a version specifier library, use 'current' branch. The underscore (_) +// is not a typo! You need this underscore if the line immediately after the +// @Library annotation is not an import statement! +@Library('vyos-build@equuleus')_ + +// NOTE: we can build with -d as the libbpf dependency is installed manually +// and not via a DEB package +def pkgList = [ + ['name': 'minisign', + 'scmCommit': '0.9', + 'scmUrl': 'https://github.com/jedisct1/minisign', + 'buildCmd': 'cd ..; ./build-minisign.sh'], +] +// Start package build using library function from https://github.com/vyos/vyos-build +buildPackage('minisign', pkgList, null) diff --git a/packages/minisign/build-minisign.sh b/packages/minisign/build-minisign.sh new file mode 100755 index 00000000..e6e97ece --- /dev/null +++ b/packages/minisign/build-minisign.sh @@ -0,0 +1,33 @@ +#!/bin/sh +CWD=$(pwd) +set -e + +SRC=minisign + +if [ ! -d ${SRC} ]; then + echo "source directory does not exists, please 'git clone'" + exit 1 +fi + +# Build instructions as per https://github.com/jedisct1/minisign/blob/master/README.md +BUILD_DIR="${SRC}/build" +mkdir -p ${BUILD_DIR} +cd ${BUILD_DIR} +cmake .. +make + +# install +mkdir -p usr/bin +cp minisign usr/bin + +fpm --input-type dir --output-type deb --name minisign \ + --maintainer "VyOS Package Maintainers <maintainers@vyos.net>" \ + --description "A dead simple tool to sign files and verify signatures." \ + --depends libsodium23 --architecture $(dpkg --print-architecture) \ + --version $(git describe --always) --license ISC --deb-compression gz usr + +cp *.deb ${CWD} + +# do not confuse Jenkins by providing multiple minisign deb files +cd ${CWD} +rm -rf ${BUILD_DIR} |