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:=ftp://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \
17 http://ftp.kernel.org/pub/linux/utils/$(PKG_NAME)/ \
18 ftp://ftp.de.kernel.org/pub/linux/utils/$(PKG_NAME)/ \
19 http://ftp.de.kernel.org/pub/linux/utils/$(PKG_NAME)/
20 PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3
22 include $(INCLUDE_DIR)/package.mk
24 define Package/util-linux/Default
27 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
31 $(call Package/util-linux/Default)
32 TITLE:=Partition table manipulation utility
34 This package contains an utility for managing disk partition tables.
35 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
39 $(call Package/util-linux/Default)
40 TITLE:=Partition table manipulation utility
43 This package contains an utility for managing disk partition tables.
44 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
47 define Package/losetup
48 $(call Package/util-linux/Default)
49 TITLE:=Loopback devices setup and control utility
51 This package contains an utility for managing loopback devices.
54 define Package/swap-utils
55 $(call Package/util-linux/Default)
56 TITLE:=Swap space management utilities
58 This package contains a collection of tools for managing swap space: \\\
64 TARGET_CFLAGS += -I$(PKG_BUILD_DIR)/lib
66 $(call Build/Compile/Default, \
67 OPT="$(TARGET_CFLAGS)" \
68 INSTALLSUID="install -m 4755" \
69 DESTDIR="$(PKG_INSTALL_DIR)" \
74 define Package/Template
75 @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
76 rm -f $(PKG_BUILD_DIR)/.built; \
77 $(MAKE) $(PKG_BUILD_DIR)/.built; \
80 $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
83 define Package/fdisk/install
84 $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
87 define Package/cfdisk/install
88 $(call Package/Template,sbin/cfdisk,$(1)/usr/sbin)
91 define Package/losetup/install
92 $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
95 define Package/swap-utils/install
96 $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
97 $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
98 $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
101 $(eval $(call BuildPackage,fdisk))
102 $(eval $(call BuildPackage,cfdisk))
103 $(eval $(call BuildPackage,losetup))
104 $(eval $(call BuildPackage,swap-utils))