Makefile 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. #
  2. # Copyright (C) 2007-2010 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:=4
  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=e2fsprogs
  15. include $(INCLUDE_DIR)/package.mk
  16. define Package/util-linux/Default
  17. SECTION:=utils
  18. CATEGORY:=Utilities
  19. URL:=http://www.kernel.org/pub/linux/utils/util-linux-ng/
  20. endef
  21. define Package/fdisk
  22. $(call Package/util-linux/Default)
  23. TITLE:=Partition table manipulation utility
  24. SUBMENU=disc
  25. endef
  26. define Package/fdisk/description
  27. This package contains a utility for managing disk partition tables.
  28. endef
  29. define Package/cfdisk
  30. $(call Package/util-linux/Default)
  31. SUBMENU:=disc
  32. TITLE:=Partition table manipulation utility
  33. DEPENDS:= +libncurses
  34. endef
  35. define Package/cfdisk/description
  36. This package contains a utility for managing disk partition tables.
  37. endef
  38. define Package/sfdisk
  39. $(call Package/util-linux/Default)
  40. TITLE:=Partition table manipulation utility (Command-line)
  41. SUBMENU=disc
  42. endef
  43. define Package/sfdisk/description
  44. This package contains a utility for managing disk partition tables using command-line only.
  45. endef
  46. define Package/losetup
  47. $(call Package/util-linux/Default)
  48. TITLE:=Loopback devices setup and control utility
  49. endef
  50. define Package/losetup/description
  51. This package contains a utility for managing loopback devices.
  52. endef
  53. define Package/mount-utils
  54. $(call Package/util-linux/Default)
  55. TITLE:=Devices mount/unmounting utilities
  56. DEPENDS+= +libblkid +libuuid
  57. endef
  58. define Package/mount-utils/description
  59. This package contains utilities to mount/unmount devices.
  60. endef
  61. define Package/swap-utils
  62. $(call Package/util-linux/Default)
  63. SUBMENU:=disc
  64. TITLE:=Swap space management utilities
  65. DEPENDS+= +libblkid +libuuid
  66. endef
  67. define Package/swap-utils/description
  68. This package contains a collection of tools for managing swap space:
  69. - mkswap
  70. - swapon
  71. - swapoff
  72. endef
  73. define Package/hwclock
  74. $(call Package/util-linux/Default)
  75. TITLE:=Utilities for managing the hardware clock
  76. endef
  77. define Package/hwclock/description
  78. This package contains a utility for managing the hardware clock.
  79. endef
  80. define Package/flock
  81. $(call Package/util-linux/Default)
  82. TITLE:=Manage file locks from shell scripts
  83. endef
  84. define Package/flock/description
  85. This package contains a utility for managing file locks from shell scripts.
  86. endef
  87. define Package/setterm
  88. $(call Package/util-linux/Default)
  89. TITLE:=Tool for setting terminal attributes
  90. SUBMENU:=terminal
  91. DEPENDS:= +libncurses
  92. endef
  93. define Package/setterm/description
  94. This package contains a utility for setting terminal attributes
  95. endef
  96. define Build/Compile
  97. $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
  98. $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup umount mount
  99. $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk sfdisk
  100. $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
  101. $(MAKE) -C $(PKG_BUILD_DIR)/sys-utils flock
  102. $(MAKE) -C $(PKG_BUILD_DIR)/misc-utils setterm
  103. endef
  104. define Package/fdisk/install
  105. $(INSTALL_DIR) $(1)/sbin
  106. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/sbin/
  107. endef
  108. define Package/cfdisk/install
  109. $(INSTALL_DIR) $(1)/sbin
  110. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/sbin/
  111. endef
  112. define Package/sfdisk/install
  113. $(INSTALL_DIR) $(1)/usr/sbin
  114. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/usr/sbin/
  115. endef
  116. define Package/losetup/install
  117. $(INSTALL_DIR) $(1)/sbin
  118. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/sbin/
  119. endef
  120. define Package/mount-utils/install
  121. $(INSTALL_DIR) $(1)/bin/
  122. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/{u,}mount $(1)/bin
  123. endef
  124. define Package/swap-utils/install
  125. $(INSTALL_DIR) $(1)/sbin
  126. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(PKG_BUILD_DIR)/mount/swapon $(1)/sbin/
  127. ln -sf swapon $(1)/sbin/swapoff
  128. endef
  129. define Package/hwclock/install
  130. $(INSTALL_DIR) $(1)/sbin
  131. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
  132. endef
  133. define Package/flock/install
  134. $(INSTALL_DIR) $(1)/usr/bin
  135. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
  136. endef
  137. define Package/setterm/install
  138. $(INSTALL_DIR) $(1)/usr/bin
  139. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/setterm $(1)/usr/bin/
  140. endef
  141. $(eval $(call BuildPackage,fdisk))
  142. $(eval $(call BuildPackage,cfdisk))
  143. $(eval $(call BuildPackage,sfdisk))
  144. $(eval $(call BuildPackage,losetup))
  145. $(eval $(call BuildPackage,mount-utils))
  146. $(eval $(call BuildPackage,swap-utils))
  147. $(eval $(call BuildPackage,hwclock))
  148. $(eval $(call BuildPackage,flock))
  149. $(eval $(call BuildPackage,setterm))