make-net-tools-fhs-compliant.patch 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. diff --git a/Makefile b/Makefile
  2. index bf67bc6..c845922 100644
  3. --- a/Makefile
  4. +++ b/Makefile
  5. @@ -26,6 +26,7 @@
  6. # set the base of the Installation
  7. # BASEDIR = /mnt
  8. BASEDIR ?= $(DESTDIR)
  9. +PREFIX ?= /usr
  10. BINDIR ?= /bin
  11. SBINDIR ?= /sbin
  12. @@ -206,19 +207,15 @@ mii-tool: $(NET_LIB) mii-tool.o
  13. $(CC) $(CFLAGS) $(LDFLAGS) -o $@ mii-tool.o $(NLIB) $(LDLIBS)
  14. installbin:
  15. - @echo
  16. - @echo "######################################################"
  17. - @echo "Notice: ifconfig and route are now installed into /bin"
  18. - @echo "######################################################"
  19. - @echo
  20. install -m 0755 -d ${BASEDIR}${SBINDIR}
  21. install -m 0755 -d ${BASEDIR}${BINDIR}
  22. - install -m 0755 ifconfig ${BASEDIR}${BINDIR}
  23. + install -m 0755 -d ${BASEDIR}${PREFIX}${SBINDIR}
  24. + install -m 0755 ifconfig ${BASEDIR}${SBINDIR}
  25. install -m 0755 nameif ${BASEDIR}${SBINDIR}
  26. install -m 0755 netstat ${BASEDIR}${BINDIR}
  27. - install -m 0755 route ${BASEDIR}${BINDIR}
  28. + install -m 0755 route ${BASEDIR}${SBINDIR}
  29. ifeq ($(HAVE_ARP_TOOLS),1)
  30. - install -m 0755 arp ${BASEDIR}${SBINDIR}
  31. + install -m 0755 arp ${BASEDIR}${PREFIX}${SBINDIR}
  32. install -m 0755 rarp ${BASEDIR}${SBINDIR}
  33. endif
  34. ifeq ($(HAVE_HOSTNAME_TOOLS),1)
  35. @@ -248,9 +245,9 @@ ifeq ($(HAVE_SERIAL_TOOLS),1)
  36. endif
  37. savebin:
  38. - @for i in ${BASEDIR}${SBINDIR}/arp ${BASEDIR}${SBINDIR}/ifconfig \
  39. + @for i in ${BASEDIR}${PREFIX}${BINDIR}/arp ${BASEDIR}${SBINDIR}/ifconfig \
  40. ${BASEDIR}${BINDIR}/netstat \
  41. - ${BASEDIR}${SBINDIR}/rarp ${BASEDIR}${SBINDIR}/route \
  42. + ${BASEDIR}${SBINDIR}/rarp ${BASEDIR}${BINDIR}/route \
  43. ${BASEDIR}${BINDIR}/hostname ${BASEDIR}${BINDIR}/ypdomainname \
  44. ${BASEDIR}${BINDIR}/dnsdomainname ${BASEDIR}${BINDIR}/nisdomainname \
  45. ${BASEDIR}${BINDIR}/domainname ; do \