Makefile 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  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 libncurses
  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 Package/script
  97. $(call Package/util-linux/Default)
  98. TITLE:=Make typescript of terminal session
  99. SUBMENU=Terminal
  100. endef
  101. define Package/script/description
  102. Script makes a typescript of everything printed on your terminal.
  103. http://linux.die.net/man/1/script
  104. endef
  105. define Build/Compile
  106. $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
  107. $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup umount mount
  108. $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk sfdisk
  109. $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
  110. $(MAKE) -C $(PKG_BUILD_DIR)/sys-utils flock
  111. $(MAKE) -C $(PKG_BUILD_DIR)/misc-utils setterm
  112. $(MAKE) -C $(PKG_BUILD_DIR)/misc-utils script
  113. endef
  114. define Package/fdisk/install
  115. $(INSTALL_DIR) $(1)/sbin
  116. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/sbin/
  117. endef
  118. define Package/cfdisk/install
  119. $(INSTALL_DIR) $(1)/sbin
  120. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/sbin/
  121. endef
  122. define Package/sfdisk/install
  123. $(INSTALL_DIR) $(1)/usr/sbin
  124. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/usr/sbin/
  125. endef
  126. define Package/losetup/install
  127. $(INSTALL_DIR) $(1)/sbin
  128. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/sbin/
  129. endef
  130. define Package/mount-utils/install
  131. $(INSTALL_DIR) $(1)/bin/
  132. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/{u,}mount $(1)/bin
  133. endef
  134. define Package/swap-utils/install
  135. $(INSTALL_DIR) $(1)/sbin
  136. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(PKG_BUILD_DIR)/mount/swapon $(1)/sbin/
  137. ln -sf swapon $(1)/sbin/swapoff
  138. endef
  139. define Package/hwclock/install
  140. $(INSTALL_DIR) $(1)/sbin
  141. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
  142. endef
  143. define Package/flock/install
  144. $(INSTALL_DIR) $(1)/usr/bin
  145. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
  146. endef
  147. define Package/setterm/install
  148. $(INSTALL_DIR) $(1)/usr/bin
  149. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/setterm $(1)/usr/bin/
  150. endef
  151. define Package/script/install
  152. $(INSTALL_DIR) $(1)/usr/bin
  153. $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/script $(1)/usr/bin/
  154. endef
  155. $(eval $(call BuildPackage,fdisk))
  156. $(eval $(call BuildPackage,cfdisk))
  157. $(eval $(call BuildPackage,sfdisk))
  158. $(eval $(call BuildPackage,losetup))
  159. $(eval $(call BuildPackage,mount-utils))
  160. $(eval $(call BuildPackage,swap-utils))
  161. $(eval $(call BuildPackage,hwclock))
  162. $(eval $(call BuildPackage,flock))
  163. $(eval $(call BuildPackage,setterm))
  164. $(eval $(call BuildPackage,script))