aboutsummaryrefslogtreecommitdiff
path: root/net/linuxigd/files/patch-Makefile
blob: 9f0c9410b85b2db3eff9adc72ed5f4517336b140 (plain) (blame)
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
--- Makefile.orig	Sun Jun 17 00:17:05 2007
+++ Makefile	Sun Jun 17 00:18:25 2007
@@ -1,25 +1,11 @@
-PREFIX=/usr
-LIBUPNP_PREFIX=/usr
-#LIBIPTC_PREFIX=/usr
+LIBUPNP_PREFIX=$(LOCALBASE)
 
-CC=gcc
 INCLUDES= -I$(LIBUPNP_PREFIX)/include -I../include
-LIBS= -lpthread -lupnp -lixml -lthreadutil -L$(LIBUPNP_PREFIX)/lib -L../libs
+LIBS= $(PTHREAD_LIBS) -lupnp -lixml -lthreadutil -L$(LIBUPNP_PREFIX)/lib -L../libs
 FILES= main.o gatedevice.o pmlist.o util.o config.o
 
 CFLAGS += -Wall -g -O2
 
-ifdef HAVE_LIBIPTC
-ifdef LIBIPTC_PREFIX
-LIBS += -L$(LIBIPTC_PREFIX)/lib
-INCLUDES += -I$(LIBIPTC_PREFIX)/include
-endif
-
-LIBS += -liptc
-INCLUDES += -DHAVE_LIBIPTC
-FILES += iptc.o
-endif
-
 all: upnpd
 
 upnpd: $(FILES)
@@ -33,11 +19,12 @@
 	rm -f *.o upnpd
 
 install: upnpd
-	install -d /etc/linuxigd
-	install etc/gatedesc.xml /etc/linuxigd
-	install etc/gateconnSCPD.xml  /etc/linuxigd
-	install etc/gateicfgSCPD.xml /etc/linuxigd
-	install etc/dummy.xml /etc/linuxigd
-	install upnpd $(PREFIX)/sbin
-	install upnpd.8 $(PREFIX)/share/man/man8
-	if [ ! -f /etc/upnpd.conf ]; then install etc/upnpd.conf /etc; fi
+	install -d $(PREFIX)/etc/linuxigd
+	$(BSD_INSTALL_DATA) etc/gatedesc.xml $(PREFIX)/etc/linuxigd
+	$(BSD_INSTALL_DATA) etc/gateconnSCPD.xml $(PREFIX)/etc/linuxigd
+	$(BSD_INSTALL_DATA) etc/gateicfgSCPD.xml $(PREFIX)/etc/linuxigd
+	$(BSD_INSTALL_DATA) etc/dummy.xml $(PREFIX)/etc/linuxigd
+	$(BSD_INSTALL_PROGRAM) upnpd $(PREFIX)/sbin
+	$(BSD_INSTALL_DATA) upnpd.8 $(PREFIX)/man/man8
+	$(BSD_INSTALL_DATA) etc/upnpd.conf $(PREFIX)/etc/upnpd.conf.sample
+	if [ ! -f $(PREFIX)/etc/upnpd.conf ]; then $(BSD_INSTALL_DATA) $(PREFIX)/etc/upnpd.conf.sample $(PREFIX)/etc/upnpd.conf; fi