mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 18:15:24 +00:00
Update generate.sh
This commit is contained in:
parent
9285e0fe25
commit
390f7527f6
@ -10,11 +10,18 @@ then
|
|||||||
exit -1
|
exit -1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PKGNAME=debian-yggdrasil
|
PKGNAME=yggdrasil
|
||||||
PKGARCH=${PKGARCH-amd64}
|
PKGARCH=${PKGARCH-amd64}
|
||||||
PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d")
|
PKGVERSION=0.$(git rev-list HEAD --count 2>/dev/null | xargs printf "%04d")
|
||||||
PKGFILE=$PKGNAME-$PKGVERSION-$PKGARCH.deb
|
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"
|
echo "Building $PKGFILE"
|
||||||
|
|
||||||
mkdir -p /tmp/$PKGNAME/
|
mkdir -p /tmp/$PKGNAME/
|
||||||
@ -23,7 +30,7 @@ mkdir -p /tmp/$PKGNAME/usr/bin/
|
|||||||
mkdir -p /tmp/$PKGNAME/etc/systemd/system/
|
mkdir -p /tmp/$PKGNAME/etc/systemd/system/
|
||||||
|
|
||||||
cat > /tmp/$PKGNAME/debian/changelog << EOF
|
cat > /tmp/$PKGNAME/debian/changelog << EOF
|
||||||
Insert changelog here
|
Please see https://github.com/Arceliar/yggdrasil-go/
|
||||||
EOF
|
EOF
|
||||||
echo 9 > /tmp/$PKGNAME/debian/compat
|
echo 9 > /tmp/$PKGNAME/debian/compat
|
||||||
cat > /tmp/$PKGNAME/debian/control << EOF
|
cat > /tmp/$PKGNAME/debian/control << EOF
|
||||||
@ -32,15 +39,15 @@ Version: $PKGVERSION
|
|||||||
Section: contrib/net
|
Section: contrib/net
|
||||||
Priority: extra
|
Priority: extra
|
||||||
Architecture: $PKGARCH
|
Architecture: $PKGARCH
|
||||||
Maintainer: Neil Alexander <neilalexander@noreply.users.github.com>
|
Maintainer: Neil Alexander <neilalexander@users.noreply.github.com>
|
||||||
Description: Debian yggdrasil package
|
Description: Debian yggdrasil package
|
||||||
Binary yggdrasil package for Debian and Ubuntu
|
Binary yggdrasil package for Debian and Ubuntu
|
||||||
EOF
|
EOF
|
||||||
cat > /tmp/$PKGNAME/debian/copyright << EOF
|
cat > /tmp/$PKGNAME/debian/copyright << EOF
|
||||||
Insert copyright notice here
|
Please see https://github.com/Arceliar/yggdrasil-go/
|
||||||
EOF
|
EOF
|
||||||
cat > /tmp/$PKGNAME/debian/docs << EOF
|
cat > /tmp/$PKGNAME/debian/docs << EOF
|
||||||
Insert docs here
|
Please see https://github.com/Arceliar/yggdrasil-go/
|
||||||
EOF
|
EOF
|
||||||
cat > /tmp/$PKGNAME/debian/install << EOF
|
cat > /tmp/$PKGNAME/debian/install << EOF
|
||||||
usr/bin/yggdrasil usr/bin
|
usr/bin/yggdrasil usr/bin
|
||||||
@ -57,9 +64,6 @@ systemctl disable yggdrasil
|
|||||||
systemctl stop yggdrasil
|
systemctl stop yggdrasil
|
||||||
EOF
|
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 yggdrasil /tmp/$PKGNAME/usr/bin/
|
||||||
cp contrib/systemd/yggdrasil.service /tmp/$PKGNAME/etc/systemd/system/
|
cp contrib/systemd/yggdrasil.service /tmp/$PKGNAME/etc/systemd/system/
|
||||||
cp contrib/systemd/yggdrasil-resume.service /tmp/$PKGNAME/etc/systemd/system/
|
cp contrib/systemd/yggdrasil-resume.service /tmp/$PKGNAME/etc/systemd/system/
|
||||||
|
Loading…
Reference in New Issue
Block a user