diff --git a/sysutils/mgeupsd/Makefile b/sysutils/mgeupsd/Makefile index aafe9bab7b18..f83df43b6af3 100644 --- a/sysutils/mgeupsd/Makefile +++ b/sysutils/mgeupsd/Makefile @@ -1,26 +1,29 @@ # Created by: Andreas Dobloug PORTNAME= mgeupsd PORTVERSION= 0.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= SUNSITE/system/ups MAINTAINER= ports@FreeBSD.org COMMENT= Monitor a state of MGE Pulsar UPS connected to RS-232 port +DEPRECATED= Last release is 23 years old. It is not clear what devices are supported. +EXPIRATION_DATE= 2022-07-25 + USES= gmake WRKSRC= ${WRKDIR}/MGE PLIST_FILES= man/man8/${PORTNAME}.8.gz sbin/mgeupsd sbin/powerhandler etc/rc.d/mgeupsd.sh SUB_FILES= pkg-message post-patch: @${REINPLACE_CMD} -e '/^CC=/s:gcc:${CC}:' \ -e '/^CFLAGS=/s:-Wall -O2:${CFLAGS}:' ${WRKSRC}/Makefile post-install: ${INSTALL_SCRIPT} ${FILESDIR}/mgeupsd.sh ${STAGEDIR}${PREFIX}/etc/rc.d ${INSTALL_SCRIPT} ${FILESDIR}/powerhandler ${STAGEDIR}${PREFIX}/sbin .include diff --git a/sysutils/mgeupsd/files/patch-Makefile b/sysutils/mgeupsd/files/patch-Makefile index bddb25818bca..df3a7df9f56c 100644 --- a/sysutils/mgeupsd/files/patch-Makefile +++ b/sysutils/mgeupsd/files/patch-Makefile @@ -1,13 +1,21 @@ ---- Makefile.orig 1998-12-25 17:10:57.000000000 +0800 -+++ Makefile 2013-11-15 23:04:20.000000000 +0800 +--- Makefile.orig 1998-12-25 09:10:57 UTC ++++ Makefile +@@ -1,5 +1,5 @@ +-CC=gcc +-CFLAGS=-Wall -O2 ++CC=cc ++CFLAGS=-O2 -pipe -fstack-protector-strong -fno-strict-aliasing + LDFLAGS=-s + + all: mgeupsd @@ -8,8 +8,8 @@ mgeupsd: mgeupsd.o $(CC) $(LDFLAGS) -o $@ $< install: mgeupsd - install mgeupsd /sbin - install mgeupsd.8 /usr/man/man8 + install -c mgeupsd $(DESTDIR)${PREFIX}/sbin + install -c mgeupsd.8 $(DESTDIR)${PREFIX}/man/man8 clean: rm -f *.o mgeupsd diff --git a/sysutils/mgeupsd/files/patch-mgeupsd.c b/sysutils/mgeupsd/files/patch-mgeupsd.c index 1b73dbd127bd..e23d4c77bdfc 100644 --- a/sysutils/mgeupsd/files/patch-mgeupsd.c +++ b/sysutils/mgeupsd/files/patch-mgeupsd.c @@ -1,47 +1,47 @@ ---- mgeupsd.c.old Sat Dec 26 02:42:52 1998 -+++ mgeupsd.c Sat Mar 17 23:59:09 2001 -@@ -33,9 +33,9 @@ +--- mgeupsd.c.orig 1998-12-26 10:42:52 UTC ++++ mgeupsd.c +@@ -33,9 +33,9 @@ int RTS = TIOCM_RTS, use_syslog = 0; #define BS_TDP 12 /* status file for init */ -#define PWRFILE "/etc/powerstatus" +#define PWRFILE "/var/run/powerstatus" /* Linux usual */ -#define LOCKDIR "/var/lock" +#define LOCKDIR "/var/run" #define RUNDIR "/var/run" char lockfile[40] = {0,}; char pidfile[40] = {0,}; -@@ -640,7 +640,7 @@ +@@ -640,7 +640,7 @@ operate: else { #ifndef TEST - if (kill (init_pid, SIGPWR)) + if (kill (init_pid, SIGUSR2)) syslog (LOG_CRIT, "Process %u doesn not exist! Can't send SIGPWR", init_pid); #endif } -@@ -677,7 +677,7 @@ +@@ -677,7 +677,7 @@ operate: else { #ifndef TEST - if (kill (init_pid, SIGPWR)) + if (kill (init_pid, SIGINT)) syslog (LOG_CRIT, "Process %u doesn not exist! Can't send SIGPWR", init_pid); #endif } -@@ -711,7 +711,7 @@ +@@ -711,7 +711,7 @@ operate: else { #ifndef TEST - if (kill (init_pid, SIGPWR)) + if (kill (init_pid, SIGHUP)) syslog (LOG_CRIT, "Process %u doesn not exist! Can't send SIGPWR", init_pid); #endif } -@@ -758,4 +758,5 @@ +@@ -758,4 +758,5 @@ operate: } } /* while(1) */ } + return 0; }