prngd.spec 3.3 KB

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