2 # Copyright (C) 2007-2012 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
16 PKG_MD5SUM:=ad602dcd528f340b1329cfa6200d8f80
19 PKG_BUILD_DEPENDS:=libncurses
22 include $(INCLUDE_DIR)/package.mk
24 define Package/util-linux/Default
27 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
31 scanf_cv_alloc_modifier="ms"
39 define Package/libblkid
40 $(call Package/util-linux/Default)
41 TITLE:=block device id library
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...
53 define Package/libmount
54 $(call Package/util-linux/Default)
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...
65 define Package/libuuid
66 $(call Package/util-linux/Default)
67 TITLE:=DCE compatible Universally Unique Identifier library
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.
80 $(call Package/util-linux/Default)
81 TITLE:=alternative Linux getty
85 define Package/agetty/description
86 agetty opens a tty port, prompts for a login name and invokes the
91 $(call Package/util-linux/Default)
92 TITLE:=locate/print block device attributes
93 DEPENDS:= +libblkid +libuuid
97 define Package/blkid/description
98 The blkid program is the command-line interface to working with the libblkid
103 $(call Package/util-linux/Default)
104 TITLE:=display a calendar
105 DEPENDS:= +libncurses
108 define Package/cal/description
109 cal displays a simple calendar
112 define Package/cfdisk
113 $(call Package/util-linux/Default)
114 TITLE:=display or manipulate disk partition table
115 DEPENDS:= +libblkid +libncurses +libuuid
119 define Package/cfdisk/description
120 cfdisk is a curses-based program for partitioning any hard disk drive
124 $(call Package/util-linux/Default)
125 TITLE:=print or control the kernel ring buffer
128 define Package/dmesg/description
129 dmesg is used to examine or control the kernel ring buffer
133 $(call Package/util-linux/Default)
134 TITLE:=manipulate disk partition table
135 DEPENDS:= +libblkid +libuuid
139 define Package/fdisk/description
140 a menu-driven program for creation and manipulation of partition tables
143 define Package/findfs
144 $(call Package/util-linux/Default)
145 TITLE:=find a filesystem by label or UUID
146 DEPENDS:= +libblkid +libuuid
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
156 $(call Package/util-linux/Default)
157 TITLE:=manage locks from shell scripts
160 define Package/flock/description
161 manages flock locks from within shell scripts or the command line
164 define Package/getopt
165 $(call Package/util-linux/Default)
166 TITLE:=parse command options (enhanced)
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
174 define Package/hwclock
175 $(call Package/util-linux/Default)
176 TITLE:=query or set the hardware clock
179 define Package/hwclock/description
180 hwclock is a tool for accessing the Hardware Clock
183 define Package/logger
184 $(call Package/util-linux/Default)
185 TITLE:=a shell command interface to the syslog system log module
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
193 $(call Package/util-linux/Default)
194 TITLE:=display lines beginning with a given string
197 define Package/look/description
198 look utility displays any lines in file which contain string
201 define Package/losetup
202 $(call Package/util-linux/Default)
203 TITLE:=set up and control loop devices
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
212 $(call Package/util-linux/Default)
213 TITLE:=list block devices
214 DEPENDS:= +libblkid +libuuid
218 define Package/lsblk/description
219 lsblk lists information about all or the specified block devices
222 define Package/mcookie
223 $(call Package/util-linux/Default)
224 TITLE:=generate magic cookies for xauth
227 define Package/mcookie/description
228 mcookie generates a 128-bit random hexadecimal number for use with the X
232 define Package/mount-utils
233 $(call Package/util-linux/Default)
234 TITLE:=related (u)mount utilities
235 DEPENDS+= +libblkid +libmount +libuuid
238 define Package/mount-utils/description
239 contains: mount, umount, findmnt
243 $(call Package/util-linux/Default)
244 TITLE:=follow a pathname until a terminal point is found
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)
252 define Package/rename
253 $(call Package/util-linux/Default)
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
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
269 define Package/partx-utils/description
270 contains partx, addpart, delpart
273 define Package/script-utils
274 $(call Package/util-linux/Default)
275 TITLE:=make and replay typescript of terminal session
279 define Package/script-utils/description
280 contains: script, scriptreplay
283 define Package/setterm
284 $(call Package/util-linux/Default)
285 TITLE:=set terminal attributes
289 define Package/setterm/description
290 setterm writes to standard output a character string that will invoke the
291 specified terminal capabilities
294 define Package/sfdisk
295 $(call Package/util-linux/Default)
296 TITLE:=partition table manipulator for Linux
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
305 define Package/swap-utils
306 $(call Package/util-linux/Default)
307 TITLE:=swap space management utilities
308 DEPENDS+= +libblkid +libuuid
312 define Package/swap-utils/description
313 contains: mkswap, swaplabel, swapon, swapoff
317 $(call Package/util-linux/Default)
318 TITLE:=UUID generation daemon
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.
329 define Package/uuidgen
330 $(call Package/util-linux/Default)
331 TITLE:=create a new UUID value
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.
343 $(call Package/util-linux/Default)
344 TITLE:=send a message to everybody's terminal
348 define Package/wall/description
349 Wall sends a message to everybody logged in with their mesg permission
353 define Package/whereis
354 $(call Package/util-linux/Default)
355 TITLE:=locate the binary, source, and manual page files for a command
358 define Package/wipefs/description
359 whereis locates source/binary and manuals sections for specified files
362 define Package/wipefs
363 $(call Package/util-linux/Default)
364 TITLE:=wipe a signature from a device
365 DEPENDS:= +libblkid +libuuid
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
375 define Package/libblkid/install
376 $(INSTALL_DIR) $(1)/usr/lib
377 $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
380 define Package/libmount/install
381 $(INSTALL_DIR) $(1)/usr/lib
382 $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
385 define Package/libuuid/install
386 $(INSTALL_DIR) $(1)/usr/lib
387 $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
390 define Package/agetty/install
391 $(INSTALL_DIR) $(1)/sbin
392 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
395 define Package/blkid/install
396 $(INSTALL_DIR) $(1)/sbin
397 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
400 define Package/cal/install
401 $(INSTALL_DIR) $(1)/usr/bin
402 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
405 define Package/cfdisk/install
406 $(INSTALL_DIR) $(1)/sbin
407 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
410 define Package/fdisk/install
411 $(INSTALL_DIR) $(1)/sbin
412 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
415 define Package/findfs/install
416 $(INSTALL_DIR) $(1)/sbin
417 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
420 define Package/flock/install
421 $(INSTALL_DIR) $(1)/usr/bin
422 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
425 define Package/getopt/install
426 $(INSTALL_DIR) $(1)/usr/bin
427 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
430 define Package/hwclock/install
431 $(INSTALL_DIR) $(1)/sbin
432 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
435 define Package/logger/install
436 $(INSTALL_DIR) $(1)/usr/bin
437 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
440 define Package/look/install
441 $(INSTALL_DIR) $(1)/usr/bin
442 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
445 define Package/losetup/install
446 $(INSTALL_DIR) $(1)/sbin
447 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
450 define Package/lsblk/install
451 $(INSTALL_DIR) $(1)/bin
452 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
455 define Package/mcookie/install
456 $(INSTALL_DIR) $(1)/usr/bin
457 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
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/
467 define Package/namei/install
468 $(INSTALL_DIR) $(1)/usr/bin/
469 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
472 define Package/rename/install
473 $(INSTALL_DIR) $(1)/usr/bin/
474 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
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/
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/
490 define Package/setterm/install
491 $(INSTALL_DIR) $(1)/usr/bin
492 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
495 define Package/sfdisk/install
496 $(INSTALL_DIR) $(1)/sbin
497 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
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
508 define Package/uuidd/install
509 $(INSTALL_DIR) $(1)/usr/sbin
510 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
513 define Package/uuidgen/install
514 $(INSTALL_DIR) $(1)/usr/bin
515 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
518 define Package/wall/install
519 $(INSTALL_DIR) $(1)/usr/bin
520 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
523 define Package/whereis/install
524 $(INSTALL_DIR) $(1)/usr/bin
525 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
528 define Package/wipefs/install
529 $(INSTALL_DIR) $(1)/sbin
530 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
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))