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:=54ba880f1d66782c2287ee2c898520e9
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 TARGET_CFLAGS += $(FPIC)
41 define Build/InstallDev
42 $(MAKE) -C $(PKG_BUILD_DIR) \
45 installdirs install-data
47 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
48 $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
49 $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
50 $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
52 $(INSTALL_DIR) $(1)/usr/include/blkid
53 $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
54 $(INSTALL_DIR) $(1)/usr/include/libmount
55 $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
56 $(INSTALL_DIR) $(1)/usr/include/uuid
57 $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.{a,so.*} $(1)/usr/lib
61 $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.{a,so.*} $(1)/usr/lib
62 $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.{a,so.*} $(1)/usr/lib
65 define Package/libblkid
66 $(call Package/util-linux/Default)
68 TITLE:=block device id library
73 define Package/libblkid/description
74 The libblkid library is used to identify block devices (disks) as to their
75 content (e.g. filesystem type, partitions) as well as extracting additional
76 information such as filesystem labels/volume names, partitions, unique
77 identifiers/serial numbers...
80 define Package/libmount
81 $(call Package/util-linux/Default)
87 define Package/libmount/description
88 The libmount library is used to parse /etc/fstab, /etc/mtab and
89 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
92 define Package/libuuid
93 $(call Package/util-linux/Default)
94 TITLE:=DCE compatible Universally Unique Identifier library
99 define Package/libuuid/description
100 The UUID library is used to generate unique identifiers for objects
101 that may be accessible beyond the local system. This library
102 generates UUIDs compatible with those created by the Open Software
103 Foundation (OSF) Distributed Computing Environment (DCE) utility.
106 define Package/agetty
107 $(call Package/util-linux/Default)
108 TITLE:=alternative Linux getty
112 define Package/agetty/description
113 agetty opens a tty port, prompts for a login name and invokes the
118 $(call Package/util-linux/Default)
119 TITLE:=locate/print block device attributes
124 define Package/blkid/description
125 The blkid program is the command-line interface to working with the libblkid
130 $(call Package/util-linux/Default)
131 TITLE:=display a calendar
132 DEPENDS:= +libncurses
135 define Package/cal/description
136 cal displays a simple calendar
139 define Package/cfdisk
140 $(call Package/util-linux/Default)
141 TITLE:=display or manipulate disk partition table
142 DEPENDS:= +libblkid +libncurses
146 define Package/cfdisk/description
147 cfdisk is a curses-based program for partitioning any hard disk drive
151 $(call Package/util-linux/Default)
152 TITLE:=print or control the kernel ring buffer
155 define Package/dmesg/description
156 dmesg is used to examine or control the kernel ring buffer
160 $(call Package/util-linux/Default)
161 TITLE:=manipulate disk partition table
166 define Package/fdisk/description
167 a menu-driven program for creation and manipulation of partition tables
170 define Package/findfs
171 $(call Package/util-linux/Default)
172 TITLE:=find a filesystem by label or UUID
177 define Package/findfs/description
178 findfs will search the disks in the system looking for a filesystem which has
179 a label matching label or a UUID equal to uuid
183 $(call Package/util-linux/Default)
184 TITLE:=manage locks from shell scripts
187 define Package/flock/description
188 manages flock locks from within shell scripts or the command line
191 define Package/getopt
192 $(call Package/util-linux/Default)
193 TITLE:=parse command options (enhanced)
196 define Package/getopt/description
197 getopt is used to break up (parse) options in command lines for easy parsing
198 by shell procedures, and to check for legal options
201 define Package/hwclock
202 $(call Package/util-linux/Default)
203 TITLE:=query or set the hardware clock
206 define Package/hwclock/description
207 hwclock is a tool for accessing the Hardware Clock
210 define Package/logger
211 $(call Package/util-linux/Default)
212 TITLE:=a shell command interface to the syslog system log module
215 define Package/logger/description
216 logger makes entries in the system log, it provides a shell command interface
217 to the syslog system log module
221 $(call Package/util-linux/Default)
222 TITLE:=display lines beginning with a given string
225 define Package/look/description
226 look utility displays any lines in file which contain string
229 define Package/losetup
230 $(call Package/util-linux/Default)
231 TITLE:=set up and control loop devices
234 define Package/losetup/description
235 losetup is used to associate loop devices with regular files or block devices,
236 to detach loop devices and to query the status of a loop device
240 $(call Package/util-linux/Default)
241 TITLE:=list block devices
246 define Package/lsblk/description
247 lsblk lists information about all or the specified block devices
250 define Package/mcookie
251 $(call Package/util-linux/Default)
252 TITLE:=generate magic cookies for xauth
255 define Package/mcookie/description
256 mcookie generates a 128-bit random hexadecimal number for use with the X
260 define Package/mount-utils
261 $(call Package/util-linux/Default)
262 TITLE:=related (u)mount utilities
263 DEPENDS+= +libblkid +libmount
266 define Package/mount-utils/description
267 contains: mount, umount, findmnt
271 $(call Package/util-linux/Default)
272 TITLE:=follow a pathname until a terminal point is found
275 define Package/namei/description
276 namei uses its arguments as pathnames to any type of Unix file (symlinks,
277 files, directories, and so forth)
280 define Package/rename
281 $(call Package/util-linux/Default)
285 define Package/rename/description
286 rename will rename the specified files by replacing the first occurrence of
287 expression in their name by replacement
290 define Package/partx-utils
291 $(call Package/util-linux/Default)
292 TITLE:=inform kernel about the presence and numbering of on-disk partitions
297 define Package/partx-utils/description
298 contains partx, addpart, delpart
301 define Package/script-utils
302 $(call Package/util-linux/Default)
303 TITLE:=make and replay typescript of terminal session
307 define Package/script-utils/description
308 contains: script, scriptreplay
311 define Package/setterm
312 $(call Package/util-linux/Default)
313 TITLE:=set terminal attributes
317 define Package/setterm/description
318 setterm writes to standard output a character string that will invoke the
319 specified terminal capabilities
322 define Package/sfdisk
323 $(call Package/util-linux/Default)
324 TITLE:=partition table manipulator for Linux
328 define Package/sfdisk/description
329 list the size of a partition, list the partitions on a device, check the
330 partitions on a device and repartition a device
333 define Package/swap-utils
334 $(call Package/util-linux/Default)
335 TITLE:=swap space management utilities
340 define Package/swap-utils/description
341 contains: mkswap, swaplabel, swapon, swapoff
345 $(call Package/util-linux/Default)
346 TITLE:=UUID generation daemon
350 define Package/uuidd/description
351 The uuidd daemon is used by the UUID library to generate universally unique
352 identifiers (UUIDs), especially time-based UUIDs, in a secure and
353 guaranteed-unique fashion, even in the face of large numbers of threads
354 running on different CPUs trying to grab UUIDs.
357 define Package/uuidgen
358 $(call Package/util-linux/Default)
359 TITLE:=create a new UUID value
363 define Package/uuidgen/description
364 The uuidgen program creates (and prints) a new universally unique identifier
365 (UUID) using the libuuid library. The new UUID can reasonably be considered
366 unique among all UUIDs created on the local system, and among UUIDs created on
367 other systems in the past and in the future.
371 $(call Package/util-linux/Default)
372 TITLE:=send a message to everybody's terminal
376 define Package/wall/description
377 wall sends a message to everybody logged in with their mesg permission
381 define Package/whereis
382 $(call Package/util-linux/Default)
383 TITLE:=locate the binary, source, and manual page files for a command
386 define Package/whereis/description
387 whereis locates source/binary and manuals sections for specified files
390 define Package/wipefs
391 $(call Package/util-linux/Default)
392 TITLE:=wipe a signature from a device
397 define Package/wipefs/description
398 wipefs can erase filesystem, raid or partition table signatures (magic
399 strings) from the specified device to make the signature invisible for
403 define Package/libblkid/install
404 $(INSTALL_DIR) $(1)/usr/lib
405 $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
408 define Package/libmount/install
409 $(INSTALL_DIR) $(1)/usr/lib
410 $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
413 define Package/libuuid/install
414 $(INSTALL_DIR) $(1)/usr/lib
415 $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
418 define Package/agetty/install
419 $(INSTALL_DIR) $(1)/sbin
420 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
423 define Package/blkid/install
424 $(INSTALL_DIR) $(1)/sbin
425 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
428 define Package/cal/install
429 $(INSTALL_DIR) $(1)/usr/bin
430 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
433 define Package/cfdisk/install
434 $(INSTALL_DIR) $(1)/sbin
435 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
438 define Package/fdisk/install
439 $(INSTALL_DIR) $(1)/sbin
440 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
443 define Package/findfs/install
444 $(INSTALL_DIR) $(1)/sbin
445 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
448 define Package/flock/install
449 $(INSTALL_DIR) $(1)/usr/bin
450 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
453 define Package/getopt/install
454 $(INSTALL_DIR) $(1)/usr/bin
455 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
458 define Package/hwclock/install
459 $(INSTALL_DIR) $(1)/sbin
460 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
463 define Package/logger/install
464 $(INSTALL_DIR) $(1)/usr/bin
465 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
468 define Package/look/install
469 $(INSTALL_DIR) $(1)/usr/bin
470 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
473 define Package/losetup/install
474 $(INSTALL_DIR) $(1)/sbin
475 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
478 define Package/lsblk/install
479 $(INSTALL_DIR) $(1)/bin
480 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
483 define Package/mcookie/install
484 $(INSTALL_DIR) $(1)/usr/bin
485 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
488 define Package/mount-utils/install
489 $(INSTALL_DIR) $(1)/bin
490 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/bin/
491 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/bin/
492 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/bin/
495 define Package/namei/install
496 $(INSTALL_DIR) $(1)/usr/bin/
497 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
500 define Package/rename/install
501 $(INSTALL_DIR) $(1)/usr/bin/
502 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
505 define Package/partx-utils/install
506 $(INSTALL_DIR) $(1)/usr/sbin
507 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
508 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
509 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
512 define Package/script-utils/install
513 $(INSTALL_DIR) $(1)/usr/bin
514 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
515 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
518 define Package/setterm/install
519 $(INSTALL_DIR) $(1)/usr/bin
520 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
523 define Package/sfdisk/install
524 $(INSTALL_DIR) $(1)/sbin
525 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
528 define Package/swap-utils/install
529 $(INSTALL_DIR) $(1)/sbin
530 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/sbin/
531 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/sbin/
532 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/swapon $(1)/sbin/
533 ln -sf swapon $(1)/sbin/swapoff
536 define Package/uuidd/install
537 $(INSTALL_DIR) $(1)/usr/sbin
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
541 define Package/uuidgen/install
542 $(INSTALL_DIR) $(1)/usr/bin
543 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
546 define Package/wall/install
547 $(INSTALL_DIR) $(1)/usr/bin
548 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
551 define Package/whereis/install
552 $(INSTALL_DIR) $(1)/usr/bin
553 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
556 define Package/wipefs/install
557 $(INSTALL_DIR) $(1)/sbin
558 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
561 $(eval $(call BuildPackage,libblkid))
562 $(eval $(call BuildPackage,libmount))
563 $(eval $(call BuildPackage,libuuid))
564 $(eval $(call BuildPackage,agetty))
565 $(eval $(call BuildPackage,blkid))
566 $(eval $(call BuildPackage,cal))
567 $(eval $(call BuildPackage,cfdisk))
568 $(eval $(call BuildPackage,dmesg))
569 $(eval $(call BuildPackage,fdisk))
570 $(eval $(call BuildPackage,findfs))
571 $(eval $(call BuildPackage,flock))
572 $(eval $(call BuildPackage,getopt))
573 $(eval $(call BuildPackage,hwclock))
574 $(eval $(call BuildPackage,logger))
575 $(eval $(call BuildPackage,look))
576 $(eval $(call BuildPackage,losetup))
577 $(eval $(call BuildPackage,lsblk))
578 $(eval $(call BuildPackage,mcookie))
579 $(eval $(call BuildPackage,mount-utils))
580 $(eval $(call BuildPackage,namei))
581 $(eval $(call BuildPackage,rename))
582 $(eval $(call BuildPackage,partx-utils))
583 $(eval $(call BuildPackage,script-utils))
584 $(eval $(call BuildPackage,setterm))
585 $(eval $(call BuildPackage,sfdisk))
586 $(eval $(call BuildPackage,swap-utils))
587 $(eval $(call BuildPackage,uuidd))
588 $(eval $(call BuildPackage,uuidgen))
589 $(eval $(call BuildPackage,wall))
590 $(eval $(call BuildPackage,whereis))
591 $(eval $(call BuildPackage,wipefs))