2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR)/rules.mk
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/
17 PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3
19 include $(INCLUDE_DIR)/package.mk
21 define Package/util-linux/Default
24 DEPENDS:=@!TARGET_ETRAX
25 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
29 $(call Package/util-linux/Default)
30 TITLE:=Partition table manipulation utility
33 define Package/fdisk/description
34 This package contains a utility for managing disk partition tables.
38 $(call Package/util-linux/Default)
39 TITLE:=Partition table manipulation utility
43 define Package/cfdisk/description
44 This package contains a utility for managing disk partition tables.
47 define Package/losetup
48 $(call Package/util-linux/Default)
49 TITLE:=Loopback devices setup and control utility
52 define Package/losetup/description
53 This package contains a utility for managing loopback devices.
56 define Package/swap-utils
57 $(call Package/util-linux/Default)
58 TITLE:=Swap space management utilities
61 define Package/swap-utils/description
62 This package contains a collection of tools for managing swap space:
68 define Package/hwclock
69 $(call Package/util-linux/Default)
70 TITLE:=Utilities for managing the hardware clock
73 define Package/hwclock/description
74 This package contains a utility for managing the hardware clock.
77 define Build/Configure
78 # this is NOT GNU configure!
79 ( cd $(PKG_BUILD_DIR); \
81 CFLAGS="$(TARGET_CPPFLAGS)" \
82 LDFLAGS="$(TARGET_LDFLAGS)" \
88 $(MAKE) -C $(PKG_BUILD_DIR) \
89 OPT="$(TARGET_CFLAGS)" \
90 INSTALLSUID="install -m 4755" \
91 DESTDIR="$(PKG_INSTALL_DIR)" \
95 define Package/Template
96 @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
97 rm -f $(PKG_BUILD_DIR)/.built; \
98 $(MAKE) $(PKG_BUILD_DIR)/.built; \
101 $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
104 define Package/fdisk/install
105 $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
108 define Package/cfdisk/install
109 $(call Package/Template,sbin/cfdisk,$(1)/usr/sbin)
112 define Package/losetup/install
113 $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
116 define Package/swap-utils/install
117 $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
118 $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
119 $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
122 define Package/hwclock/install
123 $(call Package/Template,sbin/hwclock,$(1)/usr/sbin)
126 $(eval $(call BuildPackage,fdisk))
127 $(eval $(call BuildPackage,cfdisk))
128 $(eval $(call BuildPackage,losetup))
129 $(eval $(call BuildPackage,swap-utils))
130 $(eval $(call BuildPackage,hwclock))