Makefile 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. ETCDIR=/etc/rc.d
  2. EXTDIR=${DESTDIR}${ETCDIR}
  3. MODE=754
  4. DIRMODE=755
  5. CONFMODE=644
  6. all: install
  7. create-dirs:
  8. if test ! -d /${DESTDIR}; then install -d -m ${DIRMODE} ${EXTDIR}; fi
  9. install -d -m ${DIRMODE} ${EXTDIR}/rc0.d
  10. install -d -m ${DIRMODE} ${EXTDIR}/rc1.d
  11. install -d -m ${DIRMODE} ${EXTDIR}/rc2.d
  12. install -d -m ${DIRMODE} ${EXTDIR}/rc3.d
  13. install -d -m ${DIRMODE} ${EXTDIR}/rc4.d
  14. install -d -m ${DIRMODE} ${EXTDIR}/rc5.d
  15. install -d -m ${DIRMODE} ${EXTDIR}/rc6.d
  16. install -d -m ${DIRMODE} ${EXTDIR}/rcS.d
  17. install -d -m ${DIRMODE} ${EXTDIR}/init.d
  18. install -d -m ${DIRMODE} ${DESTDIR}/etc/default
  19. install -d -m ${DIRMODE} ${DESTDIR}/etc/network
  20. install -d -m ${DIRMODE} ${DESTDIR}/sbin
  21. install -d -m ${DIRMODE} ${DESTDIR}/lib/lsb
  22. install -d -m ${DIRMODE} ${DESTDIR}/lib/network-services
  23. if [ ${ETCDIR} != /etc ]; then ln -s ${ETCDIR}/init.d ${DESTDIR}/etc/init.d; fi
  24. install: create-dirs
  25. install -m ${MODE} etc/init.d/checkfs ${EXTDIR}/init.d/
  26. install -m ${MODE} etc/init.d/cleanfs ${EXTDIR}/init.d/
  27. install -m ${MODE} etc/init.d/halt ${EXTDIR}/init.d/
  28. install -m ${MODE} etc/init.d/console ${EXTDIR}/init.d/
  29. install -m ${MODE} etc/init.d/localnet ${EXTDIR}/init.d/
  30. install -m ${MODE} etc/init.d/modules ${EXTDIR}/init.d/
  31. install -m ${MODE} etc/init.d/mountfs ${EXTDIR}/init.d/
  32. install -m ${MODE} etc/init.d/mountvirtfs ${EXTDIR}/init.d/
  33. install -m ${MODE} etc/init.d/network ${EXTDIR}/init.d/
  34. install -m ${MODE} etc/init.d/rc ${EXTDIR}/init.d/
  35. install -m ${MODE} etc/init.d/reboot ${EXTDIR}/init.d/
  36. install -m ${MODE} etc/init.d/sendsignals ${EXTDIR}/init.d/
  37. install -m ${MODE} etc/init.d/setclock ${EXTDIR}/init.d/
  38. install -m ${MODE} etc/init.d/sysklogd ${EXTDIR}/init.d/
  39. install -m ${MODE} etc/init.d/swap ${EXTDIR}/init.d/
  40. install -m ${MODE} etc/init.d/sysctl ${EXTDIR}/init.d/
  41. install -m ${MODE} etc/init.d/template ${EXTDIR}/init.d/
  42. install -m ${MODE} etc/init.d/udev ${EXTDIR}/init.d/
  43. install -m ${MODE} etc/init.d/udev_retry ${EXTDIR}/init.d/
  44. install -m ${CONFMODE} lib/lsb/init-functions ${DESTDIR}/lib/lsb/
  45. if [ ! -f ${DESTDIR}/etc/default/createfiles ]; then install -m ${CONFMODE} etc/default/createfiles ${DESTDIR}/etc/default/; fi
  46. if [ ! -f ${DESTDIR}/etc/default/modules ]; then install -m ${CONFMODE} etc/default/modules ${DESTDIR}/etc/default/; fi
  47. if [ ! -f ${DESTDIR}/etc/default/rc ]; then install -m ${CONFMODE} etc/default/rc ${DESTDIR}/etc/default/; fi
  48. if [ ! -f ${DESTDIR}/etc/default/rc.site ]; then install -m ${CONFMODE} etc/default/rc.site ${DESTDIR}/etc/default/; fi
  49. install -m ${MODE} sbin/ifup ${DESTDIR}/sbin/
  50. install -m ${MODE} sbin/ifdown ${DESTDIR}/sbin/
  51. install -m ${MODE} lib/network-services/ipv4-static ${DESTDIR}/lib/network-services/
  52. install -m ${MODE} lib/network-services/ipv4-static-route ${DESTDIR}/lib/network-services/
  53. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/checkfs
  54. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/cleanfs
  55. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/halt
  56. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/console
  57. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/localnet
  58. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/modules
  59. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountfs
  60. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountvirtfs
  61. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/network
  62. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/reboot
  63. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/sendsignals
  64. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/sysklogd
  65. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/swap
  66. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/sysctl
  67. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev
  68. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev_retry
  69. sed 's@ETCDIR@${ETCDIR}@' -i ${DESTDIR}/etc/default/rc
  70. minimal: create-dirs
  71. install -m ${MODE} etc/init.d/checkfs ${EXTDIR}/init.d/
  72. install -m ${MODE} etc/init.d/cleanfs ${EXTDIR}/init.d/
  73. install -m ${MODE} etc/init.d/halt ${EXTDIR}/init.d/
  74. install -m ${MODE} etc/init.d/localnet ${EXTDIR}/init.d/
  75. install -m ${MODE} etc/init.d/mountfs ${EXTDIR}/init.d/
  76. install -m ${MODE} etc/init.d/mountvirtfs ${EXTDIR}/init.d/
  77. install -m ${MODE} etc/init.d/rc ${EXTDIR}/init.d/
  78. install -m ${MODE} etc/init.d/reboot ${EXTDIR}/init.d/
  79. install -m ${MODE} etc/init.d/sendsignals ${EXTDIR}/init.d/
  80. install -m ${MODE} etc/init.d/detclock ${EXTDIR}/init.d/
  81. install -m ${MODE} etc/init.d/swap ${EXTDIR}/init.d/
  82. install -m ${MODE} etc/init.d/udev ${EXTDIR}/init.d/
  83. install -m ${CONFMODE} lib/lsb/init-functions ${DESTDIR}/lib/lsb/
  84. if [ ! -f ${DESTDIR}/etc/default/rc ]; then install -m ${CONFMODE} default/rc ${DESTDIR}/etc/default/; fi
  85. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/checkfs
  86. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/cleanfs
  87. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/halt
  88. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/localnet
  89. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountfs
  90. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/mountvirtfs
  91. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/reboot
  92. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/sendsignals
  93. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/swap
  94. /usr/lib/lsb/install_initd ${EXTDIR}/init.d/udev
  95. .PHONY: all create-dirs install minimal