Browse Source

Update _zerotier

add building debian package
pull/50/head
Gorgone 4 years ago
committed by GitHub
parent
commit
52089776aa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 43
      support/software/_zerotier

43
support/software/_zerotier

@ -25,18 +25,57 @@ make -j16 -w 2>&1 |grep --line-buffered -v "one.o\|warning\|~\|In\|note\|if\|int
upx -9 -q zerotier-one |grep zerotier |awk '{print "compress -> " $1" "$3" "$4 }' upx -9 -q zerotier-one |grep zerotier |awk '{print "compress -> " $1" "$3" "$4 }'
#copy binarys #copy binarys
[ $1 = "native" ] && _toolchainname=$(uname -m)
[ -d "$sodir/ZeroTierOne-1.4.6.$_toolchainname" ] && rm -rf "$sodir/ZeroTierOne-1.4.6.$_toolchainname" [ -d "$sodir/ZeroTierOne-1.4.6.$_toolchainname" ] && rm -rf "$sodir/ZeroTierOne-1.4.6.$_toolchainname"
mkdir -p "$sodir/ZeroTierOne-1.4.6.$_toolchainname" mkdir -p "$sodir/ZeroTierOne-1.4.6.$_toolchainname"
mv {zerotier-cli,zerotier-idtool,zerotier-one} "$sodir/ZeroTierOne-1.4.6.$_toolchainname" mv {zerotier-cli,zerotier-idtool,zerotier-one} "$sodir/ZeroTierOne-1.4.6.$_toolchainname"
}
deb_package() {
mkdir -p "$sodir/ZeroTierOne-1.4.6.$_toolchainname/DEBIAN"
mkdir -p "$sodir/ZeroTierOne-1.4.6.$_toolchainname/usr/local/bin"
cd "$sodir/ZeroTierOne-1.4.6.$_toolchainname"
mv {zerotier-cli,zerotier-idtool,zerotier-one} "$sodir/ZeroTierOne-1.4.6.$_toolchainname/usr/local/bin"
printf "\nPackage Info\n============\n"
echo "Package: zerotierone
Version: 1.4.6
Section: custom
Priority: optional
Architecture: all
Essential: no
Installed-Size: 1024
Maintainer: https://github.com/zerotier/ZeroTierOne
Description: virtual network card">"$sodir/ZeroTierOne-1.4.6.$_toolchainname/DEBIAN/control"
echo "ZeroTierOne-1.4.6.$_toolchainname"
cat "$sodir/ZeroTierOne-1.4.6.$_toolchainname/DEBIAN/control"
cd "$sodir"
printf "\n"
dpkg-deb --build "ZeroTierOne-1.4.6.$_toolchainname"
printf "\n"
} }
if [ "$1" = "zerotier" ]; then if [ "$1" = "zerotier" ]; then
if [ -z $2 ]; then if [ -z $2 ]; then
buildtc="native" clear
slogo
printf "\n plase add toolchain\n\n"
exit
else else
buildtc="$2" if [ -f "$tccfgdir/$2" ]; then
buildtc="$2"
else
clear
slogo
printf "\n $2 toolchain not installed\n\n"
exit
fi
fi fi
build_zerotier $buildtc build_zerotier $buildtc
fi
if [ "$3" = "makedeb" ]; then
deb_package
exit
else
exit exit
fi fi

Loading…
Cancel
Save