diff options
Diffstat (limited to 'packages')
-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} |