gns3-registry/packer/alpine-linux/files/ostinato/build-package
2020-08-12 14:51:30 +02:00

21 lines
486 B
Bash
Executable File

#!/bin/sh
alpine_version=3.12
mkdir -p "$alpine_version"
docker run --rm -i -v "$PWD/$alpine_version:/package" alpine:$alpine_version << 'EOF'
cd
apk add alpine-sdk
mkdir -p .abuild
echo 'PACKAGER="GNS3 Packer <packer@gns3-registry>"' > .abuild/abuild.conf
abuild-keygen -a -n -q
git clone --depth 1 git://git.alpinelinux.org/aports
cd aports/*/ostinato
abuild -F -r
cd
find packages -name "*.apk" -type f -exec cp -p {} /package \;
chown $(stat -c '%u:%g' /package) /package/*
EOF