Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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: Makefile 3822 2006-05-24 07:01:52Z nico $
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=util-linux
  10. PKG_VERSION:=2.12r
  11. PKG_RELEASE:=1
  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. PKG_CAT:=zcat
  19. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
  20. PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/util-linux/Default
  23. SECTION:=utils
  24. CATEGORY:=Utilities
  25. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  26. endef
  27. define Package/fdisk
  28. $(call Package/util-linux/Default)
  29. TITLE:=Partition table manipulation utility
  30. DESCRIPTION:=\
  31. This package contains an utility for managing disk partition tables.
  32. URL:=http://www.kernel.org/pub/linux/utils/util-linux/
  33. endef
  34. define Package/losetup
  35. $(call Package/util-linux/Default)
  36. TITLE:=Loopback devices setup and control utility
  37. DESCRIPTION:=\
  38. This package contains an utility for managing loopback devices.
  39. endef
  40. define Package/swap-utils
  41. $(call Package/util-linux/Default)
  42. TITLE:=Swap space management utilities
  43. DESCRIPTION:=\
  44. This package contains a collection of tools for managing swap space: \\\
  45. - mkswap\\\
  46. - swapon\\\
  47. - swapoff
  48. endef
  49. define Build/Compile
  50. $(call Build/Compile/Default, \
  51. OPT="$(TARGET_CFLAGS)" \
  52. INSTALLSUID="install -m 4755" \
  53. DESTDIR="$(PKG_INSTALL_DIR)" \
  54. all install \
  55. )
  56. endef
  57. define Package/Template
  58. @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
  59. rm -f $(PKG_BUILD_DIR)/.built; \
  60. $(MAKE) $(PKG_BUILD_DIR)/.built; \
  61. fi
  62. install -d -m0755 $(2)
  63. $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
  64. endef
  65. define Package/fdisk/install
  66. $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
  67. endef
  68. define Package/losetup/install
  69. $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
  70. endef
  71. define Package/swap-utils/install
  72. $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
  73. $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
  74. $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
  75. endef
  76. $(eval $(call BuildPackage,fdisk))
  77. $(eval $(call BuildPackage,losetup))
  78. $(eval $(call BuildPackage,swap-utils))