From 01371f4f49e2c47670966dbbca9500f28aaed6cd Mon Sep 17 00:00:00 2001 From: tobik Date: Sun, 11 Mar 2018 19:33:00 +0000 Subject: [PATCH] misc/owrep: Update to 1.2 - Make PREFIX-safe PR: 223801, 226535 Submitted by: bob@eager.cx (maintainer) --- misc/owrep/Makefile | 14 ++++++++++++-- misc/owrep/distinfo | 6 +++--- misc/owrep/files/patch-Makefile | 31 +++++++++++++------------------ misc/owrep/pkg-descr | 2 +- misc/owrep/pkg-plist | 2 +- 5 files changed, 30 insertions(+), 25 deletions(-) diff --git a/misc/owrep/Makefile b/misc/owrep/Makefile index 23044aea3bc0..08c10bf51426 100644 --- a/misc/owrep/Makefile +++ b/misc/owrep/Makefile @@ -1,13 +1,13 @@ # $FreeBSD$ PORTNAME= owrep -DISTVERSION= 1.1 +DISTVERSION= 1.2 CATEGORIES= misc MASTER_SITES= http://www.ml1.org.uk/distfiles/ \ http://www.ancientgeek.org.uk/distfiles/ MAINTAINER= bob@eager.cx -COMMENT= Weather reporting program based on openweathermap.org +COMMENT= Weather reporting program using openweathermap.org LICENSE= BSD3CLAUSE @@ -15,4 +15,14 @@ LIB_DEPENDS= libexpat.so:textproc/expat2 USES= localbase:ldflags zip +post-patch: + @${REINPLACE_CMD} 's|/usr/local|${PREFIX}|' \ + ${WRKSRC}/owrep.c ${WRKSRC}/owrep.1 + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/owrep ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/owrep.1 ${STAGEDIR}${PREFIX}/man/man1 + ${INSTALL_MAN} ${WRKSRC}/owrep.conf.5 ${STAGEDIR}${PREFIX}/man/man5 + ${INSTALL_DATA} ${WRKSRC}/owrep.conf.sample ${STAGEDIR}${PREFIX}/etc + .include diff --git a/misc/owrep/distinfo b/misc/owrep/distinfo index 4f9660503591..2c78d90aea91 100644 --- a/misc/owrep/distinfo +++ b/misc/owrep/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1508972794 -SHA256 (owrep-1.1.zip) = 53e3ac6951b59619d817230cbf5f514961911ad625bfec4922094189963dfc0a -SIZE (owrep-1.1.zip) = 21700 +TIMESTAMP = 1520377345 +SHA256 (owrep-1.2.zip) = bd4b91cb7699c24dd2f58416b0973395eed2c701678dca24bb523e14003cee5e +SIZE (owrep-1.2.zip) = 21747 diff --git a/misc/owrep/files/patch-Makefile b/misc/owrep/files/patch-Makefile index e2c27b749347..a06046d37508 100644 --- a/misc/owrep/files/patch-Makefile +++ b/misc/owrep/files/patch-Makefile @@ -1,6 +1,6 @@ ---- Makefile.orig 2017-05-30 23:54:30 UTC +--- Makefile.orig 2018-03-04 22:14:18 UTC +++ Makefile -@@ -5,10 +5,10 @@ +@@ -5,11 +5,6 @@ # CC?= clang # @@ -8,14 +8,11 @@ -INSTALL_MAN1= /usr/local/man/man1 -INSTALL_MAN5= /usr/local/man/man5 -INSTALL_ETC= /usr/local/etc -+INSTALL_TO = $(DESTDIR)/$(PREFIX)/bin -+INSTALL_MAN1= $(DESTDIR)/$(PREFIX)/man/man1 -+INSTALL_MAN5= $(DESTDIR)/$(PREFIX)/man/man5 -+INSTALL_ETC= $(DESTDIR)/$(PREFIX)/etc - # +-# PRODUCT = owrep # -@@ -38,7 +38,7 @@ CFLAGS+= -O2 $(COMFLAGS) -I /usr/local/i + SRC = owrep.c config.c extract.c lookup.c massage.c netio.c output.c +@@ -38,20 +33,11 @@ CFLAGS+= -O2 $(COMFLAGS) -I /usr/local/i all: $(PRODUCT) # $(PRODUCT): $(OBJ) @@ -24,18 +21,16 @@ # depend: mkdep $(CFLAGS) $(SRC) -@@ -46,10 +46,10 @@ depend: - install: $(PRODUCT) - gzip -f -k $(MAN1) - gzip -f -k $(MAN5) + # +-install: $(PRODUCT) +- gzip -f -k $(MAN1) +- gzip -f -k $(MAN5) - install -s -g wheel -o root $(PRODUCT) $(INSTALL_TO) - install -g wheel -o root $(MAN1).gz $(INSTALL_MAN1) - install -g wheel -o root $(MAN5).gz $(INSTALL_MAN5) - install -g wheel -o root $(CONF) $(INSTALL_ETC) -+ install -s $(PRODUCT) $(INSTALL_TO) -+ install $(MAN1).gz $(INSTALL_MAN1) -+ install $(MAN5).gz $(INSTALL_MAN5) -+ install $(CONF) $(INSTALL_ETC) - rm -f $(MAN1).gz $(MAN5).gz - # +- rm -f $(MAN1).gz $(MAN5).gz +-# distfile: + @mkdir -p $(DISTNAME) + @cp -a $(SRC) $(HDR) $(DISTNAME) diff --git a/misc/owrep/pkg-descr b/misc/owrep/pkg-descr index 9ce862cb9bf7..970500b63e41 100644 --- a/misc/owrep/pkg-descr +++ b/misc/owrep/pkg-descr @@ -1,4 +1,4 @@ This is a basic weather reporting program. It uses data from openweathermap.org, and uses a worldwide database. -WWW: http://www.tavi.co.uk +WWW: http://www.bobeager.uk/software.html diff --git a/misc/owrep/pkg-plist b/misc/owrep/pkg-plist index aed172378732..82425ad10b42 100644 --- a/misc/owrep/pkg-plist +++ b/misc/owrep/pkg-plist @@ -1,4 +1,4 @@ bin/owrep -%%ETCDIR%%.conf.sample +@sample etc/owrep.conf.sample man/man1/owrep.1.gz man/man5/owrep.conf.5.gz