|
|
|
|
##
|
|
|
|
|
## prngd.spec -- OpenPKG RPM Specification
|
|
|
|
|
## Copyright (c) 2000-2001 Cable & Wireless Deutschland GmbH
|
|
|
|
|
## Copyright (c) 2000-2001 Ralf S. Engelschall <rse@engelschall.com>
|
|
|
|
|
##
|
|
|
|
|
## Permission to use, copy, modify, and distribute this software for
|
|
|
|
|
## any purpose with or without fee is hereby granted, provided that
|
|
|
|
|
## the above copyright notice and this permission notice appear in all
|
|
|
|
|
## copies.
|
|
|
|
|
##
|
|
|
|
|
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
|
|
|
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
|
|
|
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
|
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
|
|
|
|
|
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
|
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
|
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
|
|
|
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
|
|
|
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
|
|
|
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
|
|
|
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
|
## SUCH DAMAGE.
|
|
|
|
|
##
|
|
|
|
|
|
|
|
|
|
# package information
|
|
|
|
|
Name: prngd
|
|
|
|
|
Summary: Pseudo Random Number Generator Daemon
|
|
|
|
|
URL: http://www.aet.tu-cottbus.de/personen/jaenicke/postfix_tls/prngd.html
|
|
|
|
|
Vendor: Lutz J<EFBFBD>nicke
|
|
|
|
|
Packager: The OpenPKG Project
|
|
|
|
|
Distribution: OpenPKG [EXP]
|
|
|
|
|
Group: Security
|
|
|
|
|
License: PD
|
|
|
|
|
Version: 0.9.23
|
|
|
|
|
Release: %{l_branch}.0
|
|
|
|
|
|
|
|
|
|
# list of sources
|
|
|
|
|
Source0: ftp://ftp.aet.tu-cottbus.de/pub/postfix_tls/related/prngd/prngd-%{version}.tar.gz
|
|
|
|
|
Patch0: prngd-%{version}.patch
|
|
|
|
|
|
|
|
|
|
# build information
|
|
|
|
|
Prefix: %{l_prefix}
|
|
|
|
|
BuildRoot: %{l_buildroot}
|
|
|
|
|
BuildPreReq: OpenPKG, openpkg >= 0.9-33, gcc
|
|
|
|
|
PreReq: OpenPKG, openpkg >= 0.9-33
|
|
|
|
|
AutoReq: no
|
|
|
|
|
AutoReqProv: no
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
PRNGD is the Pseudo Random Number Generator Daemon. It offers an
|
|
|
|
|
EGD compatible interface to obtain random data and is intented to
|
|
|
|
|
be used as an entropy source to feed other software, especially
|
|
|
|
|
software based on OpenSSL. Like EGD it calls system programs to
|
|
|
|
|
collect entropy. Unlike EGD it does not generate a pool of random
|
|
|
|
|
bits that can be called from other software. Rather more it feeds
|
|
|
|
|
the bits gathered into the OpenSSL PRNG from which the "random
|
|
|
|
|
bits" are obtained when requested. This way, PRNGD is never drained
|
|
|
|
|
and can * never block (unlike EGD), so it is also suitable to seed
|
|
|
|
|
inetd-started programs. It also features a seed-save file, so that
|
|
|
|
|
it is immediately usable after system start.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q
|
|
|
|
|
%patch -p0
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
CC="%{l_cc}"
|
|
|
|
|
CFLAGS="%{l_cflags -O}"
|
|
|
|
|
LIBS=""
|
|
|
|
|
DEFS="-DRANDSAVENAME=\\\"%{l_prefix}/var/prndg/prngd.seed\\\""
|
|
|
|
|
DEFS="$DEFS -DCONFIGFILE=\\\"%{l_prefix}/etc/prngd/prngd.conf\\\""
|
|
|
|
|
case "%{l_target}" in
|
|
|
|
|
*-freebsd* ) ;;
|
|
|
|
|
*-linux* ) ;;
|
|
|
|
|
*-solaris* ) CFLAGS="$CFLAGS -DSOLARIS"; LIBS="$SYSLIBS -lsocket -lnsl" ;;
|
|
|
|
|
esac
|
|
|
|
|
%{l_make} %{l_mflags} \
|
|
|
|
|
CC="$CC" CFLAGS="$CFLAGS" DEFS="$DEFS" LIBS="$LIBS"
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/bin
|
|
|
|
|
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
|
|
|
|
|
|
|
|
|
|
%files -f files
|
|
|
|
|
|
|
|
|
|
%clean
|
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|