zerotier-one.spec 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  1. Name: zerotier-one
  2. Version: 1.10.0
  3. Release: 1%{?dist}
  4. Summary: ZeroTier network virtualization service
  5. License: ZeroTier BSL 1.1
  6. URL: https://www.zerotier.com
  7. # Fedora
  8. %if "%{?dist}" == ".fc35"
  9. BuildRequires: systemd clang openssl openssl-devel
  10. Requires: systemd openssl
  11. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  12. %endif
  13. %if "%{?dist}" == ".fc36"
  14. BuildRequires: systemd clang openssl1.1 openssl1.1-devel
  15. Requires: systemd openssl1.1
  16. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  17. %endif
  18. %if "%{?dist}" == ".fc37"
  19. BuildRequires: systemd clang openssl1.1 openssl1.1-devel
  20. Requires: systemd openssl1.1
  21. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  22. %endif
  23. # RHEL
  24. %if "%{?dist}" == ".el6"
  25. Requires: chkconfig
  26. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  27. %endif
  28. %if "%{?dist}" == ".el7"
  29. BuildRequires: systemd openssl-devel
  30. Requires: systemd openssl
  31. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  32. %endif
  33. %if "%{?dist}" == ".el8"
  34. BuildRequires: systemd openssl-devel
  35. Requires: systemd openssl
  36. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  37. %endif
  38. %if "%{?dist}" == ".el9"
  39. BuildRequires: systemd openssl-devel
  40. Requires: systemd openssl
  41. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  42. %endif
  43. # Amazon
  44. %if "%{?dist}" == ".amzn2"
  45. BuildRequires: systemd openssl-devel
  46. Requires: systemd openssl
  47. Requires(pre): /usr/sbin/useradd, /usr/bin/getent
  48. %endif
  49. %description
  50. ZeroTier is a software defined networking layer for Earth.
  51. It can be used for on-premise network virtualization, as a peer to peer VPN
  52. for mobile teams, for hybrid or multi-data-center cloud deployments, or just
  53. about anywhere else secure software defined virtual networking is useful.
  54. This is our OS-level client service. It allows Mac, Linux, Windows,
  55. FreeBSD, and soon other types of clients to join ZeroTier virtual networks
  56. like conventional VPNs or VLANs. It can run on native systems, VMs, or
  57. containers (Docker, OpenVZ, etc.).
  58. %prep
  59. ls -la
  60. %if 0%{?rhel} && 0%{?rhel} >= 7
  61. rm -rf BUILD BUILDROOT RPMS SRPMS SOURCES
  62. mkdir -p SOURCES
  63. ln -s %{getenv:PWD} %{name}-%{version}
  64. tar --exclude=%{name}-%{version}/.git --exclude=%{name}-%{version}/%{name}-%{version} -czf SOURCES/%{name}-%{version}.tar.gz %{name}-%{version}/*
  65. rm -f %{name}-%{version}
  66. cp -a %{getenv:PWD}/* .
  67. %endif
  68. %build
  69. %if "%{?dist}" == ".el6"
  70. make RUST_BACKTRACE=full ZT_USE_MINIUPNPC=1 %{?_smp_mflags} from_builder
  71. %else
  72. make RUST_BACKTRACE=full ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one
  73. %endif
  74. %pre
  75. /usr/bin/getent passwd zerotier-one || /usr/sbin/useradd -r -d /var/lib/zerotier-one -s /sbin/nologin zerotier-one
  76. %install
  77. # rm -rf $RPM_BUILD_ROOT
  78. make install DESTDIR=$RPM_BUILD_ROOT
  79. mkdir -p $RPM_BUILD_ROOT%{_unitdir}
  80. cp %{getenv:PWD}/debian/zerotier-one.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service
  81. %if 0%{?rhel} && 0%{?rhel} <= 6
  82. mkdir -p $RPM_BUILD_ROOT/etc/init.d/
  83. cp %{getenv:PWD}/ext/installfiles/linux/zerotier-one.init.rhel6 $RPM_BUILD_ROOT/etc/init.d/zerotier-one
  84. chmod 700 $RPM_BUILD_ROOT/etc/init.d/${name}
  85. %endif
  86. %files
  87. %{_sbindir}/*
  88. %{_mandir}/*
  89. %{_localstatedir}/*
  90. %if 0%{?rhel} && 0%{?rhel} <= 6
  91. /etc/init.d/zerotier-one
  92. %else
  93. %{_unitdir}/%{name}.service
  94. %endif
  95. %post
  96. %if ! 0%{?rhel} && 0%{?rhel} <= 6
  97. %systemd_post zerotier-one.service
  98. %endif
  99. %preun
  100. %if ! 0%{?rhel} && 0%{?rhel} <= 6
  101. %systemd_preun zerotier-one.service
  102. %endif
  103. %postun
  104. %if ! 0%{?rhel} && 0%{?rhel} <= 6
  105. %systemd_postun_with_restart zerotier-one.service
  106. %endif
  107. %changelog
  108. * Fri Jun 03 2022 Adam Ierymenko <[email protected]> - 1.10.0
  109. - see https://github.com/zerotier/ZeroTierOne for release notes
  110. * Tue May 10 2022 Adam Ierymenko <[email protected]> - 1.8.10
  111. - see https://github.com/zerotier/ZeroTierOne for release notes
  112. * Mon Apr 25 2022 Adam Ierymenko <[email protected]> - 1.8.9
  113. - see https://github.com/zerotier/ZeroTierOne for release notes
  114. * Mon Apr 11 2022 Adam Ierymenko <[email protected]> - 1.8.8
  115. - see https://github.com/zerotier/ZeroTierOne for release notes
  116. * Mon Mar 21 2022 Adam Ierymenko <[email protected]> - 1.8.7
  117. - see https://github.com/zerotier/ZeroTierOne for release notes
  118. * Mon Mar 07 2022 Adam Ierymenko <[email protected]> - 1.8.6
  119. - see https://github.com/zerotier/ZeroTierOne for release notes
  120. * Fri Dec 17 2021 Adam Ierymenko <[email protected]> - 1.8.5
  121. - see https://github.com/zerotier/ZeroTierOne for release notes
  122. * Tue Nov 23 2021 Adam Ierymenko <[email protected]> - 1.8.4
  123. - see https://github.com/zerotier/ZeroTierOne for release notes
  124. * Mon Nov 15 2021 Adam Ierymenko <[email protected]> - 1.8.3
  125. - see https://github.com/zerotier/ZeroTierOne for release notes
  126. * Mon Nov 08 2021 Adam Ierymenko <[email protected]> - 1.8.2
  127. - see https://github.com/zerotier/ZeroTierOne for release notes
  128. * Wed Oct 20 2021 Adam Ierymenko <[email protected]> - 1.8.1
  129. - see https://github.com/zerotier/ZeroTierOne for release notes
  130. * Wed Sep 15 2021 Adam Ierymenko <[email protected]> - 1.8.0
  131. - see https://github.com/zerotier/ZeroTierOne for release notes
  132. * Tue Apr 13 2021 Adam Ierymenko <[email protected]> - 1.6.5
  133. - see https://github.com/zerotier/ZeroTierOne for release notes
  134. * Mon Feb 15 2021 Adam Ierymenko <[email protected]> - 1.6.4
  135. - see https://github.com/zerotier/ZeroTierOne for release notes
  136. * Mon Nov 30 2020 Adam Ierymenko <[email protected]> - 1.6.2-0.1
  137. - see https://github.com/zerotier/ZeroTierOne for release notes
  138. * Tue Nov 24 2020 Adam Ierymenko <[email protected]> - 1.6.1-0.1
  139. - see https://github.com/zerotier/ZeroTierOne for release notes
  140. * Thu Nov 19 2020 Adam Ierymenko <[email protected]> - 1.6.0-0.1
  141. - see https://github.com/zerotier/ZeroTierOne for release notes
  142. * Mon Oct 05 2020 Adam Ierymenko <[email protected]> - 1.6.0-beta1
  143. - see https://github.com/zerotier/ZeroTierOne for release notes
  144. * Fri Aug 23 2019 Adam Ierymenko <[email protected]> - 1.4.4-0.1
  145. - see https://github.com/zerotier/ZeroTierOne for release notes
  146. * Mon Jul 29 2019 Adam Ierymenko <[email protected]> - 1.4.0-0.1
  147. - see https://github.com/zerotier/ZeroTierOne for release notes
  148. * Tue May 08 2018 Adam Ierymenko <[email protected]> - 1.2.10-0.1
  149. - see https://github.com/zerotier/ZeroTierOne for release notes
  150. * Thu May 03 2018 Adam Ierymenko <[email protected]> - 1.2.8-0.1
  151. - see https://github.com/zerotier/ZeroTierOne for release notes
  152. * Mon Apr 24 2017 Adam Ierymenko <[email protected]> - 1.2.2-0.1
  153. - see https://github.com/zerotier/ZeroTierOne for release notes
  154. * Fri Mar 17 2017 Adam Ierymenko <[email protected]> - 1.2.2-0.1
  155. - see https://github.com/zerotier/ZeroTierOne for release notes
  156. * Tue Mar 14 2017 Adam Ierymenko <[email protected]> - 1.2.0-0.1
  157. - see https://github.com/zerotier/ZeroTierOne for release notes
  158. * Tue Jul 12 2016 Adam Ierymenko <[email protected]> - 1.1.10-0.1
  159. - see https://github.com/zerotier/ZeroTierOne for release notes
  160. * Fri Jul 08 2016 Adam Ierymenko <[email protected]> - 1.1.8-0.1
  161. - see https://github.com/zerotier/ZeroTierOne for release notes
  162. * Sat Jun 25 2016 Adam Ierymenko <[email protected]> - 1.1.6-0.1
  163. - now builds on CentOS 6 as well as newer distros, and some cleanup
  164. * Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.3
  165. - include systemd unit file
  166. * Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.2
  167. - add libnatpmp as (build)dependency
  168. * Wed Jun 08 2016 François Kooman <[email protected]> - 1.1.5-0.1
  169. - initial package