1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

o Update to 1.12[1].

o Clean up rc script to rc.conf configuratable.  Acording to the
  POLA, if you don't set it, this feature will have no effect
  (same behavior before now).

Pointed out by:	Mats Dufberg <dufberg@narnia.pp.se> [1]
This commit is contained in:
Norikatsu Shigemura 2003-03-26 02:25:52 +00:00
parent f801162f94
commit 13011e478e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=77467
5 changed files with 42 additions and 27 deletions

View File

@ -6,8 +6,8 @@
#
PORTNAME= drac
PORTVERSION= 1.11
PORTREVISION= 2
PORTVERSION= 1.12
#PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= ftp://ftp.cc.umanitoba.ca/src/ \
http://atreides.freenix.no/~anders/ \
@ -57,9 +57,7 @@ do-install:
@${INSTALL_MAN} ${WRKSRC}/dracauth.3 ${PREFIX}/man/man3/
@${INSTALL_MAN} ${WRKSRC}/rpc.dracd.1m ${PREFIX}/man/man1/rpc.dracd.1
.endif
@if [ ! -f ${PREFIX}/etc/rc.d/dracd.sh.sample ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/dracd.sh.sample startup file."; \
${INSTALL_SCRIPT} -m 751 ${FILESDIR}/dracd.sh ${PREFIX}/etc/rc.d/dracd.sh.sample; \
fi
@${ECHO_MSG} "Installing ${PREFIX}/etc/rc.d/dracd.sh startup file."
@${INSTALL_SCRIPT} ${FILESDIR}/dracd.sh ${PREFIX}/etc/rc.d/dracd.sh
.include <bsd.port.post.mk>

View File

@ -1 +1 @@
MD5 (drac.tar.Z) = 0b714b32c06b4ebd1779add6c8221248
MD5 (drac.tar.Z) = fadaee589bf1dd9067222d58637d5fe4

View File

@ -1,16 +1,30 @@
#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 1
if ! PREFIX=$(/bin/expr $0 : "\(/.*\)/etc/rc\.d/${0##*/}\$"); then
echo "$0: Cannot determine the PREFIX" >&2
exit 64
fi
if [ -r /etc/defaults/rc.conf ]; then
. /etc/defaults/rc.conf
source_rc_confs
elif [ -r /etc/rc.conf ]; then
. /etc/rc.conf
fi
case "$1" in
start)
[ -x ${PREFIX}/sbin/rpc.dracd ] && ${PREFIX}/sbin/rpc.dracd && echo -n ' dracd'
case ${dracd_enable:-NO} in
[Yy][Ee][Ss])
${dracd_program:-${PREFIX}/sbin/rpc.dracd} ${drac_flags} && echo -n ' dracd'
;;
esac
;;
stop)
killall rpc.dracd >/dev/null 2>&1 && echo -n ' dracd'
case ${dracd_enable:-NO} in
[Yy][Ee][Ss])
/usr/bin/killall rpc.dracd >/dev/null 2>&1 && echo -n ' dracd'
esac
;;
*)
echo "Usage: `basename $0` {start|stop}" >&2

View File

@ -1,5 +1,5 @@
--- Makefile.orig Mon Nov 20 16:35:16 2000
+++ Makefile Wed Jan 2 22:39:40 2002
--- Makefile.orig Mon Jan 13 05:45:12 2003
+++ Makefile Wed Mar 26 08:58:22 2003
@@ -5,9 +5,10 @@
# Paths
@ -7,44 +7,47 @@
-INSTALL = /usr/ucb/install
-EBIN = /usr/local/sbin
-MAN = /usr/local/man/man
+INSTALL = install
+INSTALL? = install
+EBIN = ${PREFIX}/sbin
+MAN = ${PREFIX}/man/man
+ETC_DIR = ${PREFIX}/etc
# OS-Dependant settings
@@ -33,20 +34,40 @@
@@ -33,22 +34,42 @@
# -DCIDR_KEY # keys in CIDR format
# -DTERM_KD # keys and data nul-terminated
-DEFS = -DTI_RPC -DFCNTL_LOCK -DSYSINFO
+.if defined(WITH_TI_RPC)
+RPCFLAGS= -DTI_RPC
+DEFS+= -DTI_RPC
+.else
+RPCFLAGS= -DSOCK_RPC
+DEFS+= -DSOCK_RPC
+.endif
+
+.if defined(WITH_POSTFIX) || defined(WITH_POSTFIX_DB3)
+DEFS= $(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD
+DEFS+= -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD
+.elif defined(WITH_EXIM)
+DEFS= $(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY
+DEFS+= -DFLOCK_LOCK -DGETHOST -DDASH_C -DTERM_KD -DREQ_HASH -DCIDR_KEY
+.else
+DEFS= $(RPCFLAGS) -DFLOCK_LOCK -DGETHOST -DDASH_C
+DEFS+= -DFLOCK_LOCK -DGETHOST -DDASH_C
+.endif
+.if defined(WITH_FOREGROUND)
+DEFS+= -DRPC_SVC_FG
+.endif
# Compiler flags
CC = cc
-CC = cc
+CC? = cc
RANLIB = :
-CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-3.1.17/build_unix
+CFLAGS = $(DEFS) -g -I${PREFIX}/include -DDBFILE=\"$(ETC_DIR)/dracd.db\" -DALFILE=\"$(ETC_DIR)/dracd.allow\"
-CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-4.1.25/build_unix
+CFLAGS+= $(DEFS) -g -I${PREFIX}/include -DDBFILE=\"$(ETC_DIR)/dracd.db\" -DALFILE=\"$(ETC_DIR)/dracd.allow\"
#CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-3.1.17/build_unix
#CFLAGS = $(DEFS) -g -I/usr/local/src/db/db-2.4.14/Unix
#CFLAGS = $(DEFS) -g -I/usr/local/src/db/db.1.85/PORT/sunos.5.2/include
-LDLIBS = -L/usr/local/src/db/db-3.1.17/build_unix -lnsl -ldb
+LDLIBS =
-LDLIBS = -L/usr/local/src/db/db-4.1.25/build_unix -lnsl -ldb-4.1
+LDLIBS =
#LDLIBS = -L/usr/local/src/db/db-3.1.17/build_unix -lnsl -ldb
#LDLIBS = -L/usr/local/src/db/db-2.4.14/Unix -lnsl -ldb
#LDLIBS = -L/usr/local/src/db/db.1.85/PORT/sunos.5.2 -lnsl -ldb
-TSTLIBS = -L. -ldrac -lnsl

View File

@ -1,4 +1,4 @@
sbin/rpc.dracd
include/drac.h
lib/libdrac.a
etc/rc.d/dracd.sh.sample
etc/rc.d/dracd.sh