summaryrefslogtreecommitdiffstats
path: root/openwrt/package/vsftpd/patches/destdir.patch
blob: c4fb40f4e0084d9bd28d5d6495b0c245262fbbef (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
diff -ruN vsftpd-1.2.2-orig/Makefile vsftpd-1.2.2-3/Makefile
--- vsftpd-1.2.2-orig/Makefile	2003-09-15 13:41:58.000000000 +0200
+++ vsftpd-1.2.2-3/Makefile	2005-03-09 22:23:12.000000000 +0100
@@ -16,6 +16,8 @@
     tcpwrap.o ipv6parse.o access.o \
     sysutil.o sysdeputil.o
 
+DESTDIR =
+
 .c.o:
 	$(CC) -c $*.c $(CFLAGS) $(IFLAGS)
 
@@ -23,21 +25,20 @@
 	$(CC) -o vsftpd $(OBJS) $(LINK) $(LIBS)
 
 install:
-	if [ -x /usr/local/sbin ]; then \
-		$(INSTALL) -m 755 vsftpd /usr/local/sbin/vsftpd; \
-	else \
-		$(INSTALL) -m 755 vsftpd /usr/sbin/vsftpd; fi
-	if [ -x /usr/local/man ]; then \
-		$(INSTALL) -m 644 vsftpd.8 /usr/local/man/man8/vsftpd.8; \
-		$(INSTALL) -m 644 vsftpd.conf.5 /usr/local/man/man5/vsftpd.conf.5; \
-	elif [ -x /usr/share/man ]; then \
-		$(INSTALL) -m 644 vsftpd.8 /usr/share/man/man8/vsftpd.8; \
-		$(INSTALL) -m 644 vsftpd.conf.5 /usr/share/man/man5/vsftpd.conf.5; \
-	else \
-		$(INSTALL) -m 644 vsftpd.8 /usr/man/man8/vsftpd.8; \
-		$(INSTALL) -m 644 vsftpd.conf.5 /usr/man/man5/vsftpd.conf.5; fi
-	if [ -x /etc/xinetd.d ]; then \
-		$(INSTALL) -m 644 xinetd.d/vsftpd /etc/xinetd.d/vsftpd; fi
+	mkdir -p $(DESTDIR)/usr/sbin
+	$(INSTALL) -m 755 vsftpd $(DESTDIR)/usr/sbin/
+	mkdir -p $(DESTDIR)/usr/share/man/man8
+	$(INSTALL) -m 644 vsftpd.8 $(DESTDIR)/usr/share/man/man8/
+	mkdir -p $(DESTDIR)/usr/share/man/man5
+	$(INSTALL) -m 644 vsftpd.conf.5 $(DESTDIR)/usr/share/man/man5/
+	mkdir -p $(DESTDIR)/etc/xinetd.d
+	$(INSTALL) -m 644 xinetd.d/vsftpd $(DESTDIR)/etc/xinetd.d/
+
+uninstall:
+	rm -f $(DESTDIR)/usr/sbin/vsftpd
+	rm -f $(DESTDIR)/usr/share/man/man8/vsftpd.8
+	rm -f $(DESTDIR)/usr/share/man/man5/vsftpd.conf.5
+	rm -f $(DESTDIR)/etc/xinetd.d/vsftpd
 
 clean:
 	rm -f *.o *.swp vsftpd