Makefile 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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/swap-utils
  47. $(call Package/util-linux/Default)
  48. TITLE:=Swap space management utilities
  49. SUBMENU:=disc
  50. endef
  51. define Package/swap-utils/description
  52. This package contains a collection of tools for managing swap space:
  53. - mkswap
  54. - swapon
  55. - swapoff
  56. endef
  57. define Package/hwclock
  58. $(call Package/util-linux/Default)
  59. TITLE:=Utilities for managing the hardware clock
  60. endef
  61. define Package/hwclock/description
  62. This package contains a utility for managing the hardware clock.
  63. endef
  64. define Build/Compile
  65. $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
  66. $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup
  67. $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk
  68. $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
  69. endef
  70. define Package/fdisk/install
  71. $(INSTALL_DIR) $(1)/usr/sbin
  72. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/usr/sbin/
  73. endef
  74. define Package/cfdisk/install
  75. $(INSTALL_DIR) $(1)/usr/sbin
  76. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/usr/sbin/
  77. endef
  78. define Package/losetup/install
  79. $(INSTALL_DIR) $(1)/usr/sbin
  80. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/usr/sbin/
  81. endef
  82. define Package/swap-utils/install
  83. $(INSTALL_DIR) $(1)/usr/sbin
  84. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(1)/usr/sbin/
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/swapon $(1)/usr/sbin/
  86. ln -sf swapon $(1)/usr/sbin/swapoff
  87. endef
  88. define Package/hwclock/install
  89. $(INSTALL_DIR) $(1)/usr/sbin
  90. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/usr/sbin/
  91. endef
  92. $(eval $(call BuildPackage,fdisk))
  93. $(eval $(call BuildPackage,cfdisk))
  94. $(eval $(call BuildPackage,losetup))
  95. $(eval $(call BuildPackage,swap-utils))
  96. $(eval $(call BuildPackage,hwclock))