2 # Copyright (C) 2007-2015 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.28
16 PKG_MD5SUM:=e534e6ccc49107e5d31c329af798ef7d
19 PKG_LICENSE_FILES:= COPYING \
23 Documentation/licenses/COPYING.GPLv2 \
24 Documentation/licenses/COPYING.LGPLv2.1 \
26 Documentation/licenses/COPYING.BSD-3
30 PKG_CONFIG_DEPENDS:= \
32 CONFIG_PACKAGE_cfdisk \
33 CONFIG_PACKAGE_setterm
38 include $(INCLUDE_DIR)/package.mk
40 define Package/util-linux/Default
44 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
47 define Package/libblkid
48 $(call Package/util-linux/Default)
50 TITLE:=block device id library
55 define Package/libblkid/description
56 The libblkid library is used to identify block devices (disks) as to their
57 content (e.g. filesystem type, partitions) as well as extracting additional
58 information such as filesystem labels/volume names, partitions, unique
59 identifiers/serial numbers...
62 define Package/libfdisk
63 $(call Package/util-linux/Default)
64 DEPENDS:=+libuuid +libblkid
65 TITLE:=partition manipulating library
70 define Package/libfdisk/description
71 The libfdisk library is used for manipulating with partition tables.
74 define Package/libmount
75 $(call Package/util-linux/Default)
82 define Package/libmount/description
83 The libmount library is used to parse /etc/fstab, /etc/mtab and
84 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
87 define Package/libuuid
88 $(call Package/util-linux/Default)
89 TITLE:=DCE compatible Universally Unique Identifier library
94 define Package/libuuid/description
95 The UUID library is used to generate unique identifiers for objects
96 that may be accessible beyond the local system. This library
97 generates UUIDs compatible with those created by the Open Software
98 Foundation (OSF) Distributed Computing Environment (DCE) utility.
101 define Package/libsmartcols
102 $(call Package/util-linux/Default)
103 TITLE:=table or tree library
108 define Package/libsmartcols/description
109 The smartcols library is used to print tables and trees in a pretty way.
112 define Package/agetty
113 $(call Package/util-linux/Default)
114 TITLE:=alternative Linux getty
118 define Package/agetty/description
119 agetty opens a tty port, prompts for a login name and invokes the
123 define Package/blkdiscard
124 $(call Package/util-linux/Default)
125 TITLE:=discard sectors on a device
129 define Package/blkdiscard/description
130 The blkdiscard is used to discard device sectors. This is useful for
131 solid-state drivers (SSDs) and thinly-provisioned storage. Unlike fstrim,
132 this command is used directly on the block device.
136 $(call Package/util-linux/Default)
137 TITLE:=locate and print block device attributes
138 DEPENDS:= +libblkid +libuuid
142 define Package/blkid/description
143 The blkid program is the command-line interface to working with the libblkid
148 $(call Package/util-linux/Default)
149 TITLE:=display a calendar
150 DEPENDS:= +libncurses
153 define Package/cal/description
154 cal displays a simple calendar
157 define Package/cfdisk
158 $(call Package/util-linux/Default)
159 TITLE:=display or manipulate disk partition table
160 DEPENDS:= +libblkid +libncurses +libsmartcols +libfdisk +libmount
164 define Package/cfdisk/description
165 cfdisk is a curses-based program for partitioning any hard disk drive
169 $(call Package/util-linux/Default)
170 TITLE:=print or control the kernel ring buffer
173 define Package/dmesg/description
174 dmesg is used to examine or control the kernel ring buffer
178 $(call Package/util-linux/Default)
179 TITLE:=manipulate disk partition table
180 DEPENDS:= +libblkid +libsmartcols +libfdisk
184 define Package/fdisk/description
185 a menu-driven program for creation and manipulation of partition tables
188 define Package/findfs
189 $(call Package/util-linux/Default)
190 TITLE:=find a filesystem by label or UUID
195 define Package/findfs/description
196 findfs will search the disks in the system looking for a filesystem which has
197 a label matching label or a UUID equal to uuid
201 $(call Package/util-linux/Default)
202 TITLE:=manage locks from shell scripts
205 define Package/flock/description
206 manages flock locks from within shell scripts or the command line
209 define Package/getopt
210 $(call Package/util-linux/Default)
211 TITLE:=parse command options (enhanced)
214 define Package/getopt/description
215 getopt is used to break up (parse) options in command lines for easy parsing
216 by shell procedures, and to check for legal options
219 define Package/hwclock
220 $(call Package/util-linux/Default)
221 TITLE:=query or set the hardware clock
224 define Package/hwclock/description
225 hwclock is a tool for accessing the Hardware Clock
228 define Package/logger
229 $(call Package/util-linux/Default)
230 TITLE:=a shell command interface to the syslog system log module
233 define Package/logger/description
234 logger makes entries in the system log, it provides a shell command interface
235 to the syslog system log module
239 $(call Package/util-linux/Default)
240 TITLE:=display lines beginning with a given string
243 define Package/look/description
244 look utility displays any lines in file which contain string
247 define Package/losetup
248 $(call Package/util-linux/Default)
249 TITLE:=set up and control loop devices
250 DEPENDS:= +libsmartcols
253 define Package/losetup/description
254 losetup is used to associate loop devices with regular files or block devices,
255 to detach loop devices and to query the status of a loop device
259 $(call Package/util-linux/Default)
260 TITLE:=list block devices
261 DEPENDS:= +libblkid +libmount +libsmartcols
265 define Package/lsblk/description
266 lsblk lists information about all or the specified block devices
269 define Package/mcookie
270 $(call Package/util-linux/Default)
271 TITLE:=generate magic cookies for xauth
274 define Package/mcookie/description
275 mcookie generates a 128-bit random hexadecimal number for use with the X
279 define Package/mount-utils
280 $(call Package/util-linux/Default)
281 TITLE:=related (u)mount utilities
282 DEPENDS+= +libmount +libsmartcols
285 define Package/mount-utils/description
286 contains: mount, umount, findmnt
290 $(call Package/util-linux/Default)
291 TITLE:=follow a pathname until a terminal point is found
294 define Package/namei/description
295 namei uses its arguments as pathnames to any type of Unix file (symlinks,
296 files, directories, and so forth)
299 define Package/prlimit
300 $(call Package/util-linux/Default)
301 TITLE:=get and set process resource limits
302 DEPENDS:= +libsmartcols
305 define Package/prlimit/description
306 Given a process id and one or more resources, prlimit tries to retrieve
307 and/or modify the limits.
310 define Package/rename
311 $(call Package/util-linux/Default)
315 define Package/rename/description
316 rename will rename the specified files by replacing the first occurrence of
317 expression in their name by replacement
320 define Package/partx-utils
321 $(call Package/util-linux/Default)
322 TITLE:=inform kernel about the presence and numbering of on-disk partitions
323 DEPENDS:= +libblkid +libsmartcols
327 define Package/partx-utils/description
328 contains partx, addpart, delpart
331 define Package/script-utils
332 $(call Package/util-linux/Default)
333 TITLE:=make and replay typescript of terminal session
337 define Package/script-utils/description
338 contains: script, scriptreplay
341 define Package/setterm
342 $(call Package/util-linux/Default)
343 TITLE:=set terminal attributes
344 DEPENDS:= +libncurses
348 define Package/setterm/description
349 setterm writes to standard output a character string that will invoke the
350 specified terminal capabilities
353 define Package/sfdisk
354 $(call Package/util-linux/Default)
355 TITLE:=partition table manipulator for Linux
357 DEPENDS:= +libblkid +libfdisk +libsmartcols
360 define Package/sfdisk/description
361 list the size of a partition, list the partitions on a device, check the
362 partitions on a device and repartition a device
365 define Package/swap-utils
366 $(call Package/util-linux/Default)
367 TITLE:=swap space management utilities
372 define Package/swap-utils/description
373 contains: mkswap, swaplabel
377 $(call Package/util-linux/Default)
378 TITLE:=UUID generation daemon
382 define Package/uuidd/description
383 The uuidd daemon is used by the UUID library to generate universally unique
384 identifiers (UUIDs), especially time-based UUIDs, in a secure and
385 guaranteed-unique fashion, even in the face of large numbers of threads
386 running on different CPUs trying to grab UUIDs.
389 define Package/uuidgen
390 $(call Package/util-linux/Default)
391 TITLE:=create a new UUID value
395 define Package/uuidgen/description
396 The uuidgen program creates (and prints) a new universally unique identifier
397 (UUID) using the libuuid library. The new UUID can reasonably be considered
398 unique among all UUIDs created on the local system, and among UUIDs created on
399 other systems in the past and in the future.
403 $(call Package/util-linux/Default)
404 TITLE:=send a message to everybody's terminal
408 define Package/wall/description
409 wall sends a message to everybody logged in with their mesg permission
413 define Package/whereis
414 $(call Package/util-linux/Default)
415 TITLE:=locate the binary, source, and manual page files for a command
418 define Package/whereis/description
419 whereis locates source/binary and manuals sections for specified files
422 define Package/wipefs
423 $(call Package/util-linux/Default)
424 TITLE:=wipe a signature from a device
429 define Package/wipefs/description
430 wipefs can erase filesystem, raid or partition table signatures (magic
431 strings) from the specified device to make the signature invisible for
436 --disable-use-tty-group \
443 $(if $(CONFIG_PACKAGE_cal)$(CONFIG_PACKAGE_cfdisk)$(CONFIG_PACKAGE_setterm),--with-ncurses,--without-ncurses)
445 TARGET_CFLAGS += $(FPIC) -std=gnu99
447 define Build/InstallDev
448 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
449 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig
450 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig
451 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig
452 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig
453 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig
455 $(INSTALL_DIR) $(1)/usr/include/blkid
456 $(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid
457 $(INSTALL_DIR) $(1)/usr/include/libfdisk
458 $(CP) $(PKG_INSTALL_DIR)/usr/include/libfdisk/libfdisk.h $(1)/usr/include/libfdisk
459 $(INSTALL_DIR) $(1)/usr/include/libmount
460 $(CP) $(PKG_INSTALL_DIR)/usr/include/libmount/libmount.h $(1)/usr/include/libmount
461 $(INSTALL_DIR) $(1)/usr/include/uuid
462 $(CP) $(PKG_INSTALL_DIR)/usr/include/uuid/uuid.h $(1)/usr/include/uuid
463 $(INSTALL_DIR) $(1)/usr/include/libsmartcols
464 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
466 $(INSTALL_DIR) $(1)/usr/lib
467 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib
468 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib
469 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib
470 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib
471 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib
473 $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
474 $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
475 $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
476 $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
477 $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
481 define Package/libfdisk/install
482 $(INSTALL_DIR) $(1)/usr/lib
483 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib/
484 $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
487 define Package/libblkid/install
488 $(INSTALL_DIR) $(1)/usr/lib
489 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib/
490 $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
493 define Package/libmount/install
494 $(INSTALL_DIR) $(1)/usr/lib
495 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib/
496 $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
499 define Package/libsmartcols/install
500 $(INSTALL_DIR) $(1)/usr/lib
501 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib/
502 $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
505 define Package/libuuid/install
506 $(INSTALL_DIR) $(1)/usr/lib
507 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib/
508 $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
511 define Package/agetty/install
512 $(INSTALL_DIR) $(1)/usr/sbin
513 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/agetty $(1)/usr/sbin/
516 define Package/blkdiscard/install
517 $(INSTALL_DIR) $(1)/usr/sbin
518 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkdiscard $(1)/usr/sbin/
521 define Package/blkid/install
522 $(INSTALL_DIR) $(1)/usr/sbin
523 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
526 define Package/cal/install
527 $(INSTALL_DIR) $(1)/usr/bin
528 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cal $(1)/usr/bin/
531 define Package/cfdisk/install
532 $(INSTALL_DIR) $(1)/usr/sbin
533 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cfdisk $(1)/usr/sbin/
536 define Package/dmesg/install
537 $(INSTALL_DIR) $(1)/usr/bin
538 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmesg $(1)/usr/bin/
541 define Package/fdisk/install
542 $(INSTALL_DIR) $(1)/usr/sbin
543 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fdisk $(1)/usr/sbin/
546 define Package/findfs/install
547 $(INSTALL_DIR) $(1)/usr/sbin
548 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/findfs $(1)/usr/sbin/
551 define Package/flock/install
552 $(INSTALL_DIR) $(1)/usr/bin
553 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/flock $(1)/usr/bin/
556 define Package/getopt/install
557 $(INSTALL_DIR) $(1)/usr/bin
558 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getopt $(1)/usr/bin/
561 define Package/hwclock/install
562 $(INSTALL_DIR) $(1)/usr/sbin
563 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hwclock $(1)/usr/sbin/
566 define Package/logger/install
567 $(INSTALL_DIR) $(1)/usr/bin
568 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/
571 define Package/look/install
572 $(INSTALL_DIR) $(1)/usr/bin
573 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/look $(1)/usr/bin/
576 define Package/losetup/install
577 $(INSTALL_DIR) $(1)/usr/sbin
578 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/losetup $(1)/usr/sbin/
581 define Package/lsblk/install
582 $(INSTALL_DIR) $(1)/usr/bin
583 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsblk $(1)/usr/bin/
586 define Package/mcookie/install
587 $(INSTALL_DIR) $(1)/usr/bin
588 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mcookie $(1)/usr/bin/
591 define Package/mount-utils/install
592 $(INSTALL_DIR) $(1)/usr/bin
593 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{u,}mount $(1)/usr/bin/
594 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mountpoint $(1)/usr/bin/
595 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/findmnt $(1)/usr/bin/
598 define Package/namei/install
599 $(INSTALL_DIR) $(1)/usr/bin
600 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/namei $(1)/usr/bin/
603 define Package/prlimit/install
604 $(INSTALL_DIR) $(1)/usr/bin
605 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prlimit $(1)/usr/bin/
608 define Package/rename/install
609 $(INSTALL_DIR) $(1)/usr/bin
610 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rename $(1)/usr/bin/
613 define Package/partx-utils/install
614 $(INSTALL_DIR) $(1)/usr/sbin
615 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partx $(1)/usr/sbin/
616 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/addpart $(1)/usr/sbin/
617 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/delpart $(1)/usr/sbin/
620 define Package/script-utils/install
621 $(INSTALL_DIR) $(1)/usr/bin
622 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/script $(1)/usr/bin/
623 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scriptreplay $(1)/usr/bin/
626 define Package/setterm/install
627 $(INSTALL_DIR) $(1)/usr/bin
628 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/setterm $(1)/usr/bin/
631 define Package/sfdisk/install
632 $(INSTALL_DIR) $(1)/usr/sbin
633 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sfdisk $(1)/usr/sbin/
636 define Package/swap-utils/install
637 $(INSTALL_DIR) $(1)/usr/sbin
638 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkswap $(1)/usr/sbin/
639 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/
642 define Package/uuidd/install
643 $(INSTALL_DIR) $(1)/usr/sbin
644 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin//uuidd $(1)/usr/sbin/
647 define Package/uuidgen/install
648 $(INSTALL_DIR) $(1)/usr/bin
649 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin//uuidgen $(1)/usr/bin/
652 define Package/wall/install
653 $(INSTALL_DIR) $(1)/usr/bin
654 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wall $(1)/usr/bin/
657 define Package/whereis/install
658 $(INSTALL_DIR) $(1)/usr/bin
659 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whereis $(1)/usr/bin/
662 define Package/wipefs/install
663 $(INSTALL_DIR) $(1)/usr/sbin
664 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wipefs $(1)/usr/sbin/
667 $(eval $(call BuildPackage,libblkid))
668 $(eval $(call BuildPackage,libfdisk))
669 $(eval $(call BuildPackage,libmount))
670 $(eval $(call BuildPackage,libsmartcols))
671 $(eval $(call BuildPackage,libuuid))
672 $(eval $(call BuildPackage,agetty))
673 $(eval $(call BuildPackage,blkdiscard))
674 $(eval $(call BuildPackage,blkid))
675 $(eval $(call BuildPackage,cal))
676 $(eval $(call BuildPackage,cfdisk))
677 $(eval $(call BuildPackage,dmesg))
678 $(eval $(call BuildPackage,fdisk))
679 $(eval $(call BuildPackage,findfs))
680 $(eval $(call BuildPackage,flock))
681 $(eval $(call BuildPackage,getopt))
682 $(eval $(call BuildPackage,hwclock))
683 $(eval $(call BuildPackage,logger))
684 $(eval $(call BuildPackage,look))
685 $(eval $(call BuildPackage,losetup))
686 $(eval $(call BuildPackage,lsblk))
687 $(eval $(call BuildPackage,mcookie))
688 $(eval $(call BuildPackage,mount-utils))
689 $(eval $(call BuildPackage,namei))
690 $(eval $(call BuildPackage,prlimit))
691 $(eval $(call BuildPackage,rename))
692 $(eval $(call BuildPackage,partx-utils))
693 $(eval $(call BuildPackage,script-utils))
694 $(eval $(call BuildPackage,setterm))
695 $(eval $(call BuildPackage,sfdisk))
696 $(eval $(call BuildPackage,swap-utils))
697 $(eval $(call BuildPackage,uuidd))
698 $(eval $(call BuildPackage,uuidgen))
699 $(eval $(call BuildPackage,wall))
700 $(eval $(call BuildPackage,whereis))
701 $(eval $(call BuildPackage,wipefs))