summaryrefslogtreecommitdiff
path: root/packages/minisign/build-minisign.sh
blob: a784bbe940bcb408510282fd267df963966c2f71 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 <maintainers@vyos.net>
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}