summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorhauke <hauke@pkgsrc.org>2020-06-19 10:05:07 +0000
committerhauke <hauke@pkgsrc.org>2020-06-19 10:05:07 +0000
commit4d74b0deb1f336e73172a6d48a54e2668bc3ed61 (patch)
tree61136ea1c3ff55a2d9236231fe636eb3afb65e19 /net
parent6851ef99da7e3b508ac1beb5931096c167c537ca (diff)
downloadpkgsrc-4d74b0deb1f336e73172a6d48a54e2668bc3ed61.tar.gz
PKG_SYSCONFDIR fixes.
Install a sample config file. Mention, but do not install lldpd.d directory. The config file is not mandatory, adjust rc.d script.
Diffstat (limited to 'net')
-rw-r--r--net/lldpd/Makefile26
-rw-r--r--net/lldpd/PLIST5
-rw-r--r--net/lldpd/distinfo3
-rw-r--r--net/lldpd/files/lldpd.conf10
-rw-r--r--net/lldpd/files/lldpd.sh3
-rw-r--r--net/lldpd/patches/patch-src_daemon_lldpd.8.in22
6 files changed, 55 insertions, 14 deletions
diff --git a/net/lldpd/Makefile b/net/lldpd/Makefile
index 25d8f2f65eb..d8c4c5a6cc4 100644
--- a/net/lldpd/Makefile
+++ b/net/lldpd/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.28 2020/06/18 20:01:17 hauke Exp $
+# $NetBSD: Makefile,v 1.29 2020/06/19 10:05:07 hauke Exp $
DISTNAME= lldpd-1.0.5
-#PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= net
MASTER_SITES= http://media.luffy.cx/files/lldpd/
@@ -22,18 +22,17 @@ USE_LANGUAGES= c
CONFIGURE_ARGS+= --with-privsep-chroot=${LLDPD_HOME}
# Let pkgsrc handle security features.
CONFIGURE_ARGS+= --disable-hardening
-
CONFIGURE_ARGS+= --with-embedded-libevent=no
CONFIGURE_ARGS+= --with-readline
-
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
# run/lldpd.socket is created under this directory
# (the default is ${PRERIX}/var, changed since 0.7.9)
CONFIGURE_ARGS+= --localstatedir=${VARBASE}
+
BUILD_DEFS+= VARBASE
-PKG_SYSCONFSUBDIR= lldpd.d
EGDIR= share/examples/${PKGBASE}
-CONF_FILES= ${EGDIR}/README.conf ${PKG_SYSCONFDIR}/README.conf
+CONF_FILES= ${EGDIR}/lldpd.conf ${PKG_SYSCONFDIR}/lldpd.conf
RCD_SCRIPTS= lldpd
@@ -48,17 +47,26 @@ PKG_GROUPS= ${LLDPD_GROUP}
PKG_USERS= ${LLDPD_USER}:${LLDPD_GROUP}
PKG_HOME.${LLDPD_USER}= ${LLDPD_HOME}
-TEST_TARGET= check
+SUBST_CLASSES+= files
+SUBST_STAGE.files= pre-configure
+SUBST_FILES.files= ../lldpd.conf
+SUBST_VARS.files= PKG_SYSCONFDIR
+SUBST_MESSAGE.files= Fixing default configuration file.
INSTALLATION_DIRS+= sbin include lib ${PKGMANDIR}/man5 ${PKGMANDIR}/man8
INSTALLATION_DIRS+= ${EGDIR} share/doc
INSTALLATION_DIRS+= share/bash-completion share/zsh/site-functions
+TEST_TARGET= check
+
.include "options.mk"
+post-patch:
+ ${CP} ${PKGDIR}/files/lldpd.conf ${WRKDIR}
+
post-install:
- ${MV} ${DESTDIR}${PREFIX}/etc/lldpd.d/README.conf \
- ${DESTDIR}${PREFIX}/${EGDIR}
+ ${INSTALL_DATA} ${WRKDIR}/lldpd.conf \
+ ${DESTDIR}${PREFIX}/${EGDIR}/lldpd.conf
BUILDLINK_API_DEPENDS.libevent+= libevent>=2.0.5
diff --git a/net/lldpd/PLIST b/net/lldpd/PLIST
index c640c7ba1ce..2eefd418999 100644
--- a/net/lldpd/PLIST
+++ b/net/lldpd/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.6 2018/08/08 14:10:16 prlw1 Exp $
+@comment $NetBSD: PLIST,v 1.7 2020/06/19 10:05:07 hauke Exp $
include/lldp-const.h
include/lldpctl.h
lib/liblldpctl.la
@@ -15,5 +15,6 @@ share/doc/lldpd/ChangeLog
share/doc/lldpd/LICENSE
share/doc/lldpd/NEWS
share/doc/lldpd/README.md
-share/examples/lldpd/README.conf
+share/examples/lldpd/lldpd.conf
share/zsh/site-functions/_lldpcli
+@pkgdir man/man5
diff --git a/net/lldpd/distinfo b/net/lldpd/distinfo
index 30087139415..ee94e5a8904 100644
--- a/net/lldpd/distinfo
+++ b/net/lldpd/distinfo
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.14 2020/06/18 19:40:32 hauke Exp $
+$NetBSD: distinfo,v 1.15 2020/06/19 10:05:07 hauke Exp $
SHA1 (lldpd-1.0.5.tar.gz) = ee911186120f482f5e9bbd80023bcf5b0a628161
RMD160 (lldpd-1.0.5.tar.gz) = 2e8a2982dbdd6e73c865d6cad3a0c821e2538369
SHA512 (lldpd-1.0.5.tar.gz) = ce6075b6e2f847c4854c117ffc81d6e9f852e857d2bf88151ea7b3d40fbebcf980f65d4a21f17332de7f27fc696ce3ada3c063b8fa7677d7b9eee3e4634e898e
Size (lldpd-1.0.5.tar.gz) = 1624872 bytes
+SHA1 (patch-src_daemon_lldpd.8.in) = 13f08e48123ae6a3edce43fa465823353955534e
diff --git a/net/lldpd/files/lldpd.conf b/net/lldpd/files/lldpd.conf
new file mode 100644
index 00000000000..0a0a885db9d
--- /dev/null
+++ b/net/lldpd/files/lldpd.conf
@@ -0,0 +1,10 @@
+# $NetBSD: lldpd.conf,v 1.1 2020/06/19 10:05:07 hauke Exp $
+#
+# lldpd(8) configuration file - see lldpcli(8) for more details.
+#
+# You can also create the @PKG_SYSCONFDIR@/lldpd.d directory, and put
+# configuration snippets (suffixed by .conf) into it.
+# Upon start, lldpd will read each file in this directory, and
+# execute the content as if it were passed as arguments to lldpcli(8).
+
+#configure system description 'my little server'
diff --git a/net/lldpd/files/lldpd.sh b/net/lldpd/files/lldpd.sh
index 33867f60419..8bfa3d41e8a 100644
--- a/net/lldpd/files/lldpd.sh
+++ b/net/lldpd/files/lldpd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: lldpd.sh,v 1.1 2013/05/09 01:39:43 mef Exp $
+# $NetBSD: lldpd.sh,v 1.2 2020/06/19 10:05:07 hauke Exp $
#
# PROVIDE: lldpd
@@ -12,7 +12,6 @@
name="lldpd"
rcvar="lldpd"
command="@PREFIX@/sbin/${name}"
-#required_files="@PKG_SYSCONFDIR@/lldpd.conf"
load_rc_config $name
run_rc_command "$1"
diff --git a/net/lldpd/patches/patch-src_daemon_lldpd.8.in b/net/lldpd/patches/patch-src_daemon_lldpd.8.in
new file mode 100644
index 00000000000..6c588af5cfe
--- /dev/null
+++ b/net/lldpd/patches/patch-src_daemon_lldpd.8.in
@@ -0,0 +1,22 @@
+$NetBSD: patch-src_daemon_lldpd.8.in,v 1.1 2020/06/19 10:05:07 hauke Exp $
+
+Have configure replace /etc/
+
+--- src/daemon/lldpd.8.in.orig 2019-09-29 11:32:19.000000000 +0000
++++ src/daemon/lldpd.8.in
+@@ -394,13 +394,13 @@ column tells that only one neighbor will
+ .It @LLDPD_CTL_SOCKET@
+ Unix-domain socket used for communication with
+ .Xr lldpctl 8 .
+-.It /etc/lldpd.conf
++.It @sysconfdir@/lldpd.conf
+ Configuration file for
+ .Nm .
+ Commands in this files are executed by
+ .Xr lldpcli 8
+ at start.
+-.It /etc/lldpd.d
++.It @sysconfdir@/lldpd.d
+ Directory containing configuration files whose commands are executed
+ by
+ .Xr lldpcli 8