# git ls-remote https://github.com/zerotier/ZeroTierOne.git | grep '1\.2\.2' %global commit0 cfe0d0971f3ce5972d955250dc1ff6ec7a30e3f7 %global _hardened_build 1 Name: zerotier-one Version: 1.2.2 Release: 1%{?dist} Summary: ZeroTier is a software defined networking layer for Earth License: GPLv3+ URL: https://zerotier.com Source0: https://github.com/zerotier/ZeroTierOne/archive/%{commit0}.tar.gz # by default "strip" is ran on the generated binaries, disable this Patch0: %{name}-do-not-strip-binaries.patch # https://github.com/zerotier/ZeroTierOne/issues/345 Patch1: %{name}-add-go-md2man.patch Patch2: %{name}-use-system-libraries.patch BuildRequires: miniupnpc-devel >= 2.0 BuildRequires: json-devel BuildRequires: http-parser-devel BuildRequires: lz4-devel BuildRequires: libnatpmp-devel BuildRequires: sqlite-devel BuildRequires: golang-github-cpuguy83-go-md2man %{?systemd_requires} BuildRequires: systemd %description ZeroTier is a software defined networking layer for Earth. It can be used for on-premise network virtualization, as a peer to peer VPN for mobile teams, for hybrid or multi-data-center cloud deployments, or just about anywhere else secure software defined virtual networking is useful. ZeroTier One is our OS-level client service. It allows Mac, Linux, Windows, FreeBSD, and soon other types of clients to join ZeroTier virtual networks like conventional VPNs or VLANs. It can run on native systems, VMs, or containers (Docker, OpenVZ, etc.). %prep %setup -qn ZeroTierOne-%{commit0} %patch0 -p1 %patch1 -p1 %patch2 -p1 # remove ext dir to make sure we do not use local copies of libs during build rm -rf ext/ %build make \ CXXFLAGS="$RPM_OPT_FLAGS"\ CFLAGS="$RPM_OPT_FLAGS"\ LDFLAGS="$RPM_LD_FLAGS"\ ZT_USE_MINIUPNPC=1\ ZT_ENABLE_CLUSTER=1\ ZT_ENABLE_NETWORK_CONTROLLER=1\ %{?_smp_mflags}\ one\ manpages %install rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT%{_unitdir} cp debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service %check make \ CXXFLAGS="$RPM_OPT_FLAGS"\ CFLAGS="$RPM_OPT_FLAGS"\ LDFLAGS="$RPM_LD_FLAGS"\ ZT_USE_MINIUPNPC=1\ ZT_ENABLE_CLUSTER=1\ ZT_ENABLE_NETWORK_CONTROLLER=1\ %{?_smp_mflags}\ selftest ./zerotier-selftest %post %systemd_post zerotier-one.service %preun %systemd_preun zerotier-one.service %postun %systemd_postun_with_restart zerotier-one.service %files %{_sbindir}/* %{_mandir}/man1/* %{_mandir}/man8/* %{_unitdir}/%{name}.service # compatibility symlinks to binaries %dir %{_sharedstatedir}/%{name} %{_sharedstatedir}/%{name}/* %doc AUTHORS.md README.md %license LICENSE.GPL-3 COPYING %changelog * Sat Mar 18 2017 François Kooman - 1.2.2-1 - update to 1.2.2 * Mon Jul 25 2016 François Kooman - 1.1.14-1 - update to 1.1.14 * Tue Jul 19 2016 François Kooman - 1.1.12-2 - allow override of LDFLAGS by rpmbuild * Wed Jul 13 2016 François Kooman - 1.1.12-1 - update to 1.1.12 - remove fix for selftest when controller is enabled * Mon Jul 04 2016 François Kooman - 1.1.6-2 - use go-md2man to generate the manpages * Mon Jul 04 2016 François Kooman - 1.1.6-1 - initial package