diff options
author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-09-06 10:45:27 +0000 |
---|---|---|
committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2024-09-06 11:34:08 +0000 |
commit | c9a5a93834fce33f1e999dd50381cb7ff9e5fabb (patch) | |
tree | 26d03e228ca55acc5fc29d4ad18e8331b79e8605 /scripts/package-build/strongswan/build-vici.sh | |
parent | 70122746469e930a6775e0c42c4d1fd30bc6d514 (diff) | |
download | vyos-build-c9a5a93834fce33f1e999dd50381cb7ff9e5fabb.tar.gz vyos-build-c9a5a93834fce33f1e999dd50381cb7ff9e5fabb.zip |
T6674: Add build-scrips for packages without Jenkins
Add build scripts for .deb packages without Jenkins.
To exclude Jenkins we need some place where we can put new
builds-scripts to run in parallel (old/new) during meantime.
We will deprecate old Jenkins package builds in the future.
Diffstat (limited to 'scripts/package-build/strongswan/build-vici.sh')
-rwxr-xr-x | scripts/package-build/strongswan/build-vici.sh | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/scripts/package-build/strongswan/build-vici.sh b/scripts/package-build/strongswan/build-vici.sh new file mode 100755 index 00000000..5ad0ee80 --- /dev/null +++ b/scripts/package-build/strongswan/build-vici.sh @@ -0,0 +1,57 @@ +#!/bin/sh +CWD=$(pwd) +set -e + +SRC="strongswan/src/libcharon/plugins/vici/python" +if [ ! -d ${SRC} ]; then + echo "Source directory does not exists, please 'git clone'" + exit 1 +fi + +cd ${SRC} + +mkdir -p debian + +# Create control file +echo "I: create $SRC/debian/control" +cat <<EOF > debian/control +Source: strongswan +Section: python +Priority: optional +Maintainer: VyOS Package Maintainers <maintainers@vyos.net> +Build-Depends: debhelper (>= 9), python3, python3-setuptools +Standards-Version: 3.9.6 + +Package: python3-vici +Architecture: all +Depends: \${misc:Depends}, \${python3:Depends} +Description: Native Python interface for strongSwan's VICI protocol +EOF + + +# Create rules file +echo "I: create $SRC/rules" +cat <<EOF > debian/rules +#!/usr/bin/make -f + +%: + dh \$@ --with python3 +EOF +# Make the rules file executable +chmod +x debian/rules + +echo '10' > debian/compat + +# Copy changelog +cp ../../../../../debian/changelog debian/ + + +ls -la +pwd + + +echo "I: Build Debian Package" +dpkg-buildpackage -uc -us -tc -b -d + +echo "I: copy packages" +cp ../*.deb ../../../../../../ |