From f91d0bca7dc61aff49633036e080651919250933 Mon Sep 17 00:00:00 2001 From: Mateusz Piotrowski <0mp@FreeBSD.org> Date: Sat, 26 Oct 2019 20:52:47 +0000 Subject: Clean up - Use USES=localbase instead of setting CPPFLAGS and LDFLAGS manually. - Pet portlint, portfmt, and portclippy. - Regenerate patches with makepatch. - Define TEST_TARGET and disable failing tests. - Set USES=fakeroot to address some errors during installation. --- sysutils/powerman/Makefile | 20 ++++++++++++-------- sysutils/powerman/files/patch-man-powerman.conf.5 | 20 -------------------- sysutils/powerman/files/patch-man-powermand.8 | 11 ----------- sysutils/powerman/files/patch-man_powerman.conf.5.in | 20 ++++++++++++++++++++ sysutils/powerman/files/patch-man_powermand.8.in | 11 +++++++++++ 5 files changed, 43 insertions(+), 39 deletions(-) delete mode 100644 sysutils/powerman/files/patch-man-powerman.conf.5 delete mode 100644 sysutils/powerman/files/patch-man-powermand.8 create mode 100644 sysutils/powerman/files/patch-man_powerman.conf.5.in create mode 100644 sysutils/powerman/files/patch-man_powermand.8.in (limited to 'sysutils/powerman') diff --git a/sysutils/powerman/Makefile b/sysutils/powerman/Makefile index 9e91196bfdfc..dc56bef49a58 100644 --- a/sysutils/powerman/Makefile +++ b/sysutils/powerman/Makefile @@ -15,22 +15,26 @@ LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libcurl.so:ftp/curl -USES= libtool perl5 shebangfix -SHEBANG_FILES= heartbeat/powerman +USES= fakeroot libtool localbase:ldflags perl5 shebangfix +USE_LDCONFIG= yes USE_PERL5= build +USE_RC_SUBR= powerman +SHEBANG_FILES= heartbeat/powerman + GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-httppower --localstatedir=/var \ --with-pkgconfig-dir=${PREFIX}/libdata/pkgconfig -USE_LDCONFIG= yes -INSTALL_TARGET= install-strip -USE_RC_SUBR= powerman - -CPPFLAGS+= -I${LOCALBASE}/include -LDFLAGS+= -L${LOCALBASE}/lib +INSTALL_TARGET= install-strip +TEST_TARGET= check post-patch: @${REINPLACE_CMD} -e \ '/^install-data-am/s|:.*|:|' ${WRKSRC}/scripts/Makefile.in + # Disable failing tests. +.for test_case in t50 t53 t56 t57 t58 t59 + @${REINPLACE_CMD} -E -e 's/${test_case}(.conf)?//' \ + ${WRKSRC}/test/Makefile.in +.endfor .include diff --git a/sysutils/powerman/files/patch-man-powerman.conf.5 b/sysutils/powerman/files/patch-man-powerman.conf.5 deleted file mode 100644 index 2c757041ae10..000000000000 --- a/sysutils/powerman/files/patch-man-powerman.conf.5 +++ /dev/null @@ -1,20 +0,0 @@ ---- man/powerman.conf.5.in.orig 2009-02-13 18:31:28.000000000 +0100 -+++ man/powerman.conf.5.in 2009-02-13 18:34:28.000000000 +0100 -@@ -5,7 +5,7 @@ - - .SH DESCRIPTION - The powerman.conf file typically includes one or more of the remote power --controller (RPC) device files provided in the /etc/powerman directory; -+controller (RPC) device files provided in the @X_SYSCONFDIR@/powerman directory; - sets a few global options; - instantiates RPC devices with unique names, hostnames, and ports; - and maps node names to RPC's and plug numbers. -@@ -32,7 +32,7 @@ - Baytech RPC-3 remote power controllers. - .LP - .nf --include "/etc/powerman/baytech.dev" # include def for "baytech" RPC -+include "@X_SYSCONFDIR@/powerman/baytech.dev" # include def for "baytech" RPC - - tcpwrappers yes # enable TCP wrappers - diff --git a/sysutils/powerman/files/patch-man-powermand.8 b/sysutils/powerman/files/patch-man-powermand.8 deleted file mode 100644 index 80325388d2b8..000000000000 --- a/sysutils/powerman/files/patch-man-powermand.8 +++ /dev/null @@ -1,11 +0,0 @@ ---- man/powermand.8.in.orig 2009-02-13 18:33:44.000000000 +0100 -+++ man/powermand.8.in 2009-02-13 18:34:09.000000000 +0100 -@@ -12,7 +12,7 @@ - .TP - .I "-c, --conf filename" - Override the default location of the powerman configuration file --.I /etc/powerman/powerman.conf. -+.I @X_SYSCONFDIR@/powerman/powerman.conf. - .TP - .I "-f, --foreground" - Do not daemonize, and send debugging/error messages to stderr instead of syslog. diff --git a/sysutils/powerman/files/patch-man_powerman.conf.5.in b/sysutils/powerman/files/patch-man_powerman.conf.5.in new file mode 100644 index 000000000000..73427ef22a3b --- /dev/null +++ b/sysutils/powerman/files/patch-man_powerman.conf.5.in @@ -0,0 +1,20 @@ +--- man/powerman.conf.5.in.orig 2012-01-13 23:01:47 UTC ++++ man/powerman.conf.5.in +@@ -5,7 +5,7 @@ powerman.conf \- configuration file for PowerMan + + .SH DESCRIPTION + The powerman.conf file typically includes one or more of the remote power +-controller (RPC) device files provided in the /etc/powerman directory; ++controller (RPC) device files provided in the @X_SYSCONFDIR@/powerman directory; + sets a few global options; + instantiates RPC devices with unique names, hostnames, and ports; + and maps node names to RPC's and plug numbers. +@@ -32,7 +32,7 @@ The following example is a 16-node cluster that uses t + Baytech RPC-3 remote power controllers. + .LP + .nf +-include "/etc/powerman/baytech.dev" # include def for "baytech" RPC ++include "@X_SYSCONFDIR@/powerman/baytech.dev" # include def for "baytech" RPC + + tcpwrappers yes # enable TCP wrappers + diff --git a/sysutils/powerman/files/patch-man_powermand.8.in b/sysutils/powerman/files/patch-man_powermand.8.in new file mode 100644 index 000000000000..149a33736f8d --- /dev/null +++ b/sysutils/powerman/files/patch-man_powermand.8.in @@ -0,0 +1,11 @@ +--- man/powermand.8.in.orig 2012-01-13 23:01:52 UTC ++++ man/powermand.8.in +@@ -12,7 +12,7 @@ provides power management in a data center or compute + .TP + .I "-c, --conf filename" + Override the default location of the powerman configuration file +-.I /etc/powerman/powerman.conf. ++.I @X_SYSCONFDIR@/powerman/powerman.conf. + .TP + .I "-f, --foreground" + Do not daemonize, and send debugging/error messages to stderr instead of syslog. -- cgit v1.2.3