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.
7 # $Id: Makefile 3822 2006-05-24 07:01:52Z nico $
9 include $(TOPDIR)/rules.mk
14 PKG_MD5SUM:=c261230b27fc0fbcc287c76884caf2d3
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_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
22 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
23 PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
25 include $(INCLUDE_DIR)/package.mk
30 TITLE:=Partition table manipulation utility
31 DESCRIPTION:=A partition table manipulation utility
32 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
35 define Package/losetup
37 TITLE:=Loopback devices setup and control utility
38 DESCRIPTION:=A loopback devices setup and control utility
41 define Package/swap-utils
43 TITLE:=Swap space management utilities
44 DESCRIPTION:=A collection of tools to manage swap space \\\
51 rm -rf $(PKG_INSTALL_DIR)
52 mkdir -p $(PKG_INSTALL_DIR)
53 $(MAKE) -C $(PKG_BUILD_DIR) \
54 $(TARGET_CONFIGURE_OPTS) \
55 OPT="$(TARGET_CFLAGS)" \
56 DESTDIR="$(PKG_INSTALL_DIR)" \
57 INSTALLSUID="install -m 4755" \
61 define Package/Template
62 @if [ \! -f "$(PKG_INSTALL_DIR)/$(1)" ]; then \
63 rm -f $(PKG_BUILD_DIR)/.built; \
64 $(MAKE) $(PKG_BUILD_DIR)/.built; \
66 install -d -m0755 $(2)
67 $(CP) $(PKG_INSTALL_DIR)/$(1) $(2)/
70 define Package/fdisk/install
71 $(call Package/Template,sbin/fdisk,$(1)/usr/sbin)
73 define Package/losetup/install
74 $(call Package/Template,sbin/losetup,$(1)/usr/sbin)
76 define Package/swap-utils/install
77 $(call Package/Template,sbin/mkswap,$(1)/usr/sbin)
78 $(call Package/Template,sbin/swapon,$(1)/usr/sbin)
79 $(call Package/Template,sbin/swapoff,$(1)/usr/sbin)
81 $(eval $(call BuildPackage,fdisk))
82 $(eval $(call BuildPackage,losetup))
83 $(eval $(call BuildPackage,swap-utils))