aboutsummaryrefslogtreecommitdiffstats
path: root/net/linuxigd/files/patch-Makefile
blob: 8a60d51b9b7d2e37829acdb61bd0bb7d5480b365 (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
--- Makefile.orig   2006-05-24 06:16:36.000000000 +0800
+++ Makefile    2014-06-09 23:38:21.146264899 +0800
@@ -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= -lpthread -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,11 @@ clean:
    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 $(DESTDIR)$(PREFIX)/etc/linuxigd
+   $(BSD_INSTALL_DATA) etc/gatedesc.xml $(DESTDIR)$(PREFIX)/etc/linuxigd
+   $(BSD_INSTALL_DATA) etc/gateconnSCPD.xml $(DESTDIR)$(PREFIX)/etc/linuxigd
+   $(BSD_INSTALL_DATA) etc/gateicfgSCPD.xml $(DESTDIR)$(PREFIX)/etc/linuxigd
+   $(BSD_INSTALL_DATA) etc/dummy.xml $(DESTDIR)$(PREFIX)/etc/linuxigd
+   $(BSD_INSTALL_PROGRAM) upnpd $(DESTDIR)$(PREFIX)/sbin
+   $(BSD_INSTALL_DATA) upnpd.8 $(DESTDIR)$(PREFIX)/man/man8
+   $(BSD_INSTALL_DATA) etc/upnpd.conf $(DESTDIR)$(PREFIX)/etc/upnpd.conf.sample