|
@@ -1,6 +1,6 @@
|
|
Name: zerotier-one
|
|
Name: zerotier-one
|
|
-Version: 1.1.5
|
|
|
|
-Release: 0.3%{?dist}
|
|
|
|
|
|
+Version: 1.1.6
|
|
|
|
+Release: 0.1%{?dist}
|
|
Summary: ZeroTier One network virtualization service
|
|
Summary: ZeroTier One network virtualization service
|
|
|
|
|
|
License: GPLv3
|
|
License: GPLv3
|
|
@@ -10,17 +10,32 @@ Source0: %{name}-%{version}.tar.gz
|
|
BuildRequires: http-parser-devel
|
|
BuildRequires: http-parser-devel
|
|
BuildRequires: lz4-devel
|
|
BuildRequires: lz4-devel
|
|
BuildRequires: libnatpmp-devel
|
|
BuildRequires: libnatpmp-devel
|
|
|
|
+
|
|
|
|
+%if 0%{rhel} > 7
|
|
|
|
+BuildRequires: libnatpmp-devel
|
|
BuildRequires: systemd
|
|
BuildRequires: systemd
|
|
|
|
+%endif
|
|
|
|
+
|
|
%if 0%{?fedora} >= 21
|
|
%if 0%{?fedora} >= 21
|
|
|
|
+BuildRequires: systemd
|
|
BuildRequires: json-parser-devel
|
|
BuildRequires: json-parser-devel
|
|
%endif
|
|
%endif
|
|
|
|
|
|
Requires: http-parser
|
|
Requires: http-parser
|
|
Requires: lz4
|
|
Requires: lz4
|
|
Requires: libnatpmp
|
|
Requires: libnatpmp
|
|
|
|
+
|
|
|
|
+%if 0%{rhel} >= 7
|
|
Requires: systemd
|
|
Requires: systemd
|
|
|
|
+%endif
|
|
|
|
+
|
|
|
|
+%if 0%{rhel} <= 6
|
|
|
|
+Requires: chkconfig
|
|
|
|
+%endif
|
|
|
|
+
|
|
%if 0%{?fedora} >= 21
|
|
%if 0%{?fedora} >= 21
|
|
-BuildRequires: json-parser
|
|
|
|
|
|
+Requires: systemd
|
|
|
|
+Requires: json-parser
|
|
%endif
|
|
%endif
|
|
|
|
|
|
Provides: bundled(miniupnpc) = 2.0
|
|
Provides: bundled(miniupnpc) = 2.0
|
|
@@ -54,28 +69,87 @@ make ZT_USE_MINIUPNPC=1 %{?_smp_mflags}
|
|
rm -rf $RPM_BUILD_ROOT
|
|
rm -rf $RPM_BUILD_ROOT
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
make install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
+%if 0%{rhel} >= 7
|
|
|
|
+mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
|
|
+cp debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{fedora} >= 21
|
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
|
|
cp debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
|
cp debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{rhel} <= 6
|
|
|
|
+cp ext/installfiles/linux/zerotier-one.init.rhel6 $RPM_BUILD_ROOT/etc/init.d/zerotier-one
|
|
|
|
+chmod 0755 $RPM_BUILD_ROOT/etc/init.d/zerotier-one
|
|
|
|
+%endif
|
|
|
|
|
|
%files
|
|
%files
|
|
%{_sbindir}/*
|
|
%{_sbindir}/*
|
|
%{_bindir}/*
|
|
%{_bindir}/*
|
|
%{_mandir}/*
|
|
%{_mandir}/*
|
|
%{_localstatedir}/*
|
|
%{_localstatedir}/*
|
|
|
|
+%if 0%{rhel} >= 7
|
|
%{_unitdir}/%{name}.service
|
|
%{_unitdir}/%{name}.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{fedora} >= 21
|
|
|
|
+%{_unitdir}/%{name}.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{rhel} <= 6
|
|
|
|
+/etc/init.d/zerotier-one
|
|
|
|
+%endif
|
|
%doc AUTHORS.md README.md
|
|
%doc AUTHORS.md README.md
|
|
%license LICENSE.GPL-3
|
|
%license LICENSE.GPL-3
|
|
|
|
|
|
%post
|
|
%post
|
|
|
|
+%if 0%{rhel} >= 7
|
|
%systemd_post zerotier-one.service
|
|
%systemd_post zerotier-one.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{fedora} >= 21
|
|
|
|
+%systemd_post zerotier-one.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{rhel} <= 6
|
|
|
|
+case "$1" in
|
|
|
|
+ 1)
|
|
|
|
+ chkconfig --add zerotier-one
|
|
|
|
+ ;;
|
|
|
|
+ 2)
|
|
|
|
+ chkconfig --del newservice
|
|
|
|
+ chkconfig --add newservice
|
|
|
|
+ ;;
|
|
|
|
+esac
|
|
|
|
+%endif
|
|
|
|
|
|
%preun
|
|
%preun
|
|
|
|
+%if 0%{rhel} >= 7
|
|
%systemd_preun zerotier-one.service
|
|
%systemd_preun zerotier-one.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{fedora} >= 21
|
|
|
|
+%systemd_preun zerotier-one.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{rhel} <= 6
|
|
|
|
+case "$1" in
|
|
|
|
+ 0)
|
|
|
|
+ service zerotier-one stop
|
|
|
|
+ chkconfig --del zerotier-one
|
|
|
|
+ ;;
|
|
|
|
+ 1)
|
|
|
|
+ # This is an upgrade.
|
|
|
|
+ :
|
|
|
|
+ ;;
|
|
|
|
+esac
|
|
|
|
+%endif
|
|
|
|
|
|
%postun
|
|
%postun
|
|
|
|
+%if 0%{rhel} >= 7
|
|
%systemd_postun_with_restart zerotier-one.service
|
|
%systemd_postun_with_restart zerotier-one.service
|
|
|
|
+%endif
|
|
|
|
+%if 0%{fedora} >= 21
|
|
|
|
+%systemd_postun_with_restart zerotier-one.service
|
|
|
|
+%endif
|
|
|
|
|
|
%changelog
|
|
%changelog
|
|
|
|
+* Sat Jun 25 2016 Adam Ierymenko <[email protected]> - 1.1.6-0.1
|
|
|
|
+- now builds on CentOS 6 as well as newer distros, and some cleanup
|
|
|
|
+
|
|
* Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.3
|
|
* Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.3
|
|
- include systemd unit file
|
|
- include systemd unit file
|
|
|
|
|
|
@@ -83,4 +157,4 @@ cp debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
|
|
- add libnatpmp as (build)dependency
|
|
- add libnatpmp as (build)dependency
|
|
|
|
|
|
* Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.1
|
|
* Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.1
|
|
-- initial package
|
|
|
|
|
|
+- initial package
|