minor tweaks (no package change): use ${SUBST_CMD} instead of perl -pi -e,

and strip DOS line-endings to make for more-easily-emailable patches
This commit is contained in:
sthen 2013-05-07 20:17:43 +00:00
parent b9a4bbce09
commit d7f68188e4
3 changed files with 9 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.15 2013/05/07 20:14:45 rpe Exp $
# $OpenBSD: Makefile,v 1.16 2013/05/07 20:17:43 sthen Exp $
COMMENT-main= nagios service check acceptor
COMMENT-client= nagios service check acceptor - client
@ -31,9 +31,11 @@ TEST_DEPENDS= devel/p5-Clone \
devel/p5-Parallel-Forker
RUN_DEPENDS-main= net/nagios/nagios
post-extract:
@cd ${WRKSRC} && perl -i -pe 's/\r$$//' src/nsca.c src/send_nsca.c
pre-build:
@perl -pi -e "s,%%SYSCONFDIR%%,${SYSCONFDIR}," ${WRKSRC}/src/nsca.c \
${WRKSRC}/src/send_nsca.c
@${SUBST_CMD} ${WRKSRC}/src/nsca.c ${WRKSRC}/src/send_nsca.c
do-test:
@cd ${WRKSRC}/nsca_tests && ./runtests

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_nsca_c,v 1.5 2013/05/07 20:14:45 rpe Exp $
$OpenBSD: patch-src_nsca_c,v 1.6 2013/05/07 20:17:43 sthen Exp $
--- src/nsca.c.orig Sat May 4 17:40:24 2013
+++ src/nsca.c Sat May 4 17:40:41 2013
@@ -28,7 +28,7 @@ static char server_address[16]="0.0.0.0";
@ -6,7 +6,7 @@ $OpenBSD: patch-src_nsca_c,v 1.5 2013/05/07 20:14:45 rpe Exp $
static int log_facility=LOG_DAEMON;
-static char config_file[MAX_INPUT_BUFFER]="nsca.cfg";
+static char config_file[MAX_INPUT_BUFFER]="%%SYSCONFDIR%%/nsca.cfg";
+static char config_file[MAX_INPUT_BUFFER]="${SYSCONFDIR}/nsca.cfg";
static char alternate_dump_file[MAX_INPUT_BUFFER]="/dev/null";
static char command_file[MAX_INPUT_BUFFER]="";
static char password[MAX_INPUT_BUFFER]="";

View File

@ -1,4 +1,4 @@
$OpenBSD: patch-src_send_nsca_c,v 1.3 2013/05/07 20:14:45 rpe Exp $
$OpenBSD: patch-src_send_nsca_c,v 1.4 2013/05/07 20:17:43 sthen Exp $
--- src/send_nsca.c.orig Sat May 4 17:20:12 2013
+++ src/send_nsca.c Sat May 4 17:20:43 2013
@@ -25,7 +25,7 @@ time_t start_time,end_time;
@ -6,7 +6,7 @@ $OpenBSD: patch-src_send_nsca_c,v 1.3 2013/05/07 20:14:45 rpe Exp $
char server_name[MAX_HOST_ADDRESS_LENGTH];
char password[MAX_INPUT_BUFFER]="";
-char config_file[MAX_INPUT_BUFFER]="send_nsca.cfg";
+char config_file[MAX_INPUT_BUFFER]="%%SYSCONFDIR%%/send_nsca.cfg";
+char config_file[MAX_INPUT_BUFFER]="${SYSCONFDIR}/send_nsca.cfg";
char delimiter[2]="\t";
char block_delimiter[2]=BLOCK_DELIMITER;