prngd.spec 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ##
  2. ## prngd.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: prngd
  27. Summary: Pseudo Random Number Generator Daemon
  28. URL: http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html
  29. Vendor: Lutz Jänicke
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG [REL]
  32. Group: Security
  33. License: PD
  34. Version: 0.9.23
  35. Release: 20011201
  36. # list of sources
  37. Source0: ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/related/prngd/prngd-%{version}.tar.gz
  38. Patch0: prngd-%{version}.patch
  39. # build information
  40. Prefix: %{l_prefix}
  41. BuildRoot: %{l_buildroot}
  42. BuildPreReq: OpenPKG, openpkg >= 20011227, gcc
  43. PreReq: OpenPKG, openpkg >= 20011227
  44. AutoReq: no
  45. AutoReqProv: no
  46. %description
  47. PRNGD is the Pseudo Random Number Generator Daemon. It offers an
  48. EGD compatible interface to obtain random data and is intented to
  49. be used as an entropy source to feed other software, especially
  50. software based on OpenSSL. Like EGD it calls system programs to
  51. collect entropy. Unlike EGD it does not generate a pool of random
  52. bits that can be called from other software. Rather more it feeds
  53. the bits gathered into the OpenSSL PRNG from which the "random
  54. bits" are obtained when requested. This way, PRNGD is never drained
  55. and can * never block (unlike EGD), so it is also suitable to seed
  56. inetd-started programs. It also features a seed-save file, so that
  57. it is immediately usable after system start.
  58. %prep
  59. %setup -q
  60. %patch -p0
  61. %build
  62. CC="%{l_cc}"
  63. CFLAGS="%{l_cflags -O}"
  64. LIBS=""
  65. DEFS="-DRANDSAVENAME=\\\"%{l_prefix}/var/prndg/prngd.seed\\\""
  66. DEFS="$DEFS -DCONFIGFILE=\\\"%{l_prefix}/etc/prngd/prngd.conf\\\""
  67. case "%{l_target}" in
  68. *-freebsd* ) ;;
  69. *-linux* ) ;;
  70. *-solaris* ) CFLAGS="$CFLAGS -DSOLARIS"; LIBS="$SYSLIBS -lsocket -lnsl" ;;
  71. esac
  72. %{l_make} %{l_mflags} \
  73. CC="$CC" CFLAGS="$CFLAGS" DEFS="$DEFS" LIBS="$LIBS"
  74. %install
  75. rm -rf $RPM_BUILD_ROOT
  76. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
  77. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  78. %files -f files
  79. %clean
  80. rm -rf $RPM_BUILD_ROOT