summaryrefslogtreecommitdiff
path: root/community/hping/Makefile.patch
blob: dd53dd0a6782f6d8b3b3c743ac2c735460c33fb9 (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
diff -Naur hping3-20051105/Makefile hping3-20051105-new/Makefile
--- hping3-20051105/Makefile	2005-11-05 05:31:41.000000000 -0500
+++ hping3-20051105-new/Makefile	2009-02-26 03:21:46.000000000 -0500
@@ -72,16 +72,18 @@
 	rm -rf hping3 *.o byteorder byteorder.h systype.h Makefile libars.a .depend
 
 install: hping3
-	cp -f hping3 /usr/sbin/
-	chmod 755 /usr/sbin/hping3
-	ln -s /usr/sbin/hping3 /usr/sbin/hping
-	ln -s /usr/sbin/hping3 /usr/sbin/hping2
-	@if [ -d ${INSTALL_MANPATH}/man8 ]; then \
-		cp ./docs/hping3.8 ${INSTALL_MANPATH}/man8; \
-		chmod 644 ${INSTALL_MANPATH}/man8/hping3.8; \
+	@[ ! -d ${DESTDIR}/usr/sbin ] && install -d ${DESTDIR}/usr/sbin
+	cp -f hping3 ${DESTDIR}/usr/sbin/
+	chmod 755 ${DESTDIR}/usr/sbin/hping3
+	ln -s /usr/sbin/hping3 ${DESTDIR}/usr/sbin/hping
+	ln -s /usr/sbin/hping3 ${DESTDIR}/usr/sbin/hping2
+	@[ ! -d ${DESTDIR}${INSTALL_MANPATH}/man8 ] && install -d ${DESTDIR}${INSTALL_MANPATH}/man8
+	@if [ -d ${DESTDIR}${INSTALL_MANPATH}/man8 ]; then \
+		cp ./docs/hping3.8 ${DESTDIR}${INSTALL_MANPATH}/man8; \
+		chmod 644 ${DESTDIR}${INSTALL_MANPATH}/man8/hping3.8; \
 	else \
 		echo "@@@@@@ WARNING @@@@@@"; \
-		echo "Can't install the man page: ${INSTALL_MANPATH}/man8 does not exist"; \
+		echo "Can't install the man page: ${DESTDIR}${INSTALL_MANPATH}/man8 does not exist"; \
 	fi
 
 strip: hping3