diff options
author | Felippe de Meirelles Motta <lippe@FreeBSD.org> | 2008-08-05 16:57:54 +0000 |
---|---|---|
committer | Felippe de Meirelles Motta <lippe@FreeBSD.org> | 2008-08-05 16:57:54 +0000 |
commit | 9c1bf58953c94885df0e33d9708f104ca6bede24 (patch) | |
tree | 95951ac4d708053c70eb52de809582da651b5b15 | |
parent | 6ba334cb13c864aa1da9c63d78e4fe4248491ef3 (diff) | |
download | ports-9c1bf58953c94885df0e33d9708f104ca6bede24.tar.gz ports-9c1bf58953c94885df0e33d9708f104ca6bede24.zip |
ladvd is a minimal link layer advertisement sender which supports the
CDP and LLDP packet formats.
WWW: http://www.blinkenlights.nl/software/ladvd/
PR: ports/126016
Submitted by: Sten Spans <sten@blinkenlights.nl>
Approved by: gabor (mentor, implicit)
Notes
Notes:
svn path=/head/; revision=218079
-rw-r--r-- | net/ladvd/Makefile | 31 | ||||
-rw-r--r-- | net/ladvd/distinfo | 3 | ||||
-rw-r--r-- | net/ladvd/files/extra-patch-Makefile.in | 44 | ||||
-rw-r--r-- | net/ladvd/files/ladvd.in | 36 | ||||
-rw-r--r-- | net/ladvd/files/pkg-install.in | 32 | ||||
-rw-r--r-- | net/ladvd/files/pkg-message.in | 7 | ||||
-rw-r--r-- | net/ladvd/pkg-descr | 4 | ||||
-rw-r--r-- | net/ladvd/pkg-plist | 9 |
8 files changed, 166 insertions, 0 deletions
diff --git a/net/ladvd/Makefile b/net/ladvd/Makefile new file mode 100644 index 000000000000..29c541585aeb --- /dev/null +++ b/net/ladvd/Makefile @@ -0,0 +1,31 @@ +# New ports collection makefile for: ladvd +# Date Created: 27 Jul 2008 +# Whom: sten@blinkenlights.nl +# +# $FreeBSD$ +# + +PORTNAME= ladvd +PORTVERSION= 0.6.0 +CATEGORIES= net +MASTER_SITES= http://blinkenlights.nl/software/ladvd/ + +MAINTAINER= sten@blinkenlights.nl +COMMENT= A minimal CDP/LLDP sender + +GNU_CONFIGURE= yes + +MAN8= ladvd.8 +USE_RC_SUBR+= ladvd +SUB_FILES= pkg-message pkg-install + +.if defined(NOPORTDOCS) +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-Makefile.in +.endif + +post-install: + @${ECHO} "==> Creating custom user to run pdns_recursor..." + @${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + @${CAT} ${PKGMESSAGE} + +.include <bsd.port.mk> diff --git a/net/ladvd/distinfo b/net/ladvd/distinfo new file mode 100644 index 000000000000..3cd53727d133 --- /dev/null +++ b/net/ladvd/distinfo @@ -0,0 +1,3 @@ +MD5 (ladvd-0.6.0.tar.gz) = f5ae227505bf27b98bcf2ca97e1e4215 +SHA256 (ladvd-0.6.0.tar.gz) = 0ac7d9898ae4f8176b9fa68140c0b7fa5a015c004c62cc5bba64400cdd391d71 +SIZE (ladvd-0.6.0.tar.gz) = 97266 diff --git a/net/ladvd/files/extra-patch-Makefile.in b/net/ladvd/files/extra-patch-Makefile.in new file mode 100644 index 000000000000..ec203054707c --- /dev/null +++ b/net/ladvd/files/extra-patch-Makefile.in @@ -0,0 +1,44 @@ +--- Makefile.in.old 2008-08-03 21:36:15.000000000 -0300 ++++ Makefile.in 2008-08-03 21:47:09.000000000 -0300 +@@ -162,7 +162,6 @@ + sysconfdir = @sysconfdir@ + target_alias = @target_alias@ + SUBDIRS = src +-dist_doc_DATA = LICENSE doc/ChangeLog doc/README + dist_man_MANS = doc/ladvd.8 + EXTRA_DIST = debian + all: all-recursive +@@ -247,15 +246,6 @@ + echo " rm -f '$(DESTDIR)$(man8dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man8dir)/$$inst"; \ + done +-install-dist_docDATA: $(dist_doc_DATA) +- @$(NORMAL_INSTALL) +- test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" +- @list='$(dist_doc_DATA)'; for p in $$list; do \ +- if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ +- f=$(am__strip_dir) \ +- echo " $(dist_docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ +- $(dist_docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ +- done + + uninstall-dist_docDATA: + @$(NORMAL_UNINSTALL) +@@ -593,7 +583,7 @@ + + info-am: + +-install-data-am: install-dist_docDATA install-man ++install-data-am: install-man + + install-exec-am: + +@@ -634,7 +624,7 @@ + distclean-generic distclean-recursive distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ +- install-data-am install-dist_docDATA install-exec \ ++ install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-man8 install-strip installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ diff --git a/net/ladvd/files/ladvd.in b/net/ladvd/files/ladvd.in new file mode 100644 index 000000000000..f988113b4236 --- /dev/null +++ b/net/ladvd/files/ladvd.in @@ -0,0 +1,36 @@ +#!/bin/sh +# +# PROVIDE: ladvd +# REQUIRE: DAEMON + +# +# Add the following lines to /etc/rc.conf to enable ladvd: +# +#ladvd_enable="YES" +# +# See ladvd(8) for flags. +# + +. %%RC_SUBR%% + +name=ladvd +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/ladvd +load_rc_config ${name} + +# set defaults +ladvd_enable=${ladvd_enable:-"NO"} +ladvd_flags=${ladvd_flags:-"-cl"} + +start_precmd="ladvd_check" + +ladvd_check() +{ + if [ -z "${ladvd_flags}" ] + then + err 1 "ladvd_flags should be set" + fi +} + +run_rc_command "$1" diff --git a/net/ladvd/files/pkg-install.in b/net/ladvd/files/pkg-install.in new file mode 100644 index 000000000000..cf77763a41f2 --- /dev/null +++ b/net/ladvd/files/pkg-install.in @@ -0,0 +1,32 @@ +#!/bin/sh + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +LADVDUSER=${LADVDUSER:-ladvd} +LADVDUID=${LADVDUID:-142} +LADVDGROUP=${LADVDGROUP:-ladvd} +LADVDGID=${LADVDGID:-142} + +if ! pw groupshow "$LADVDGROUP" 2>/dev/null 1>&2; then + if pw groupadd $LADVDGROUP -g $LADVDGID; then + echo "=> Added group \"$LADVDGROUP\"." + else + echo "=> Adding group \"$LADVDGROUP\" failed..." + exit 1 + fi +fi + +if ! pw usershow "$LADVDUSER" 2>/dev/null 1>&2; then + if pw useradd $LADVDUSER -u $LADVDUID -g $LADVDGROUP -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "ladvd pseudo-user"; \ + then + echo "=> Added user \"$LADVDUSER\"." + else + echo "=> Adding user \"$LADVDUSER\" failed..." + exit 1 + fi +fi +exit 0 diff --git a/net/ladvd/files/pkg-message.in b/net/ladvd/files/pkg-message.in new file mode 100644 index 000000000000..602b453b8261 --- /dev/null +++ b/net/ladvd/files/pkg-message.in @@ -0,0 +1,7 @@ +******************************************************************* + If you want to run ladvd at startup you'll need the following + line in /etc/rc.conf(.local): + + ladvd_enable="YES" + +******************************************************************* diff --git a/net/ladvd/pkg-descr b/net/ladvd/pkg-descr new file mode 100644 index 000000000000..919368072a94 --- /dev/null +++ b/net/ladvd/pkg-descr @@ -0,0 +1,4 @@ +ladvd is a minimal link layer advertisement sender which supports the +CDP and LLDP packet formats. + +WWW: http://www.blinkenlights.nl/software/ladvd/ diff --git a/net/ladvd/pkg-plist b/net/ladvd/pkg-plist new file mode 100644 index 000000000000..707877a07cf3 --- /dev/null +++ b/net/ladvd/pkg-plist @@ -0,0 +1,9 @@ +sbin/ladvd +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/LICENSE +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%@dirrm %%DOCSDIR%% +@unexec echo "" +@unexec echo "If you are permanently removing ladvd, you should also:" | /usr/bin/fmt +@unexec echo "'remove user/group 'qscand'." | /usr/bin/fmt +@unexec echo "" |