Makefile 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. #
  2. # Copyright (C) 2007-2009 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:=3
  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 Build/Compile
  88. $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
  89. $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup umount mount
  90. $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk sfdisk
  91. $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
  92. $(MAKE) -C $(PKG_BUILD_DIR)/sys-utils flock
  93. endef
  94. define Package/fdisk/install
  95. $(INSTALL_DIR) $(1)/sbin
  96. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/sbin/
  97. endef
  98. define Package/cfdisk/install
  99. $(INSTALL_DIR) $(1)/sbin
  100. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/sbin/
  101. endef
  102. define Package/sfdisk/install
  103. $(INSTALL_DIR) $(1)/usr/sbin
  104. $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/usr/sbin/
  105. endef
  106. define Package/losetup/install
  107. $(INSTALL_DIR) $(1)/sbin
  108. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/sbin/
  109. endef
  110. define Package/mount-utils/install
  111. $(INSTALL_DIR) $(1)/bin/
  112. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/{u,}mount $(1)/bin
  113. endef
  114. define Package/swap-utils/install
  115. $(INSTALL_DIR) $(1)/sbin
  116. $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(PKG_BUILD_DIR)/mount/swapon $(1)/sbin/
  117. ln -sf swapon $(1)/sbin/swapoff
  118. endef
  119. define Package/hwclock/install
  120. $(INSTALL_DIR) $(1)/sbin
  121. $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
  122. endef
  123. define Package/flock/install
  124. $(INSTALL_DIR) $(1)/usr/bin
  125. $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
  126. endef
  127. $(eval $(call BuildPackage,fdisk))
  128. $(eval $(call BuildPackage,cfdisk))
  129. $(eval $(call BuildPackage,sfdisk))
  130. $(eval $(call BuildPackage,losetup))
  131. $(eval $(call BuildPackage,mount-utils))
  132. $(eval $(call BuildPackage,swap-utils))
  133. $(eval $(call BuildPackage,hwclock))
  134. $(eval $(call BuildPackage,flock))