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