Skip to content

Commit

Permalink
Add lldpd spk package
Browse files Browse the repository at this point in the history
  • Loading branch information
ixs authored and hgy59 committed Dec 27, 2022
1 parent 4d63feb commit 7813c6b
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 0 deletions.
16 changes: 16 additions & 0 deletions cross/lldpd/Makefile
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions cross/lldpd/PLIST
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions cross/lldpd/digests
Original file line number Diff line number Diff line change
@@ -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
31 changes: 31 additions & 0 deletions spk/lldpd/Makefile
Original file line number Diff line number Diff line change
@@ -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
Empty file added spk/lldpd/PLIST
Empty file.
31 changes: 31 additions & 0 deletions spk/lldpd/src/conf/privilege
Original file line number Diff line number Diff line change
@@ -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"
}]
}
Binary file added spk/lldpd/src/lldpd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions spk/lldpd/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
PATH="${SYNOPKG_PKGDEST}/bin:${PATH}"
LLDPD="${SYNOPKG_PKGDEST}/sbin/lldpd"
SERVICE_COMMAND="${LLDPD} -p ${PID_FILE}"

0 comments on commit 7813c6b

Please sign in to comment.