From d3a77e9f945fc911f718b4d0d02fae24d0b6beb2 Mon Sep 17 00:00:00 2001 From: Christian Poessinger Date: Sat, 3 Apr 2021 11:49:23 +0000 Subject: packages: add minisign (cherry picked from commit cb2659c88c9166bec8088368211db42fa82b9129) --- packages/minisign/.gitignore | 6 +++++ packages/minisign/Jenkinsfile | 31 +++++++++++++++++++++++++ packages/minisign/build-minisign.sh | 45 +++++++++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 packages/minisign/.gitignore create mode 100644 packages/minisign/Jenkinsfile create mode 100755 packages/minisign/build-minisign.sh (limited to 'packages') 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..8052752e --- /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 . +@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@crux')_ + +// 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) diff --git a/packages/minisign/build-minisign.sh b/packages/minisign/build-minisign.sh new file mode 100755 index 00000000..a784bbe9 --- /dev/null +++ b/packages/minisign/build-minisign.sh @@ -0,0 +1,45 @@ +#!/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 +base="minisign_$(git describe --always)_amd64" +mkdir -p ${base}/usr/bin +mkdir -p ${base}/DEBIAN +cp minisign ${base}/usr/bin + +cat << EOF >${base}/DEBIAN/control +Package: minisign +Version: 0.9 +License: ISC +Vendor: none +Architecture: amd64 +Maintainer: VyOS Package Maintainers +Installed-Size: 30 +Depends: libsodium13 +Section: default +Priority: extra +Homepage: https://github.com/jedisct1/minisign +Description: A dead simple tool to sign files and verify signatures. +EOF + +fakeroot dpkg-deb --build ${base} +cp *.deb ${CWD} + +# do not confuse Jenkins by providing multiple minisign deb files +cd ${CWD} +rm -rf ${BUILD_DIR} -- cgit v1.2.3