aboutsummaryrefslogtreecommitdiff
path: root/network/gophernicus/Makefile.patch
blob: 2de81cdc9e756c74ca7f0a9afd6f3bb237d2c0e0 (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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
diff -Naur gophernicus-2.5.orig/Makefile gophernicus-2.5/Makefile
--- gophernicus-2.5.orig/Makefile	2017-06-24 17:54:48.000000000 +0200
+++ gophernicus-2.5/Makefile	2017-08-05 11:37:14.145035221 +0200
@@ -17,10 +17,10 @@
 DOCS    = LICENSE README INSTALL TODO ChangeLog README.Gophermap gophertag
 
 INSTALL = PATH=$$PATH:/usr/sbin ./install-sh -o 0 -g 0
-DESTDIR = /usr
+DESTDIR =
 OSXDEST = /usr/local
-SBINDIR = $(DESTDIR)/sbin
-DOCDIR  = $(DESTDIR)/share/doc/$(PACKAGE)
+SBINDIR = $(DESTDIR)/usr/sbin
+DOCDIR  = $(DESTDIR)/usr/doc/$(PACKAGE)-$(VERSION)
 
 ROOT    = /var/gopher
 OSXROOT = /Library/GopherServer
@@ -62,7 +62,7 @@
 generic: $(BINARY)
 
 withwrap:
-	$(MAKE) EXTRA_CFLAGS="-DHAVE_LIBWRAP" EXTRA_LDFLAGS="-lwrap" $(BINARY)
+	$(MAKE) EXTRA_CFLAGS="-DHAVE_LIBWRAP" EXTRA_LDFLAGS="-lwrap -lnsl" $(BINARY)
 
 
 #
@@ -86,7 +86,7 @@
 $(NAME).c: $(NAME).h $(HEADERS)
 	
 $(BINARY): $(OBJECTS)
-	$(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) $(OBJECTS) -o $@
+	$(CC) $(LDFLAGS) $(OBJECTS) $(EXTRA_LDFLAGS) -o $@
 
 .c.o:
 	$(CC) -c $(CFLAGS) $(EXTRA_CFLAGS) -DVERSION="\"$(VERSION)\"" -DCODENAME="\"$(CODENAME)\"" -DDEFAULT_ROOT="\"$(ROOT)\"" $< -o $@
@@ -179,11 +179,10 @@
 	@echo
 
 install-root:
-	if [ ! -d "$(ROOT)" -o ! -f "$(ROOT)/$(MAP)" ]; then \
-		mkdir -p $(ROOT); \
-		$(INSTALL) -m 644 $(MAP) $(ROOT); \
-		ln -s $(DOCDIR) $(ROOT)/docs; \
-	fi
+	@echo
+	mkdir -p $(DESTDIR)/$(ROOT)
+	$(INSTALL) -m 644 $(MAP) $(DESTDIR)/$(ROOT)
+	ln -s /usr/doc/$(PACKAGE)-$(VERSION) $(DESTDIR)/$(ROOT)/docs
 	@echo
 
 install-inetd:
@@ -201,10 +200,8 @@
 	@echo
 
 install-xinetd:
-	if [ -d "$(XINETD)" -a ! -f "$(XINETD)/$(NAME)" ]; then \
-		sed -e "s/@HOSTNAME@/`hostname`/g" $(NAME).xinetd > $(XINETD)/$(NAME); \
-		[ -x /sbin/service ] && /sbin/service xinetd reload; \
-	fi
+	mkdir -p $(DESTDIR)/$(XINETD)
+	sed -e "s/@HOSTNAME@/`hostname`/g" $(NAME).xinetd > $(DESTDIR)/$(XINETD)/$(NAME).new
 	@echo
 
 install-osx: