From d9df52872c6a9e2592bb5a91ec11d09e6fe4dd5d Mon Sep 17 00:00:00 2001 From: joerg Date: Mon, 15 Feb 2010 14:30:40 +0000 Subject: [PATCH] Fix unprivileged build. --- net/nfdump/distinfo | 3 ++- net/nfdump/patches/patch-ah | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 net/nfdump/patches/patch-ah diff --git a/net/nfdump/distinfo b/net/nfdump/distinfo index a72a75098f08..8547790606dc 100644 --- a/net/nfdump/distinfo +++ b/net/nfdump/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.4 2008/02/24 20:38:49 seb Exp $ +$NetBSD: distinfo,v 1.5 2010/02/15 14:30:40 joerg Exp $ SHA1 (nfdump-1.5.7.tar.gz) = 74965ba1b0bdb8e789ec8fb3d546d0520b2e9774 RMD160 (nfdump-1.5.7.tar.gz) = c0a3fb6f0692e891a1f98a2779ef19146dffced7 @@ -9,3 +9,4 @@ SHA1 (patch-ac) = bba19ce3e28b0d74d06ae694790e7aaeb73bfc6b SHA1 (patch-ae) = fad625c83fc7fad601252236d246286d04eff43d SHA1 (patch-af) = 06f045e735b689cd05c140c87753329cf6962d5c SHA1 (patch-ag) = 7ec59c455e51d6b8d5f2154b45bbb051f325bb7e +SHA1 (patch-ah) = 2ffff479256c127fdb9f677f3b6872a8dd7f84b8 diff --git a/net/nfdump/patches/patch-ah b/net/nfdump/patches/patch-ah new file mode 100644 index 000000000000..31727729bf6d --- /dev/null +++ b/net/nfdump/patches/patch-ah @@ -0,0 +1,34 @@ +$NetBSD: patch-ah,v 1.1 2010/02/15 14:30:41 joerg Exp $ + +--- Makefile.in.orig 2010-02-15 14:07:30.000000000 +0000 ++++ Makefile.in +@@ -47,8 +47,8 @@ YFLAGS = -d -v + LFLAGS = @LFLAGS@ + LDFLAGS = @LDFLAGS@ + prefix = @prefix@ +-PREFIX = $(DESTDIR)/$(prefix) +-MANDIR = $(DESTDIR)/@mandir@ ++PREFIX = $(prefix) ++MANDIR = @mandir@ + COMMON_OBJ = minilzo.o nffile.o nf_common.o util.o flist.o panonymizer.o rijndael.o @FTS_OBJ@ + FILTER_OBJ = grammar.o scanner.o nftree.o ipconv.o + NFDUMP_OBJ = nfdump.o $(COMMON_OBJ) $(FILTER_OBJ) nfstat.o nfprof.o +@@ -103,14 +103,12 @@ nfreader: $(NFRDR_OBJ) + $(CC) $(CFLAGS) -o $@ $(NFRDR_OBJ) $(LDFLAGS) + + install: $(OBJECTS) +- test -d $(PREFIX) || install -d -o root -g bin -m 755 $(PREFIX) +- test -d $(PREFIX)/bin || install -d -o root -g bin -m 755 $(PREFIX)/bin +- test -d $(MANDIR) || install -d -o root -g bin -m 755 $(MANDIR) +- test -d $(MANDIR)/man1 || install -d -o root -g bin -m 755 $(MANDIR)/man1 ++ test -d ${DESTDIR}$(PREFIX)/bin || ${BSD_INSTALL_PROGRAM_DIR} ${DESTDIR}$(PREFIX)/bin ++ test -d ${DESTDIR}$(MANDIR)/man1 || ${BSD_INSTALL_MAN_DIR} ${DESTDIR}$(MANDIR)/man1 + for file in $(OBJECTS); do \ + if [ -f $$file.1 ]; then \ +- $(INSTALL) -o root -g bin -m 755 $$file $(PREFIX)/bin ; \ +- $(INSTALL) -o root -g bin -m 644 $$file.1 $(MANDIR)/man1 ; \ ++ ${BSD_INSTALL_PROGRAM} $$file ${DESTDIR}$(PREFIX)/bin ; \ ++ ${BSD_INSTALL_MAN} $$file.1 ${DESTDIR}$(MANDIR)/man1 ; \ + fi \ + done; +