Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/net/lldpd PKG_SYSCONFDIR fixes.
details: https://anonhg.NetBSD.org/pkgsrc/rev/017df15ce993
branches: trunk
changeset: 434587:017df15ce993
user: hauke <hauke%pkgsrc.org@localhost>
date: Fri Jun 19 10:05:07 2020 +0000
description:
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:
net/lldpd/Makefile | 26 +++++++++++++++++---------
net/lldpd/PLIST | 5 +++--
net/lldpd/distinfo | 3 ++-
net/lldpd/files/lldpd.conf | 10 ++++++++++
net/lldpd/files/lldpd.sh | 3 +--
net/lldpd/patches/patch-src_daemon_lldpd.8.in | 22 ++++++++++++++++++++++
6 files changed, 55 insertions(+), 14 deletions(-)
diffs (153 lines):
diff -r 38146c90e36d -r 017df15ce993 net/lldpd/Makefile
--- a/net/lldpd/Makefile Fri Jun 19 09:52:22 2020 +0000
+++ b/net/lldpd/Makefile Fri Jun 19 10:05:07 2020 +0000
@@ -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 @@
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_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 -r 38146c90e36d -r 017df15ce993 net/lldpd/PLIST
--- a/net/lldpd/PLIST Fri Jun 19 09:52:22 2020 +0000
+++ b/net/lldpd/PLIST Fri Jun 19 10:05:07 2020 +0000
@@ -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/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 -r 38146c90e36d -r 017df15ce993 net/lldpd/distinfo
--- a/net/lldpd/distinfo Fri Jun 19 09:52:22 2020 +0000
+++ b/net/lldpd/distinfo Fri Jun 19 10:05:07 2020 +0000
@@ -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 -r 38146c90e36d -r 017df15ce993 net/lldpd/files/lldpd.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/lldpd/files/lldpd.conf Fri Jun 19 10:05:07 2020 +0000
@@ -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 -r 38146c90e36d -r 017df15ce993 net/lldpd/files/lldpd.sh
--- a/net/lldpd/files/lldpd.sh Fri Jun 19 09:52:22 2020 +0000
+++ b/net/lldpd/files/lldpd.sh Fri Jun 19 10:05:07 2020 +0000
@@ -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 -r 38146c90e36d -r 017df15ce993 net/lldpd/patches/patch-src_daemon_lldpd.8.in
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/net/lldpd/patches/patch-src_daemon_lldpd.8.in Fri Jun 19 10:05:07 2020 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index