[packages/{e2fsprogs,util-linux,util-linux-ng}] update/rename those packages
[openwrt.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.21.1
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
16 PKG_MD5SUM:=ad602dcd528f340b1329cfa6200d8f80
17
18 PKG_BUILD_PARALLEL:=1
19 PKG_BUILD_DEPENDS:=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_alloc_modifier="ms"
32
33 CONFIGURE_ARGS += \
34         --enable-new-mount      \
35         --with-ncurses          \
36         --disable-nls           \
37         --disable-tls
38
39 define Package/libblkid
40 $(call Package/util-linux/Default)
41   TITLE:=block device id library
42   SECTION:=libs
43   CATEGORY:=Libraries
44 endef
45
46 define Package/libblkid/description
47  The libblkid library is used to identify block devices (disks) as to their
48  content (e.g. filesystem type, partitions) as well as extracting additional
49  information such as filesystem labels/volume names, partitions, unique
50  identifiers/serial numbers...
51 endef
52
53 define Package/libmount
54 $(call Package/util-linux/Default)
55   TITLE:=mount library
56   SECTION:=libs
57   CATEGORY:=Libraries
58 endef
59
60 define Package/libblkid/description
61  The libmount library is used to parse /etc/fstab, /etc/mtab and
62  /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
63 endef
64
65 define Package/libuuid
66 $(call Package/util-linux/Default)
67   TITLE:=DCE compatible Universally Unique Identifier library
68   SECTION:=libs
69   CATEGORY:=Libraries
70 endef
71
72 define Package/libuuid/description
73  The UUID library is used to generate unique identifiers for objects
74  that may be accessible beyond the local system. This library
75  generates UUIDs compatible with those created by the Open Software
76  Foundation (OSF) Distributed Computing Environment (DCE) utility.
77 endef
78
79 define Package/agetty
80 $(call Package/util-linux/Default)
81   TITLE:=alternative Linux getty
82   SUBMENU=Terminal
83 endef
84
85 define Package/agetty/description
86  agetty opens a tty port, prompts for a login name and invokes the
87  /bin/login command
88 endef
89
90 define Package/blkid
91 $(call Package/util-linux/Default)
92   TITLE:=locate/print block device attributes
93   DEPENDS:= +libblkid +libuuid 
94   SUBMENU=disc
95 endef
96
97 define Package/blkid/description
98  The blkid program is the command-line interface to working with the libblkid
99  library.
100 endef
101
102 define Package/cal
103 $(call Package/util-linux/Default)
104   TITLE:=display a calendar
105   DEPENDS:= +libncurses
106 endef
107
108 define Package/cal/description
109  cal displays a simple calendar
110 endef
111
112 define Package/cfdisk
113 $(call Package/util-linux/Default)
114   TITLE:=display or manipulate disk partition table
115   DEPENDS:= +libblkid +libncurses +libuuid
116   SUBMENU:=disc
117 endef
118
119 define Package/cfdisk/description
120  cfdisk is a curses-based program for partitioning any hard disk drive
121 endef
122
123 define Package/dmesg
124 $(call Package/util-linux/Default)
125   TITLE:=print or control the kernel ring buffer
126 endef
127
128 define Package/dmesg/description
129  dmesg  is used to examine or control the kernel ring buffer
130 endef
131
132 define Package/fdisk
133 $(call Package/util-linux/Default)
134   TITLE:=manipulate disk partition table
135   DEPENDS:= +libblkid +libuuid
136   SUBMENU=disc
137 endef
138
139 define Package/fdisk/description
140  a menu-driven program for creation and manipulation of partition tables
141 endef
142
143 define Package/findfs
144 $(call Package/util-linux/Default)
145   TITLE:=find a filesystem by label or UUID
146   DEPENDS:= +libblkid +libuuid
147   SUBMENU=disc
148 endef
149
150 define Package/findfs/description
151  findfs will search the disks in the system looking for a filesystem which has
152  a label matching label or a UUID equal to uuid
153 endef
154
155 define Package/flock
156 $(call Package/util-linux/Default)
157   TITLE:=manage locks from shell scripts
158 endef
159
160 define Package/flock/description
161   manages flock locks from within shell scripts or the command line
162 endef
163
164 define Package/getopt
165 $(call Package/util-linux/Default)
166   TITLE:=parse command options (enhanced)
167 endef
168
169 define Package/getopt/description
170  getopt is used to break up (parse) options in command lines for easy parsing
171  by shell procedures, and to check for legal options
172 endef
173
174 define Package/hwclock
175 $(call Package/util-linux/Default)
176   TITLE:=query or set the hardware clock
177 endef
178
179 define Package/hwclock/description
180  hwclock is a tool for accessing the Hardware Clock
181 endef
182
183 define Package/logger
184 $(call Package/util-linux/Default)
185   TITLE:=a shell command interface to the syslog system log module
186 endef
187
188 define Package/logger/description
189  logger makes entries in the system log, it provides a shell command interface to the syslog system log module
190 endef
191
192 define Package/look
193 $(call Package/util-linux/Default)
194   TITLE:=display lines beginning with a given string
195 endef
196
197 define Package/look/description
198  look utility displays any lines in file which contain string
199 endef
200
201 define Package/losetup
202 $(call Package/util-linux/Default)
203   TITLE:=set up and control loop devices
204 endef
205
206 define Package/losetup/description
207  losetup is used to associate loop devices with regular files or block devices,
208  to detach loop devices and to query the status of a loop device
209 endef
210
211 define Package/lsblk
212 $(call Package/util-linux/Default)
213   TITLE:=list block devices
214   DEPENDS:= +libblkid +libuuid
215   SUBMENU=disc
216 endef
217
218 define Package/lsblk/description
219  lsblk lists information about all or the specified block devices
220 endef
221
222 define Package/mcookie
223 $(call Package/util-linux/Default)
224   TITLE:=generate magic cookies for xauth
225 endef
226
227 define Package/mcookie/description
228  mcookie generates a 128-bit random hexadecimal number for use with the X
229  authority system
230 endef
231
232 define Package/mount-utils
233 $(call Package/util-linux/Default)
234   TITLE:=related (u)mount utilities
235   DEPENDS+= +libblkid +libmount +libuuid
236 endef
237
238 define Package/mount-utils/description
239  contains: mount, umount, findmnt
240 endef
241
242 define Package/namei
243 $(call Package/util-linux/Default)
244   TITLE:=follow a pathname until a terminal point is found
245 endef
246
247 define Package/namei/description
248  namei uses its arguments as pathnames to any type of Unix file (symlinks,
249  files, directories, and so forth)
250 endef
251
252 define Package/rename
253 $(call Package/util-linux/Default)
254   TITLE:=rename files
255 endef
256
257 define Package/rename/description
258  rename will rename the specified files by replacing the first occurrence of
259  expression in their name by replacement
260 endef
261
262 define Package/partx-utils
263 $(call Package/util-linux/Default)
264   TITLE:=inform kernel about the presence and numbering of on-disk partitions
265   DEPENDS:= +libblkid +libuuid 
266   SUBMENU=disc
267 endef
268
269 define Package/partx-utils/description
270  contains partx, addpart, delpart
271 endef
272
273 define Package/script-utils
274 $(call Package/util-linux/Default)
275   TITLE:=make and replay typescript of terminal session
276   SUBMENU=Terminal
277 endef
278
279 define Package/script-utils/description
280  contains: script, scriptreplay
281 endef
282
283 define Package/setterm
284 $(call Package/util-linux/Default)
285   TITLE:=set terminal attributes
286   SUBMENU:=Terminal
287 endef
288
289 define Package/setterm/description
290  setterm writes to standard output a character string that will invoke the
291  specified terminal capabilities
292 endef
293
294 define Package/sfdisk
295 $(call Package/util-linux/Default)
296   TITLE:=partition table manipulator for Linux
297   SUBMENU=disc
298 endef
299
300 define Package/sfdisk/description
301  list the size of a partition, list the partitions on a device, check the
302  partitions on a device and repartition a device
303 endef
304
305 define Package/swap-utils
306 $(call Package/util-linux/Default)
307   TITLE:=swap space management utilities
308   DEPENDS+= +libblkid +libuuid
309   SUBMENU:=disc
310 endef
311
312 define Package/swap-utils/description
313  contains: mkswap, swaplabel, swapon, swapoff
314 endef
315
316 define Package/uuidd
317 $(call Package/util-linux/Default)
318   TITLE:=UUID generation daemon
319   DEPENDS:= +libuuid
320 endef
321
322 define Package/uuidd/description
323  The uuidd daemon is used by the UUID library to generate universally unique
324  identifiers (UUIDs), especially time-based UUIDs, in a secure and
325  guaranteed-unique fashion, even in the face of large numbers of threads
326  running on different CPUs trying to grab UUIDs.
327 endef
328
329 define Package/uuidgen
330 $(call Package/util-linux/Default)
331   TITLE:=create a new UUID value
332   DEPENDS:= +libuuid
333 endef
334
335 define Package/uuidgen/description
336  The uuidgen program creates (and prints) a new universally unique identifier
337  (UUID) using the libuuid library. The new UUID can reasonably be considered
338  unique among all UUIDs created on the local system, and among UUIDs created on
339  other systems in the past and in the future.
340 endef
341
342 define Package/wall
343 $(call Package/util-linux/Default)
344   TITLE:=send a message to everybody's terminal
345   SUBMENU=Terminal
346 endef
347
348 define Package/wall/description
349  Wall sends a message to everybody logged in with their mesg permission
350  set to yes
351 endef
352
353 define Package/whereis
354 $(call Package/util-linux/Default)
355   TITLE:=locate the binary, source, and manual page files for a command
356 endef
357
358 define Package/wipefs/description
359  whereis locates source/binary and manuals sections for specified files
360 endef
361
362 define Package/wipefs
363 $(call Package/util-linux/Default)
364   TITLE:=wipe a signature from a device
365   DEPENDS:= +libblkid +libuuid
366   SUBMENU:=disc
367 endef
368
369 define Package/wipefs/description
370  wipefs can erase filesystem, raid or partition table signatures (magic
371  strings) from the specified device to make the signature invisible for
372  libblkid.
373 endef
374
375 define Package/libblkid/install
376         $(INSTALL_DIR) $(1)/usr/lib
377         $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
378 endef
379
380 define Package/libmount/install
381         $(INSTALL_DIR) $(1)/usr/lib
382         $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
383 endef
384
385 define Package/libuuid/install
386         $(INSTALL_DIR) $(1)/usr/lib
387         $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
388 endef
389
390 define Package/agetty/install
391         $(INSTALL_DIR) $(1)/sbin
392         $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
393 endef
394
395 define Package/blkid/install
396         $(INSTALL_DIR) $(1)/sbin
397         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
398 endef
399
400 define Package/cal/install
401         $(INSTALL_DIR) $(1)/usr/bin
402         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
403 endef
404
405 define Package/cfdisk/install
406         $(INSTALL_DIR) $(1)/sbin
407         $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
408 endef
409
410 define Package/fdisk/install
411         $(INSTALL_DIR) $(1)/sbin
412         $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
413 endef
414
415 define Package/findfs/install
416         $(INSTALL_DIR) $(1)/sbin
417         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
418 endef
419
420 define Package/flock/install
421         $(INSTALL_DIR) $(1)/usr/bin
422         $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
423 endef
424
425 define Package/getopt/install
426         $(INSTALL_DIR) $(1)/usr/bin
427         $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
428 endef
429
430 define Package/hwclock/install
431         $(INSTALL_DIR) $(1)/sbin
432         $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
433 endef
434
435 define Package/logger/install
436         $(INSTALL_DIR) $(1)/usr/bin
437         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
438 endef
439
440 define Package/look/install
441         $(INSTALL_DIR) $(1)/usr/bin
442         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
443 endef
444
445 define Package/losetup/install
446         $(INSTALL_DIR) $(1)/sbin
447         $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
448 endef
449
450 define Package/lsblk/install
451         $(INSTALL_DIR) $(1)/bin
452         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
453 endef
454
455 define Package/mcookie/install
456         $(INSTALL_DIR) $(1)/usr/bin
457         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
458 endef
459
460 define Package/mount-utils/install
461         $(INSTALL_DIR) $(1)/bin
462         $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/bin/
463         $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/bin/
464         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/bin/
465 endef
466
467 define Package/namei/install
468         $(INSTALL_DIR) $(1)/usr/bin/
469         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
470 endef
471
472 define Package/rename/install
473         $(INSTALL_DIR) $(1)/usr/bin/
474         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
475 endef
476
477 define Package/partx-utils/install
478         $(INSTALL_DIR) $(1)/usr/sbin
479         $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
480         $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
481         $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
482 endef
483
484 define Package/script-utils/install
485         $(INSTALL_DIR) $(1)/usr/bin
486         $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
487         $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
488 endef
489
490 define Package/setterm/install
491         $(INSTALL_DIR) $(1)/usr/bin
492         $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
493 endef
494
495 define Package/sfdisk/install
496         $(INSTALL_DIR) $(1)/sbin
497         $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
498 endef
499
500 define Package/swap-utils/install
501         $(INSTALL_DIR) $(1)/sbin
502         $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/sbin/
503         $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/sbin/
504         $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/swapon $(1)/sbin/
505         ln -sf swapon $(1)/sbin/swapoff
506 endef
507
508 define Package/uuidd/install
509         $(INSTALL_DIR) $(1)/usr/sbin
510         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
511 endef
512
513 define Package/uuidgen/install
514         $(INSTALL_DIR) $(1)/usr/bin
515         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
516 endef
517
518 define Package/wall/install
519         $(INSTALL_DIR) $(1)/usr/bin
520         $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
521 endef
522
523 define Package/whereis/install
524         $(INSTALL_DIR) $(1)/usr/bin
525         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
526 endef
527
528 define Package/wipefs/install
529         $(INSTALL_DIR) $(1)/sbin
530         $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
531 endef
532
533 $(eval $(call BuildPackage,libblkid))
534 $(eval $(call BuildPackage,libmount))
535 $(eval $(call BuildPackage,libuuid))
536 $(eval $(call BuildPackage,agetty))
537 $(eval $(call BuildPackage,blkid))
538 $(eval $(call BuildPackage,cal))
539 $(eval $(call BuildPackage,cfdisk))
540 $(eval $(call BuildPackage,dmesg))
541 $(eval $(call BuildPackage,fdisk))
542 $(eval $(call BuildPackage,findfs))
543 $(eval $(call BuildPackage,flock))
544 $(eval $(call BuildPackage,getopt))
545 $(eval $(call BuildPackage,hwclock))
546 $(eval $(call BuildPackage,logger))
547 $(eval $(call BuildPackage,look))
548 $(eval $(call BuildPackage,losetup))
549 $(eval $(call BuildPackage,lsblk))
550 $(eval $(call BuildPackage,mcookie))
551 $(eval $(call BuildPackage,mount-utils))
552 $(eval $(call BuildPackage,namei))
553 $(eval $(call BuildPackage,rename))
554 $(eval $(call BuildPackage,partx-utils))
555 $(eval $(call BuildPackage,script-utils))
556 $(eval $(call BuildPackage,setterm))
557 $(eval $(call BuildPackage,sfdisk))
558 $(eval $(call BuildPackage,swap-utils))
559 $(eval $(call BuildPackage,uuidd))
560 $(eval $(call BuildPackage,uuidgen))
561 $(eval $(call BuildPackage,wall))
562 $(eval $(call BuildPackage,whereis))
563 $(eval $(call BuildPackage,wipefs))