diff --git a/cross/lldpd/Makefile b/cross/lldpd/Makefile new file mode 100644 index 00000000000..73e254d71de --- /dev/null +++ b/cross/lldpd/Makefile @@ -0,0 +1,16 @@ +PKG_NAME = lldpd +PKG_VERS = 1.0.10 +PKG_EXT = tar.gz +PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) +PKG_DIST_SITE = https://media.luffy.cx/files/lldpd +PKG_DIR = $(PKG_NAME)-$(PKG_VERS) + +DEPENDS = + +HOMEPAGE = https://lldpd.github.io +COMMENT = lldpd is a 802.1AB implementation (LLDP) to help you locate neighbors of all your equipments +LICENSE = ISC + +GNU_CONFIGURE = 1 +CONFIGURE_ARGS = --enable-privsep --disable-cdp --disable-fdp --disable-edp --disable-sonmp --with-privsep-user=sc-lldpd --with-privsep-group=lldpd +include ../../mk/spksrc.cross-cc.mk diff --git a/cross/lldpd/PLIST b/cross/lldpd/PLIST new file mode 100644 index 00000000000..e320f985645 --- /dev/null +++ b/cross/lldpd/PLIST @@ -0,0 +1,5 @@ +lnk:lib/liblldpctl.so.4 +lib:lib/liblldpctl.so.4.9.0 +bin:sbin/lldpcli +bin:sbin/lldpctl +bin:sbin/lldpd diff --git a/cross/lldpd/digests b/cross/lldpd/digests new file mode 100644 index 00000000000..b6b2f16b79e --- /dev/null +++ b/cross/lldpd/digests @@ -0,0 +1,3 @@ +lldpd-1.0.10.tar.gz SHA1 feb556445811c61df81d3dfe8818cda59a371247 +lldpd-1.0.10.tar.gz SHA256 445b2d76037ef3ebd03d40e1fc1f29ef08102faa3a09fe846b952797c8bc7722 +lldpd-1.0.10.tar.gz MD5 233e9a2e12d319bc362cba2ed74076b4 diff --git a/spk/lldpd/Makefile b/spk/lldpd/Makefile new file mode 100644 index 00000000000..ca4c9ebac39 --- /dev/null +++ b/spk/lldpd/Makefile @@ -0,0 +1,31 @@ +SPK_NAME = lldpd +SPK_VERS = 1.0.10 +SPK_REV = 1 +SPK_ICON = src/lldpd.png + +DEPENDS = cross/$(SPK_NAME) + +MAINTAINER = SynoCommunity +DESCRIPTION = LLDP (Link Layer Discovery Protocol) 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. +DISPLAY_NAME = lldpd +CHANGELOG = "Initial release" + +HOMEPAGE = https://lldpd.github.io +LICENSE = ISC + +CONF_DIR = src/conf +SERVICE_USER = sc-lldpd +STARTABLE = yes + +POST_STRIP_TARGET = lldpd_extra_install + +SERVICE_SETUP = src/service-setup.sh + +SPK_COMMANDS = sbin/lldpcli sbin/lldpctl + +include ../../mk/spksrc.spk.mk + +.PHONY: lldpd_extra_install +lldpd_extra_install: + install -m 755 -d $(STAGING_DIR)/var + install -m 755 -d $(STAGING_DIR)/var/run diff --git a/spk/lldpd/PLIST b/spk/lldpd/PLIST new file mode 100644 index 00000000000..e69de29bb2d diff --git a/spk/lldpd/src/conf/privilege b/spk/lldpd/src/conf/privilege new file mode 100644 index 00000000000..dc14bf2e726 --- /dev/null +++ b/spk/lldpd/src/conf/privilege @@ -0,0 +1,31 @@ +{ + "defaults":{ + "run-as": "package" + }, + "username": "sc-lldpd", + "ctrl-script": [{ + "action": "preinst", + "run-as": "root" + }, { + "action": "postinst", + "run-as": "root" + }, { + "action": "preuninst", + "run-as": "root" + }, { + "action": "postuninst", + "run-as": "root" + }, { + "action": "preupgrade", + "run-as": "root" + }, { + "action": "postupgrade", + "run-as": "root" + }, { + "action": "start", + "run-as": "root" + }, { + "action": "stop", + "run-as": "root" + }] +} diff --git a/spk/lldpd/src/lldpd.png b/spk/lldpd/src/lldpd.png new file mode 100644 index 00000000000..106a60f735a Binary files /dev/null and b/spk/lldpd/src/lldpd.png differ diff --git a/spk/lldpd/src/service-setup.sh b/spk/lldpd/src/service-setup.sh new file mode 100644 index 00000000000..9d31211e5be --- /dev/null +++ b/spk/lldpd/src/service-setup.sh @@ -0,0 +1,3 @@ +PATH="${SYNOPKG_PKGDEST}/bin:${PATH}" +LLDPD="${SYNOPKG_PKGDEST}/sbin/lldpd" +SERVICE_COMMAND="${LLDPD} -p ${PID_FILE}"