rng-tools-vl.spec 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. %bcond_with systemd
  2. %global _hardened_build 1
  3. %global _sbindir /sbin
  4. Summary: Random number generator related utilities
  5. Summary(ja): 乱数生成器関連のユーティリティ
  6. Name: rng-tools
  7. Version: 6.14
  8. Release: 1%{?_dist_release}%{?with_systemd:.systemd}
  9. Group: system
  10. Vendor: Project Vine
  11. Distribution: Vine Linux
  12. License: GPLv2+
  13. URL: https://github.com/nhorman/rng-tools
  14. Source0: https://github.com/nhorman/rng-tools/archive/refs/tags/v%{version}.tar.gz#/rng-tools-%{version}.tar.gz
  15. Source1: rngd.service
  16. Source100: rngd.init
  17. Source101: rngd.sysconfig
  18. Source1000: Changelog.fedora
  19. # https://sourceforge.net/p/gkernel/patches/111/
  20. BuildRequires: gcc make
  21. BuildRequires: gettext
  22. BuildRequires: libgcrypt-devel
  23. BuildRequires: autoconf automake
  24. BuildRequires: libsysfs-devel curl-devel
  25. BuildRequires: libxml2-devel openssl-devel
  26. BuildRequires: jansson-devel
  27. BuildRequires: jitterentropy-devel
  28. #BuildRequires: libp11-devel
  29. #BuildRequires: rtl-sdr-devel
  30. Provides: jitterentropy-rngd
  31. %if %{with systemd}
  32. BuildRequires: systemd-units
  33. Requires(post): systemd-units
  34. Requires(preun): systemd-units
  35. Requires(postun): systemd-units
  36. %else
  37. Requires(post): chkconfig
  38. Requires(preun): chkconfig
  39. Requires(postun): chkconfig
  40. %endif
  41. %description
  42. Hardware random number generation tools.
  43. %debug_package
  44. %prep
  45. %autosetup
  46. %build
  47. ./autogen.sh
  48. %configure \
  49. --without-pkcs11 \
  50. --without-rtlsdr \
  51. %{nil}
  52. %make_build
  53. %install
  54. %make_install
  55. %if %{with systemd}
  56. # install systemd unit file
  57. install -Dt %{buildroot}%{_unitdir} -m0644 %{SOURCE1}
  58. %else
  59. mkdir -p %{buildroot}%{_initdir}
  60. mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
  61. install -m755 %{SOURCE100} %{buildroot}%{_initdir}/rngd
  62. install -m644 %{SOURCE101} %{buildroot}%{_sysconfdir}/sysconfig/rngd
  63. %endif
  64. %post
  65. %if %{with systemd}
  66. %systemd_post rngd.service
  67. %else
  68. /sbin/chkconfig --add rngd
  69. %endif
  70. %preun
  71. %if %{with systemd}
  72. %systemd_preun rngd.service
  73. %else
  74. if [ "$1" = 0 -o -x /bin/systemctl ]; then
  75. /sbin/service stop rngd >/dev/null 2>&1 ||:
  76. /sbin/chkconfig --del rngd
  77. fi
  78. %endif
  79. %postun
  80. %if %{with systemd}
  81. %systemd_postun_with_restart rngd.service
  82. %else
  83. if [ "$1" != 0 ]; then
  84. /sbin/service stop condrestart >/dev/null 2>&1 ||:
  85. fi
  86. %endif
  87. %files
  88. %{!?_licensedir:%global license %%doc}
  89. %license COPYING
  90. %doc AUTHORS NEWS README
  91. %{_bindir}/randstat
  92. %{_bindir}/rngtest
  93. %{_sbindir}/rngd
  94. %{_mandir}/man1/rngtest.1.*
  95. %{_mandir}/man8/rngd.8.*
  96. %if %{with systemd}
  97. %attr(0644,root,root) %{_unitdir}/rngd.service
  98. %else
  99. %attr(0755,root,root) %{_initdir}/rngd
  100. %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/sysconfig/rngd
  101. %endif
  102. %changelog
  103. * Sat Oct 16 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 6.14-1
  104. - new upstream release.
  105. - built with openssl-3.0.0.
  106. * Mon Mar 08 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 6.11-1
  107. - new upstream release.
  108. * Sun Aug 09 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 6.10-5
  109. * added suffix to %%release with systemd build.
  110. * Thu Apr 02 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 6.10-4
  111. - initial build for Vine Linux.