From 390f7527f62bb2d47b9b020ffcba811c132b19a4 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Thu, 1 Mar 2018 18:28:37 +0000 Subject: [PATCH] Update generate.sh --- contrib/deb/generate.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/contrib/deb/generate.sh b/contrib/deb/generate.sh index f3c64d85..891d3064 100644 --- a/contrib/deb/generate.sh +++ b/contrib/deb/generate.sh @@ -10,11 +10,18 @@ then exit -1 fi -PKGNAME=debian-yggdrasil +PKGNAME=yggdrasil PKGARCH=${PKGARCH-amd64} PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d") PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb +if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build +elif [ $PKGARCH = "i386" ]; then GOARCH=386 GOOS=linux ./build +else + echo "Specify PKGARCH=amd64 or PKGARCH=i386" + exit -1 +fi + echo "Building $PKGFILE" mkdir -p /tmp/$PKGNAME/ @@ -23,7 +30,7 @@ mkdir -p /tmp/$PKGNAME/usr/bin/ mkdir -p /tmp/$PKGNAME/etc/systemd/system/ cat > /tmp/$PKGNAME/debian/changelog << EOF -Insert changelog here +Please see https://github.com/Arceliar/yggdrasil-go/ EOF echo 9 > /tmp/$PKGNAME/debian/compat cat > /tmp/$PKGNAME/debian/control << EOF @@ -32,15 +39,15 @@ Version: $PKGVERSION Section: contrib/net Priority: extra Architecture: $PKGARCH -Maintainer: Neil Alexander +Maintainer: Neil Alexander Description: Debian yggdrasil package Binary yggdrasil package for Debian and Ubuntu EOF cat > /tmp/$PKGNAME/debian/copyright << EOF -Insert copyright notice here +Please see https://github.com/Arceliar/yggdrasil-go/ EOF cat > /tmp/$PKGNAME/debian/docs << EOF -Insert docs here +Please see https://github.com/Arceliar/yggdrasil-go/ EOF cat > /tmp/$PKGNAME/debian/install << EOF usr/bin/yggdrasil usr/bin @@ -57,9 +64,6 @@ systemctl disable yggdrasil systemctl stop yggdrasil EOF -if [ $PKGARCH = "amd64" ]; then GOARCH=amd64 GOOS=linux ./build; fi -if [ $PKGARCH = "i386" ]; then GOARCH=386 GOOS=linux ./build; fi - cp yggdrasil /tmp/$PKGNAME/usr/bin/ cp contrib/systemd/yggdrasil.service /tmp/$PKGNAME/etc/systemd/system/ cp contrib/systemd/yggdrasil-resume.service /tmp/$PKGNAME/etc/systemd/system/