From 01d7efcff1d99a04cb9c43e553be7071d6e12ae1 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Thu, 15 May 2014 01:23:54 +0200 Subject: Initial commit. --- Makefile | 47 +++++++++++++++++++++++++++++++++++++++++++++++ distinfo | 2 ++ files/lldpd.in | 27 +++++++++++++++++++++++++++ pkg-descr | 14 ++++++++++++++ pkg-plist | 19 +++++++++++++++++++ 5 files changed, 109 insertions(+) create mode 100644 Makefile create mode 100644 distinfo create mode 100644 files/lldpd.in create mode 100644 pkg-descr create mode 100644 pkg-plist diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..194ef2f --- /dev/null +++ b/Makefile @@ -0,0 +1,47 @@ +# Created by: Alexander Sulfrian +# $FreeBSD$ + +PORTNAME= lldpd +PORTVERSION= 0.7.8 +CATEGORIES= net-mgmt +MASTER_SITES= http://media.luffy.cx/files/lldpd/ + +MAINTAINER= alexander@sulfrian.net +COMMENT= LLDP (802.1ab)/CDP/EDP/SONMP/FDP daemon and SNMP subagent +LICENSE= ISCL + +LIB_DEPENDS= libevent-2.0.so:${PORTSDIR}/devel/libevent2 +CONFLICTS_INSTALL= openlldp + +GNU_CONFIGURE= yes +CONFIGURE_ARGS+= --with-privsep-chroot=/var/empty +CONFIGURE_ENV+= CFLAGS="-I/usr/local/include" LDFLAGS="-L/usr/local/lib" +CONFIGURE_ENV+= LIBEVENT_CFLAGS=" " LIBEVENT_LIBS="-L/usr/local/lib/event2/ -levent-2.0" + +DOCS= NEWS README.md +USE_RC_SUBR= lldpd + +UID_FILES=${.CURDIR}/../../UIDs +GID_FILES=${.CURDIR}/../../GIDs +USERS= _lldpd +GROUPS= _lldpd + + +OPTIONS_DEFINE= JSON XML SNMP +JSON_DESC= "Enable JSON output via Jansson" +XML_DESC= "Enable XML output via libxml2" +SNMP_DESC= "Enable the use of SNMP" +OPTIONS_DEFAULT= JSON XML + +JSON_LIB_DEPENDS= libjansson.so:${PORTSDIR}/devel/jansson +JSON_CONFIGURE_ENV= JANSSON_CFLAGS=" " JANSSON_LIBS="-ljansson" +JSON_CONFIGURE_WITH= json + +XML_LIB_DEPENDS= libxml2.so:${PORTSDIR}/textproc/libxml2 +XML_CONFIGURE_ENV= XML2_CFLAGS="-I/usr/local/include/libxml2" XML2_LIBS="-lxml2" +XML_CONFIGURE_WITH= xml + +SNMP_CONFIGURE_WITH= snmp +SNMP_LIB_DEPENDS= libnetsnmp.so:${PORTSDIR}/net-mgmt/net-snmp + +.include diff --git a/distinfo b/distinfo new file mode 100644 index 0000000..a8c0197 --- /dev/null +++ b/distinfo @@ -0,0 +1,2 @@ +SHA256 (lldpd-0.7.8.tar.gz) = d22151e0aed3831435924c1958b4457118ff34e84164aa3b6e0b136a188c2ce7 +SIZE (lldpd-0.7.8.tar.gz) = 1491939 diff --git a/files/lldpd.in b/files/lldpd.in new file mode 100644 index 0000000..2afe88c --- /dev/null +++ b/files/lldpd.in @@ -0,0 +1,27 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: lldpd +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable lldpd: +# lldpd_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable lldpd. +# lldpd_flags (str): Empty by default. +# + +. /etc/rc.subr + +name=lldpd +rcvar=lldpd_enable + +load_rc_config $name + +: ${lldpd_enable:="NO"} + +command=%%PREFIX%%/sbin/${name} +pidfile=/var/run/${name}.pid + +run_rc_command "$1" diff --git a/pkg-descr b/pkg-descr new file mode 100644 index 0000000..0b35098 --- /dev/null +++ b/pkg-descr @@ -0,0 +1,14 @@ +LLDP is an industry standard protocol designed to supplant +proprietary Link-Layer protocols such as Extreme's EDP (Extreme +Discovery Protocol) and CDP (Cisco Discovery Protocol). The goal of +LLDP is to provide an inter-vendor compatible mechanism to deliver +Link-Layer notifications to adjacent network devices. + +This implementation provides LLDP sending and reception, supports +VLAN and includes an SNMP subagent that can interface to an SNMP +agent through AgentX protocol. + +This daemon is also able to deal with CDP, SONMP, FDP and EDP +protocol. It also handles LLDP-MED extension. + +WWW: http://vincentbernat.github.io/lldpd/ diff --git a/pkg-plist b/pkg-plist new file mode 100644 index 0000000..500b4ee --- /dev/null +++ b/pkg-plist @@ -0,0 +1,19 @@ +include/lldp-const.h +include/lldpctl.h +lib/liblldpctl.a +lib/liblldpctl.la +lib/liblldpctl.so +lib/liblldpctl.so.6 +lib/pkgconfig/lldpctl.pc +man/man8/lldpcli.8.gz +man/man8/lldpctl.8.gz +man/man8/lldpd.8.gz +sbin/lldpcli +sbin/lldpctl +sbin/lldpd +%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTE.md +%%PORTDOCS%%%%DOCSDIR%%/ChangeLog +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README.md +%%PORTDOCS%%@dirrmtry %%DOCSDIR%% +@dirrmtry lib/pkgconfig -- cgit v1.2.3-1-g7c22