Makefile 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. #
  2. # Copyright (C) 2007 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=util-linux-ng
  9. PKG_VERSION:=2.13.0.1
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.13
  13. PKG_MD5SUM:=c841dc8743905c8f0db20c9db5094f57
  14. PKG_BUILD_DEPENDS=libblkid libuuid
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/util-linux/Default
  17. SECTION:=utils
  18. CATEGORY:=Utilities
  19. DEPENDS:=@!TARGET_etrax
  20. URL:=http://www.kernel.org/pub/linux/utils/util-linux-ng/
  21. endef
  22. define Package/fdisk
  23. $(call Package/util-linux/Default)
  24. TITLE:=Partition table manipulation utility
  25. SUBMENU=disc
  26. endef
  27. define Package/fdisk/description
  28. This package contains a utility for managing disk partition tables.
  29. endef
  30. define Package/cfdisk
  31. $(call Package/util-linux/Default)
  32. TITLE:=Partition table manipulation utility
  33. DEPENDS:= +libncurses
  34. SUBMENU:=disc
  35. endef
  36. define Package/cfdisk/description
  37. This package contains a utility for managing disk partition tables.
  38. endef
  39. define Package/losetup
  40. $(call Package/util-linux/Default)
  41. TITLE:=Loopback devices setup and control utility
  42. endef
  43. define Package/losetup/description
  44. This package contains a utility for managing loopback devices.
  45. endef
  46. define Package/mount-utils
  47. $(call Package/util-linux/Default)
  48. TITLE:=Devices mount/unmounting utilities
  49. endef
  50. define Package/mount-utils/description
  51. This package contains utilities to mount/unmount devices.
  52. endef
  53. define Package/swap-utils
  54. $(call Package/util-linux/Default)
  55. TITLE:=Swap space management utilities
  56. SUBMENU:=disc
  57. endef
  58. define Package/swap-utils/description
  59. This package contains a collection of tools for managing swap space:
  60. - mkswap
  61. - swapon
  62. - swapoff
  63. endef
  64. define Package/hwclock
  65. $(call Package/util-linux/Default)
  66. TITLE:=Utilities for managing the hardware clock
  67. endef
  68. define Package/hwclock/description
  69. This package contains a utility for managing the hardware clock.
  70. endef
  71. define Build/Compile
  72. $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
  73. $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup umount mount
  74. $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk
  75. $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
  76. endef
  77. define Package/fdisk/install
  78. $(INSTALL_DIR) $(1)/usr/sbin
  79. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/usr/sbin/
  80. endef
  81. define Package/cfdisk/install
  82. $(INSTALL_DIR) $(1)/usr/sbin
  83. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/usr/sbin/
  84. endef
  85. define Package/losetup/install
  86. $(INSTALL_DIR) $(1)/usr/sbin
  87. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/usr/sbin/
  88. endef
  89. define Package/mount-utils/install
  90. $(INSTALL_DIR) $(1)/usr/sbin/
  91. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/{u,}mount $(1)/usr/sbin
  92. endef
  93. define Package/swap-utils/install
  94. $(INSTALL_DIR) $(1)/usr/sbin
  95. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(1)/usr/sbin/
  96. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/swapon $(1)/usr/sbin/
  97. ln -sf swapon $(1)/usr/sbin/swapoff
  98. endef
  99. define Package/hwclock/install
  100. $(INSTALL_DIR) $(1)/usr/sbin
  101. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/usr/sbin/
  102. endef
  103. $(eval $(call BuildPackage,fdisk))
  104. $(eval $(call BuildPackage,cfdisk))
  105. $(eval $(call BuildPackage,losetup))
  106. $(eval $(call BuildPackage,mount-utils))
  107. $(eval $(call BuildPackage,swap-utils))
  108. $(eval $(call BuildPackage,hwclock))