| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178 |
- ##
- ## drac.spec -- OpenPKG RPM Package Specification
- ## Copyright (c) 2000-2006 OpenPKG Foundation e.V. <http://openpkg.net/>
- ## Copyright (c) 2000-2006 Ralf S. Engelschall <http://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: drac
- Summary: Dynamic Relay Authorization Control (DRAC)
- URL: http://mail.cc.umanitoba.ca/drac/
- Vendor: University of Manitoba
- Packager: OpenPKG
- Distribution: OpenPKG
- Class: EVAL
- Group: Mail
- License: BSD
- Version: 1.12
- Release: 20061012
- # package options
- %option with_fsl yes
- # list of sources
- Source0: ftp://ftp.openpkg.org/sources/CPY/VERSIONED/drac/drac-%{version}.tar.Z
- Source1: rc.drac
- Source2: fsl.drac
- Source3: drac.h
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20060823, gcc
- PreReq: OpenPKG, openpkg >= 20060823
- %if "%{with_fsl}" == "yes"
- BuildPreReq: fsl >= 1.2.0
- PreReq: fsl >= 1.2.0
- %endif
- BuildPreReq: db >= 4.2
- PreReq: db >= 4.2
- AutoReq: no
- AutoReqProv: no
- %description
- DRAC is a daemon that dynamically updates a relay authorization
- map for Sendmail, Postfix and other MTA's that supports it. It
- provides a way to allow legitimate users to relay mail through an
- SMTP server, while still preventing others from using it as a spam
- relay. User's IP addresses are added to the map immediately after
- they have authenticated to the POP or IMAP server. By default, map
- entries expire after 30 minutes, but can be renewed by additional
- authentication. Periodically checking mail on a POP server is
- sufficient to do this. The POP and SMTP servers can be on different
- hosts.
- %track
- prog drac = {
- version = %{version}
- url = ftp://ftp.openpkg.org/sources/CPY/VERSIONED/drac/
- regex = drac-(__VER__)\.tar\.Z
- }
- %prep
- %setup -q -c
- %build
- # determine platform dependent flags
- cppflags="%{l_cppflags}"
- ldflags="%{l_ldflags} -ldb"
- ldflags_tst="-L. -ldrac"
- case "%{l_platform -t}" in
- *-sunos5.[6-9]* )
- cppflags="$cppflags -DTI_RPC -DFCNTL_LOCK -DSYSINFO"
- ldflags="$ldflags -lnsl"
- ldflags_tst="$ldflags_tst -lnsl"
- ;;
- *-freebsd[45]* | *-linux2* | *-netbsd1* )
- cppflags="$cppflags -DSOCK_RPC -DFLOCK_LOCK -DGETHOST -DDASH_C"
- ;;
- *-irix6* )
- cppflags="$cppflags -DTI_RPC -DFCNTL_LOCK -DSYSINFO -D_SVR4_TIRPC"
- ldflags="$ldflags -lnsl"
- ldflags_tst="$ldflags_tst -lnsl"
- ;;
- esac
- # configure build environment
- %{l_shtool} subst \
- -e "s;^\(DEFS =\).*\$;\1 $cppflags;" \
- -e "s;^\(LDLIBS =\).*\$;\1 %{l_fsl_libs} $ldflags;" \
- -e "s;^\(TSTLIBS =\).*\$;\1 $ldflags_tst;" \
- -e 's;^\(CC =\).*$;\1 %{l_cc};' \
- -e 's;^\(RANLIB =\).*$;\1 ranlib;' \
- -e 's;^\(CFLAGS =\).*$;\1 \$(DEFS);' \
- -e 's;^\(RPCGENFLAGS =\).*$;\1 -Y %{l_prefix}/bin;' \
- Makefile
- # configure paths in source
- %{l_shtool} subst \
- -e "s;/etc/mail;%{l_prefix}/etc/drac;g" \
- rpc.dracd.c
- # build program and library
- %{l_make} %{l_mflags}
- %install
- # create installation area
- rm -rf $RPM_BUILD_ROOT
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/drac \
- $RPM_BUILD_ROOT%{l_prefix}/var/drac \
- $RPM_BUILD_ROOT%{l_prefix}/sbin \
- $RPM_BUILD_ROOT%{l_prefix}/lib \
- $RPM_BUILD_ROOT%{l_prefix}/include \
- $RPM_BUILD_ROOT%{l_prefix}/man/man8 \
- $RPM_BUILD_ROOT%{l_prefix}/man/man3
- # install program
- %{l_shtool} install -c -s -m 755 \
- rpc.dracd $RPM_BUILD_ROOT%{l_prefix}/sbin/dracd
- %{l_shtool} install -c -m 644 \
- rpc.dracd.1m $RPM_BUILD_ROOT%{l_prefix}/man/man8/dracd.8
- # install library
- %{l_shtool} install -c -m 644 \
- %{SOURCE drac.h} $RPM_BUILD_ROOT%{l_prefix}/include/
- %{l_shtool} install -c -m 644 \
- libdrac.a $RPM_BUILD_ROOT%{l_prefix}/lib/
- %{l_shtool} install -c -m 644 \
- dracauth.3 $RPM_BUILD_ROOT%{l_prefix}/man/man3/
- # install empty database
- %{l_shtool} install -c -m 644 \
- /dev/null $RPM_BUILD_ROOT%{l_prefix}/etc/drac/dracd.db
- # install run-command script
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d
- %{l_shtool} install -c -m 755 %{l_value -s -a} \
- %{SOURCE rc.drac} $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
- # install OSSP fsl configuration
- %{l_shtool} mkdir -f -p -m 755 \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl
- %{l_shtool} install -c -m 644 %{l_value -s -a} \
- %{SOURCE fsl.drac} \
- $RPM_BUILD_ROOT%{l_prefix}/etc/fsl/
- # determine installation files
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
- %{l_files_std} \
- '%not %dir %{l_prefix}/etc/fsl' \
- '%config %{l_prefix}/etc/fsl/fsl.drac' \
- '%config %{l_prefix}/etc/drac/dracd.db'
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|