From 13ab15e7f82dd15e29e492d43900be59b44790d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hadrian=20W=C4=99grzynowski?= Date: Fri, 18 Dec 2020 22:59:00 +0100 Subject: [PATCH] New package: zerotier-one-1.6.2 --- srcpkgs/zerotier-one/files/zerotier/run | 2 + srcpkgs/zerotier-one/patches/fix-cross.patch | 59 ++++++++++++++++++++ srcpkgs/zerotier-one/template | 24 ++++++++ 3 files changed, 85 insertions(+) create mode 100644 srcpkgs/zerotier-one/files/zerotier/run create mode 100644 srcpkgs/zerotier-one/patches/fix-cross.patch create mode 100644 srcpkgs/zerotier-one/template diff --git a/srcpkgs/zerotier-one/files/zerotier/run b/srcpkgs/zerotier-one/files/zerotier/run new file mode 100644 index 00000000000..fce86d3c6ab --- /dev/null +++ b/srcpkgs/zerotier-one/files/zerotier/run @@ -0,0 +1,2 @@ +#!/bin/sh +exec zerotier-one diff --git a/srcpkgs/zerotier-one/patches/fix-cross.patch b/srcpkgs/zerotier-one/patches/fix-cross.patch new file mode 100644 index 00000000000..e0ae562f953 --- /dev/null +++ b/srcpkgs/zerotier-one/patches/fix-cross.patch @@ -0,0 +1,59 @@ +--- make-linux.mk 2020-12-01 01:33:39.000000000 +0100 ++++ make-linux.mk 2020-12-19 13:00:35.311711026 +0100 +@@ -144,6 +144,9 @@ + ifeq ($(CC_MACH),ppc64el) + ZT_ARCHITECTURE=8 + endif ++ifeq ($(CC_MACH),powerpc64) ++ ZT_ARCHITECTURE=8 ++endif + ifeq ($(CC_MACH),e2k) + ZT_ARCHITECTURE=2 + endif +@@ -177,22 +180,22 @@ + ifeq ($(CC_MACH),armv6) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv6l) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv6zk) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv6kz) + ZT_ARCHITECTURE=3 + override DEFS+=-DZT_NO_TYPE_PUNNING +- ZT_USE_ARM32_NEON_ASM_CRYPTO=1 ++ ZT_USE_ARM32_NEON_ASM_CRYPTO=0 + endif + ifeq ($(CC_MACH),armv7) + ZT_ARCHITECTURE=3 +@@ -275,19 +278,6 @@ + override INCLUDES+=-I/usr/pgsql-10/include -Iext/hiredis-0.14.1/include/ -Iext/redis-plus-plus-1.1.1/install/centos8/include/sw/ + endif + +-# ARM32 hell -- use conservative CFLAGS +-ifeq ($(ZT_ARCHITECTURE),3) +- ifeq ($(shell if [ -e /usr/bin/dpkg ]; then dpkg --print-architecture; fi),armel) +- override CFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm +- override CXXFLAGS+=-march=armv5t -mfloat-abi=soft -msoft-float -mno-unaligned-access -marm +- ZT_USE_ARM32_NEON_ASM_CRYPTO=0 +- else +- override CFLAGS+=-march=armv5t -mno-unaligned-access -marm -fexceptions +- override CXXFLAGS+=-march=armv5t -mno-unaligned-access -marm -fexceptions +- ZT_USE_ARM32_NEON_ASM_CRYPTO=0 +- endif +-endif +- + # Build faster crypto on some targets + ifeq ($(ZT_USE_X64_ASM_SALSA),1) + override DEFS+=-DZT_USE_X64_ASM_SALSA2012 diff --git a/srcpkgs/zerotier-one/template b/srcpkgs/zerotier-one/template new file mode 100644 index 00000000000..141e251e44d --- /dev/null +++ b/srcpkgs/zerotier-one/template @@ -0,0 +1,24 @@ +# Template file for 'zerotier-one' +pkgname=zerotier-one +version=1.6.2 +revision=1 +wrksrc=ZeroTierOne-${version} +build_style=gnu-makefile +hostmakedepends="nodejs" +makedepends="sqlite-devel" +short_desc="Network Virtualization Everywhere" +maintainer="Hadrian Węgrzynowski " +license="custom:BPL-1.1" +homepage="https://www.zerotier.com/" +distfiles="https://github.com/zerotier/ZeroTierOne/archive/${version}.tar.gz" +checksum=c8087b26c1191d36fda004b42cdfed31042cafd8586e49015586eef786f2c9a5 +repository=nonfree + +pre_install() { + sed -i 's/sbin/bin/g' make-linux.mk +} + +post_install() { + vsv zerotier + vlicense LICENSE.txt +}