Root/package/util-linux-ng/Makefile

1#
2# Copyright (C) 2007-2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=util-linux-ng
11PKG_VERSION:=2.13.0.1
12PKG_RELEASE:=4
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.13
16PKG_MD5SUM:=c841dc8743905c8f0db20c9db5094f57
17
18PKG_BUILD_DEPENDS=e2fsprogs libncurses
19
20include $(INCLUDE_DIR)/package.mk
21
22define Package/util-linux/Default
23  SECTION:=utils
24  CATEGORY:=Utilities
25  URL:=http://www.kernel.org/pub/linux/utils/util-linux-ng/
26endef
27
28define Package/fdisk
29$(call Package/util-linux/Default)
30  TITLE:=Partition table manipulation utility
31  SUBMENU=disc
32endef
33
34define Package/fdisk/description
35 This package contains a utility for managing disk partition tables.
36endef
37
38define Package/cfdisk
39$(call Package/util-linux/Default)
40  SUBMENU:=disc
41  TITLE:=Partition table manipulation utility
42  DEPENDS:= +libncurses
43endef
44
45define Package/cfdisk/description
46 This package contains a utility for managing disk partition tables.
47endef
48
49define Package/sfdisk
50$(call Package/util-linux/Default)
51  TITLE:=Partition table manipulation utility (Command-line)
52  SUBMENU=disc
53endef
54
55define Package/sfdisk/description
56 This package contains a utility for managing disk partition tables using command-line only.
57endef
58
59define Package/losetup
60$(call Package/util-linux/Default)
61  TITLE:=Loopback devices setup and control utility
62endef
63
64define Package/losetup/description
65 This package contains a utility for managing loopback devices.
66endef
67
68define Package/mount-utils
69$(call Package/util-linux/Default)
70  TITLE:=Devices mount/unmounting utilities
71  DEPENDS+= +libblkid +libuuid
72endef
73
74define Package/mount-utils/description
75 This package contains utilities to mount/unmount devices.
76endef
77
78define Package/swap-utils
79$(call Package/util-linux/Default)
80  SUBMENU:=disc
81  TITLE:=Swap space management utilities
82  DEPENDS+= +libblkid +libuuid
83endef
84
85define Package/swap-utils/description
86 This package contains a collection of tools for managing swap space:
87 - mkswap
88 - swapon
89 - swapoff
90endef
91
92define Package/hwclock
93$(call Package/util-linux/Default)
94  TITLE:=Utilities for managing the hardware clock
95endef
96
97define Package/hwclock/description
98 This package contains a utility for managing the hardware clock.
99endef
100
101define Package/flock
102$(call Package/util-linux/Default)
103  TITLE:=Manage file locks from shell scripts
104endef
105
106define Package/flock/description
107  This package contains a utility for managing file locks from shell scripts.
108endef
109
110define Package/setterm
111$(call Package/util-linux/Default)
112  TITLE:=Tool for setting terminal attributes
113  SUBMENU:=Terminal
114  DEPENDS:= +libncurses
115endef
116
117define Package/setterm/description
118  This package contains a utility for setting terminal attributes
119endef
120
121define Package/script
122$(call Package/util-linux/Default)
123  TITLE:=Make typescript of terminal session
124  SUBMENU=Terminal
125endef
126
127define Package/script/description
128 Script makes a typescript of everything printed on your terminal.
129 http://linux.die.net/man/1/script
130endef
131
132
133define Build/Compile
134    $(MAKE) -C $(PKG_BUILD_DIR)/disk-utils mkswap
135    $(MAKE) -C $(PKG_BUILD_DIR)/mount swapon losetup umount mount
136    $(MAKE) -C $(PKG_BUILD_DIR)/fdisk fdisk cfdisk sfdisk
137    $(MAKE) -C $(PKG_BUILD_DIR)/hwclock hwclock
138    $(MAKE) -C $(PKG_BUILD_DIR)/sys-utils flock
139    $(MAKE) -C $(PKG_BUILD_DIR)/misc-utils setterm
140    $(MAKE) -C $(PKG_BUILD_DIR)/misc-utils script
141endef
142
143define Package/fdisk/install
144    $(INSTALL_DIR) $(1)/sbin
145    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/fdisk $(1)/sbin/
146endef
147
148define Package/cfdisk/install
149    $(INSTALL_DIR) $(1)/sbin
150    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/cfdisk $(1)/sbin/
151endef
152
153define Package/sfdisk/install
154    $(INSTALL_DIR) $(1)/usr/sbin
155    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/usr/sbin/
156endef
157
158define Package/losetup/install
159    $(INSTALL_DIR) $(1)/sbin
160    $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/losetup $(1)/sbin/
161endef
162
163define Package/mount-utils/install
164    $(INSTALL_DIR) $(1)/bin/
165    $(INSTALL_BIN) $(PKG_BUILD_DIR)/mount/{u,}mount $(1)/bin
166endef
167
168define Package/swap-utils/install
169    $(INSTALL_DIR) $(1)/sbin
170    $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/mkswap $(PKG_BUILD_DIR)/mount/swapon $(1)/sbin/
171    ln -sf swapon $(1)/sbin/swapoff
172endef
173
174define Package/hwclock/install
175    $(INSTALL_DIR) $(1)/sbin
176    $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
177endef
178
179define Package/flock/install
180    $(INSTALL_DIR) $(1)/usr/bin
181    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
182endef
183
184define Package/setterm/install
185    $(INSTALL_DIR) $(1)/usr/bin
186    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/setterm $(1)/usr/bin/
187endef
188
189define Package/script/install
190    $(INSTALL_DIR) $(1)/usr/bin
191    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/script $(1)/usr/bin/
192endef
193
194
195$(eval $(call BuildPackage,fdisk))
196$(eval $(call BuildPackage,cfdisk))
197$(eval $(call BuildPackage,sfdisk))
198$(eval $(call BuildPackage,losetup))
199$(eval $(call BuildPackage,mount-utils))
200$(eval $(call BuildPackage,swap-utils))
201$(eval $(call BuildPackage,hwclock))
202$(eval $(call BuildPackage,flock))
203$(eval $(call BuildPackage,setterm))
204$(eval $(call BuildPackage,script))
205

Archive Download this file



interactive