Makefile 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. #
  2. # Copyright (C) 2006 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. # $Id$
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=util-linux
  10. PKG_VERSION:=2.12r
  11. PKG_RELEASE:=2
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=ftp://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \
  14. http://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \
  15. ftp://ftp.de.kernel.org/pub/linux/utils/$(PKG_NAME)/ \
  16. http://ftp.de.kernel.org/pub/linux/utils/$(PKG_NAME)/
  17. PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/util-linux/Default
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  23. endef
  24. define Package/fdisk
  25. $(call Package/util-linux/Default)
  26. TITLE:=Partition table manipulation utility
  27. DESCRIPTION:=\
  28. This package contains a utility for managing disk partition tables.
  29. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  30. endef
  31. define Package/cfdisk
  32. $(call Package/util-linux/Default)
  33. TITLE:=Partition table manipulation utility
  34. DEPENDS:=+libncurses
  35. DESCRIPTION:=\
  36. This package contains a utility for managing disk partition tables.
  37. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  38. endef
  39. define Package/losetup
  40. $(call Package/util-linux/Default)
  41. TITLE:=Loopback devices setup and control utility
  42. DESCRIPTION:=\
  43. This package contains a utility for managing loopback devices.
  44. endef
  45. define Package/swap-utils
  46. $(call Package/util-linux/Default)
  47. TITLE:=Swap space management utilities
  48. DESCRIPTION:=\
  49. This package contains a collection of tools for managing swap space: \\\
  50. - mkswap\\\
  51. - swapon\\\
  52. - swapoff
  53. endef
  54. define Package/hwclock
  55. $(call Package/util-linux/Default)
  56. TITLE:=Utilities for managing the hardware clock
  57. DESCRIPTION:=\
  58. This package contains a utility for managing the hardware clock
  59. endef
  60. TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
  61. define Build/Compile
  62. $(call Build/Compile/Default, \
  63. OPT="$(TARGET_CFLAGS)" \
  64. INSTALLSUID="install -m 4755" \
  65. DESTDIR="$(PKG_INSTALL_DIR)" \
  66. all install \
  67. )
  68. endef
  69. define Package/Template
  70. @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
  71. rm -f $(PKG_BUILD_DIR)/.built; \
  72. $(MAKE) $(PKG_BUILD_DIR)/.built; \
  73. fi
  74. $(INSTALL_DIR) $(2)
  75. $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
  76. endef
  77. define Package/fdisk/install
  78. $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
  79. endef
  80. define Package/cfdisk/install
  81. $(call Package/Template,sbin/cfdisk,$(1)/usr/sbin)
  82. endef
  83. define Package/losetup/install
  84. $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
  85. endef
  86. define Package/swap-utils/install
  87. $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
  88. $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
  89. $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
  90. endef
  91. define Package/hwclock/install
  92. $(call Package/Template,sbin/hwclock,$(1)/usr/sbin)
  93. endef
  94. $(eval $(call BuildPackage,fdisk))
  95. $(eval $(call BuildPackage,cfdisk))
  96. $(eval $(call BuildPackage,losetup))
  97. $(eval $(call BuildPackage,swap-utils))
  98. $(eval $(call BuildPackage,hwclock))