summaryrefslogtreecommitdiff
path: root/net/miniupnpd/patches/patch-ab
blob: bf12ae94a8222f366c99bef0af928335edad2bd6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-ab,v 1.2 2009/01/06 23:39:53 jmcneill Exp $

--- Makefile.orig	2008-10-09 08:50:46.000000000 -0400
+++ Makefile	2009-01-06 18:32:05.000000000 -0500
@@ -5,7 +5,7 @@
 # This Makefile should work for *BSD and SunOS/Solaris
 # Linux users, please use Makefile.linux
 #CFLAGS = -Wall -Os
-CFLAGS = -Wall -O -g -DDEBUG
+CFLAGS = -Wall -O -g -DDEBUG $(PKG_CFLAGS)
 CC = gcc
 RM = rm -f
 MV = mv
@@ -83,8 +83,8 @@ LIBS += -lsocket -lnsl -lkstat -lresolv
 
 # set PREFIX variable to install in the wanted place
 
-INSTALLBINDIR = $(PREFIX)/sbin
-INSTALLETCDIR = $(PREFIX)/etc
+INSTALLBINDIR = $(DESTDIR)$(PREFIX)/sbin
+INSTALLETCDIR = $(DESTDIR)$(PREFIX)/share/examples/miniupnpd
 
 all:	$(EXECUTABLES)
 
@@ -97,8 +97,10 @@ clean:
 
 install:	miniupnpd genuuid
 	strip miniupnpd
-	$(INSTALL) -m 555 miniupnpd $(INSTALLBINDIR)
-	$(INSTALL) miniupnpd.conf $(INSTALLETCDIR)
+	$(BSD_INSTALL_PROGRAM_DIR) $(INSTALLBINDIR)
+	$(BSD_INSTALL_DATA_DIR) $(INSTALLETCDIR)
+	$(BSD_INSTALL_PROGRAM) miniupnpd $(INSTALLBINDIR)
+	$(BSD_INSTALL) -m 644 miniupnpd.conf $(INSTALLETCDIR)
 
 # genuuid is using the uuid cli tool available under OpenBSD 4.0 in
 # the uuid-1.5.0 package