netdata-repo.spec 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. %{?rhel:%global centos_ver %rhel}
  2. Name: netdata-repo
  3. Version: 2
  4. Release: 1
  5. Summary: Netdata stable repositories configuration.
  6. Group: System Environment/Base
  7. License: GPLv2
  8. Source0: netdata.repo.fedora
  9. Source1: netdata-edge.repo.fedora
  10. Source2: netdata.repo.suse
  11. Source3: netdata-edge.repo.suse
  12. Source4: netdata.repo.centos
  13. Source5: netdata-edge.repo.centos
  14. Source6: netdata.repo.ol
  15. Source7: netdata-edge.repo.ol
  16. Source8: netdata.repo.al
  17. Source9: netdata-edge.repo.al
  18. BuildArch: noarch
  19. %if 0%{?centos_ver} && 0%{?centos_ver} < 8
  20. Requires: yum-plugin-priorities
  21. %endif
  22. # Overlapping file installs
  23. Conflicts: netdata-repo-edge
  24. %description
  25. This package contains the official Netdata package repository configuration for stable versions of Netdata.
  26. %prep
  27. %setup -q -c -T
  28. %if 0%{?fedora}
  29. install -pm 644 %{SOURCE0} ./netdata.repo
  30. install -pm 644 %{SOURCE1} ./netdata-edge.repo
  31. %endif
  32. %if 0%{?suse_version}
  33. install -pm 644 %{SOURCE2} ./netdata.repo
  34. install -pm 644 %{SOURCE3} ./netdata-edge.repo
  35. %endif
  36. %if 0%{?centos_ver}
  37. # Amazon Linux 2 looks like CentOS, but with extra macros.
  38. %if 0%{?amzn2}
  39. install -pm 644 %{SOURCE8} ./netdata.repo
  40. install -pm 644 %{SOURCE9} ./netdata-edge.repo
  41. %else
  42. install -pm 644 %{SOURCE4} ./netdata.repo
  43. install -pm 644 %{SOURCE5} ./netdata-edge.repo
  44. %endif
  45. %endif
  46. %if 0%{?oraclelinux}
  47. install -pm 644 %{SOURCE6} ./netdata.repo
  48. install -pm 644 %{SOURCE7} ./netdata-edge.repo
  49. %endif
  50. %build
  51. true
  52. %install
  53. rm -rf $RPM_BUILD_ROOT
  54. %if 0%{?suse_version}
  55. install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  56. install -pm 644 netdata.repo $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  57. install -pm 644 netdata-edge.repo $RPM_BUILD_ROOT%{_sysconfdir}/zypp/repos.d
  58. %else
  59. install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
  60. install -pm 644 netdata.repo $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
  61. install -pm 644 netdata-edge.repo $RPM_BUILD_ROOT%{_sysconfdir}/yum.repos.d
  62. %endif
  63. %clean
  64. rm -rf $RPM_BUILD_ROOT
  65. %files
  66. %if 0%{?suse_version}
  67. %attr(644,root,root) /etc/zypp/repos.d/netdata.repo
  68. %else
  69. %attr(644,root,root) /etc/yum.repos.d/netdata.repo
  70. %endif
  71. %package edge
  72. Summary: Netdata nightly repositories configuration.
  73. Group: System Environment/Base
  74. # Overlapping file installs
  75. Conflicts: netdata-repo
  76. %description edge
  77. This package contains the official Netdata package repository configuration for nightly versions of Netdata.
  78. %files edge
  79. %if 0%{?suse_version}
  80. %attr(644,root,root) /etc/zypp/repos.d/netdata-edge.repo
  81. %else
  82. %attr(644,root,root) /etc/yum.repos.d/netdata-edge.repo
  83. %endif
  84. %changelog
  85. * Wed Dec 7 2022 Austin Hemmelgarn <austin@netdata.cloud> 2-1
  86. - Switch to new hosting at repo.netdata.cloud.
  87. * Mon Jun 6 2022 Austin Hemmelgarn <austin@netdata.cloud> 1-2
  88. - Bump release to keep in sync with DEB package.
  89. * Mon Jun 14 2021 Austin Hemmelgarn <austin@netdata.cloud> 1-1
  90. - Initial revision