aboutsummaryrefslogtreecommitdiffstats
path: root/net-mgmt
diff options
context:
space:
mode:
authorsem <sem@FreeBSD.org>2007-02-06 22:25:41 +0800
committersem <sem@FreeBSD.org>2007-02-06 22:25:41 +0800
commit73637ca12ca4e9d85f30369ee017fec8475552fc (patch)
tree96be6932928795c831a58818427efed8850a6c32 /net-mgmt
parent3d0b56ea542f925d8be0c42fd8d378d54f7b8e76 (diff)
downloadfreebsd-ports-gnome-73637ca12ca4e9d85f30369ee017fec8475552fc.tar.gz
freebsd-ports-gnome-73637ca12ca4e9d85f30369ee017fec8475552fc.tar.zst
freebsd-ports-gnome-73637ca12ca4e9d85f30369ee017fec8475552fc.zip
- rcNG'fy
- get rid of pkg-plist - grab
Diffstat (limited to 'net-mgmt')
-rw-r--r--net-mgmt/cdpd/Makefile13
-rw-r--r--net-mgmt/cdpd/files/cdpd.in36
-rw-r--r--net-mgmt/cdpd/files/cdpd.patch11
-rw-r--r--net-mgmt/cdpd/pkg-plist2
4 files changed, 46 insertions, 16 deletions
diff --git a/net-mgmt/cdpd/Makefile b/net-mgmt/cdpd/Makefile
index 428221735b3c..adcee4b51f8e 100644
--- a/net-mgmt/cdpd/Makefile
+++ b/net-mgmt/cdpd/Makefile
@@ -6,18 +6,21 @@
PORTNAME= cdpd
PORTVERSION= 1.0.2
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net-mgmt
MASTER_SITES= ftp://ftp.lexa.ru/pub/domestic/snar/
-MAINTAINER= ports@FreeBSD.org
-COMMENT= CDPdaemon - sends Cisco Discovery Protocol announces over ethernet
+MAINTAINER= sem@FreeBSD.org
+COMMENT= A daemon to send Cisco Discovery Protocol announces over ethernet
BUILD_DEPENDS= ${LIBNET_CONFIG}:${PORTSDIR}/net/libnet10
GNU_CONFIGURE= yes
CFLAGS+= `${LIBNET_CONFIG} --cflags`
+USE_RC_SUBR= cdpd
+PLIST_FILES= sbin/cdpd
+
MAN8= cdpd.8
LIBNET_CONFIG?= ${LOCALBASE}/bin/libnet10-config
@@ -26,4 +29,8 @@ post-patch:
@${REINPLACE_CMD} -e 's|libnet-config|${LIBNET_CONFIG:T}|' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
+do-install:
+ @${INSTALL_PROGRAM} ${WRKSRC}/cdpd ${PREFIX}/sbin
+ @${INSTALL_MAN} ${WRKSRC}/cdpd.8 ${MAN8PREFIX}/man/man8
+
.include <bsd.port.mk>
diff --git a/net-mgmt/cdpd/files/cdpd.in b/net-mgmt/cdpd/files/cdpd.in
new file mode 100644
index 000000000000..f6db15314afc
--- /dev/null
+++ b/net-mgmt/cdpd/files/cdpd.in
@@ -0,0 +1,36 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: cdpd
+# REQUIRE: NETWORKING
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable cdpd:
+#
+# cdpd_enable="YES"
+#
+# You can define flags for cdpd running. See cdpd(8) for details.
+#
+# Example:
+# cdpd_flags="-i em0"
+#
+# Default flags: -a
+#
+
+. %%RC_SUBR%%
+
+name=cdpd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/$name
+
+# set defaults
+
+cdpd_enable=${cdpd_enable:-"NO"}
+cdpr_flags=${cdpd_flags:-"-a"}
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net-mgmt/cdpd/files/cdpd.patch b/net-mgmt/cdpd/files/cdpd.patch
deleted file mode 100644
index 497ff9f311fc..000000000000
--- a/net-mgmt/cdpd/files/cdpd.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cdpd.sh.in.orig Fri Jul 25 07:28:15 2003
-+++ cdpd.sh.in Fri Jul 25 07:28:23 2003
-@@ -3,7 +3,7 @@
- case $1 in
- start)
- [ -x @prefix@@libexecdir@/cdpd ] && @prefix@@libexecdir@/cdpd -a;
-- echo ' cdpd';
-+ echo -n ' cdpd';
- ;;
- stop)
- killall cdpd
diff --git a/net-mgmt/cdpd/pkg-plist b/net-mgmt/cdpd/pkg-plist
deleted file mode 100644
index 80c13c6fd10b..000000000000
--- a/net-mgmt/cdpd/pkg-plist
+++ /dev/null
@@ -1,2 +0,0 @@
-libexec/cdpd
-etc/rc.d/cdpd.sh