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 getopt/COPYING libblkid/COPYING libmount/COPYING Documentation/licenses/COPYING.GPLv2 Documentation/licenses/COPYING.LGPLv2.1 libuuid/COPYING Documentation/licenses/COPYING.BSD-3
23 PKG_CONFIG_DEPENDS:= \
25 CONFIG_PACKAGE_cfdisk \
26 CONFIG_PACKAGE_setterm
31 include $(INCLUDE_DIR)/package.mk
33 define Package/util-linux/Default
36 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
39 define Package/libblkid
40 $(call Package/util-linux/Default)
42 TITLE:=block device id library
47 define Package/libblkid/description
48 The libblkid library is used to identify block devices (disks) as to their
49 content (e.g. filesystem type, partitions) as well as extracting additional
50 information such as filesystem labels/volume names, partitions, unique
51 identifiers/serial numbers...
54 define Package/libfdisk
55 $(call Package/util-linux/Default)
56 DEPENDS:=+libuuid +libblkid
57 TITLE:=partition manipulating library
62 define Package/libfdisk/description
63 The libfdisk library is used for manipulating with partition tables.
66 define Package/libmount
67 $(call Package/util-linux/Default)
74 define Package/libmount/description
75 The libmount library is used to parse /etc/fstab, /etc/mtab and
76 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
79 define Package/libuuid
80 $(call Package/util-linux/Default)
81 TITLE:=DCE compatible Universally Unique Identifier library
86 define Package/libuuid/description
87 The UUID library is used to generate unique identifiers for objects
88 that may be accessible beyond the local system. This library
89 generates UUIDs compatible with those created by the Open Software
90 Foundation (OSF) Distributed Computing Environment (DCE) utility.
93 define Package/libsmartcols
94 $(call Package/util-linux/Default)
95 TITLE:=table or tree library
100 define Package/libsmartcols/description
101 The smartcols library is used to print tables and trees in a pretty way.
104 define Package/agetty
105 $(call Package/util-linux/Default)
106 TITLE:=alternative Linux getty
110 define Package/agetty/description
111 agetty opens a tty port, prompts for a login name and invokes the
115 define Package/blkdiscard
116 $(call Package/util-linux/Default)
117 TITLE:=discard sectors on a device
121 define Package/blkdiscard/description
122 The blkdiscard is used to discard device sectors. This is useful for
123 solid-state drivers (SSDs) and thinly-provisioned storage. Unlike fstrim,
124 this command is used directly on the block device.
128 $(call Package/util-linux/Default)
129 TITLE:=locate and print block device attributes
130 DEPENDS:= +libblkid +libuuid
134 define Package/blkid/description
135 The blkid program is the command-line interface to working with the libblkid
140 $(call Package/util-linux/Default)
141 TITLE:=display a calendar
142 DEPENDS:= +libncurses
145 define Package/cal/description
146 cal displays a simple calendar
149 define Package/cfdisk
150 $(call Package/util-linux/Default)
151 TITLE:=display or manipulate disk partition table
152 DEPENDS:= +libblkid +libncurses +libsmartcols +libfdisk +libmount
156 define Package/cfdisk/description
157 cfdisk is a curses-based program for partitioning any hard disk drive
161 $(call Package/util-linux/Default)
162 TITLE:=print or control the kernel ring buffer
166 define Package/dmesg/description
167 dmesg is used to examine or control the kernel ring buffer
171 $(call Package/util-linux/Default)
172 TITLE:=manipulate disk partition table
173 DEPENDS:= +libblkid +libsmartcols +libfdisk
177 define Package/fdisk/description
178 a menu-driven program for creation and manipulation of partition tables
181 define Package/findfs
182 $(call Package/util-linux/Default)
183 TITLE:=find a filesystem by label or UUID
188 define Package/findfs/description
189 findfs will search the disks in the system looking for a filesystem which has
190 a label matching label or a UUID equal to uuid
194 $(call Package/util-linux/Default)
195 TITLE:=manage locks from shell scripts
198 define Package/flock/description
199 manages flock locks from within shell scripts or the command line
202 define Package/getopt
203 $(call Package/util-linux/Default)
204 TITLE:=parse command options (enhanced)
207 define Package/getopt/description
208 getopt is used to break up (parse) options in command lines for easy parsing
209 by shell procedures, and to check for legal options
212 define Package/hwclock
213 $(call Package/util-linux/Default)
214 TITLE:=query or set the hardware clock
217 define Package/hwclock/description
218 hwclock is a tool for accessing the Hardware Clock
221 define Package/logger
222 $(call Package/util-linux/Default)
223 TITLE:=a shell command interface to the syslog system log module
226 define Package/logger/description
227 logger makes entries in the system log, it provides a shell command interface
228 to the syslog system log module
232 $(call Package/util-linux/Default)
233 TITLE:=display lines beginning with a given string
236 define Package/look/description
237 look utility displays any lines in file which contain string
240 define Package/losetup
241 $(call Package/util-linux/Default)
242 TITLE:=set up and control loop devices
243 DEPENDS:= +libsmartcols
246 define Package/losetup/description
247 losetup is used to associate loop devices with regular files or block devices,
248 to detach loop devices and to query the status of a loop device
252 $(call Package/util-linux/Default)
253 TITLE:=list block devices
254 DEPENDS:= +libblkid +libmount +libsmartcols
258 define Package/lsblk/description
259 lsblk lists information about all or the specified block devices
262 define Package/mcookie
263 $(call Package/util-linux/Default)
264 TITLE:=generate magic cookies for xauth
267 define Package/mcookie/description
268 mcookie generates a 128-bit random hexadecimal number for use with the X
272 define Package/mount-utils
273 $(call Package/util-linux/Default)
274 TITLE:=related (u)mount utilities
275 DEPENDS+= +libmount +libsmartcols
278 define Package/mount-utils/description
279 contains: mount, umount, findmnt
283 $(call Package/util-linux/Default)
284 TITLE:=follow a pathname until a terminal point is found
287 define Package/namei/description
288 namei uses its arguments as pathnames to any type of Unix file (symlinks,
289 files, directories, and so forth)
292 define Package/prlimit
293 $(call Package/util-linux/Default)
294 TITLE:=get and set process resource limits
295 DEPENDS:= +libsmartcols
298 define Package/prlimit/description
299 Given a process id and one or more resources, prlimit tries to retrieve
300 and/or modify the limits.
303 define Package/rename
304 $(call Package/util-linux/Default)
308 define Package/rename/description
309 rename will rename the specified files by replacing the first occurrence of
310 expression in their name by replacement
313 define Package/partx-utils
314 $(call Package/util-linux/Default)
315 TITLE:=inform kernel about the presence and numbering of on-disk partitions
316 DEPENDS:= +libblkid +libsmartcols
320 define Package/partx-utils/description
321 contains partx, addpart, delpart
324 define Package/script-utils
325 $(call Package/util-linux/Default)
326 TITLE:=make and replay typescript of terminal session
330 define Package/script-utils/description
331 contains: script, scriptreplay
334 define Package/setterm
335 $(call Package/util-linux/Default)
336 TITLE:=set terminal attributes
337 DEPENDS:= +libncurses
341 define Package/setterm/description
342 setterm writes to standard output a character string that will invoke the
343 specified terminal capabilities
346 define Package/sfdisk
347 $(call Package/util-linux/Default)
348 TITLE:=partition table manipulator for Linux
350 DEPENDS:= +libblkid +libfdisk +libsmartcols
353 define Package/sfdisk/description
354 list the size of a partition, list the partitions on a device, check the
355 partitions on a device and repartition a device
358 define Package/swap-utils
359 $(call Package/util-linux/Default)
360 TITLE:=swap space management utilities
365 define Package/swap-utils/description
366 contains: mkswap, swaplabel
370 $(call Package/util-linux/Default)
371 TITLE:=UUID generation daemon
375 define Package/uuidd/description
376 The uuidd daemon is used by the UUID library to generate universally unique
377 identifiers (UUIDs), especially time-based UUIDs, in a secure and
378 guaranteed-unique fashion, even in the face of large numbers of threads
379 running on different CPUs trying to grab UUIDs.
382 define Package/uuidgen
383 $(call Package/util-linux/Default)
384 TITLE:=create a new UUID value
388 define Package/uuidgen/description
389 The uuidgen program creates (and prints) a new universally unique identifier
390 (UUID) using the libuuid library. The new UUID can reasonably be considered
391 unique among all UUIDs created on the local system, and among UUIDs created on
392 other systems in the past and in the future.
396 $(call Package/util-linux/Default)
397 TITLE:=send a message to everybody's terminal
401 define Package/wall/description
402 wall sends a message to everybody logged in with their mesg permission
406 define Package/whereis
407 $(call Package/util-linux/Default)
408 TITLE:=locate the binary, source, and manual page files for a command
411 define Package/whereis/description
412 whereis locates source/binary and manuals sections for specified files
415 define Package/wipefs
416 $(call Package/util-linux/Default)
417 TITLE:=wipe a signature from a device
422 define Package/wipefs/description
423 wipefs can erase filesystem, raid or partition table signatures (magic
424 strings) from the specified device to make the signature invisible for
429 --disable-use-tty-group \
436 $(if $(CONFIG_PACKAGE_cal)$(CONFIG_PACKAGE_cfdisk)$(CONFIG_PACKAGE_setterm),--with-ncurses,--without-ncurses)
438 TARGET_CFLAGS += $(FPIC) -std=gnu99
440 define Build/InstallDev
441 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
442 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig
443 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig
444 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig
445 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig
446 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig
448 $(INSTALL_DIR) $(1)/usr/include/blkid
449 $(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid
450 $(INSTALL_DIR) $(1)/usr/include/libfdisk
451 $(CP) $(PKG_INSTALL_DIR)/usr/include/libfdisk/libfdisk.h $(1)/usr/include/libfdisk
452 $(INSTALL_DIR) $(1)/usr/include/libmount
453 $(CP) $(PKG_INSTALL_DIR)/usr/include/libmount/libmount.h $(1)/usr/include/libmount
454 $(INSTALL_DIR) $(1)/usr/include/uuid
455 $(CP) $(PKG_INSTALL_DIR)/usr/include/uuid/uuid.h $(1)/usr/include/uuid
456 $(INSTALL_DIR) $(1)/usr/include/libsmartcols
457 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
459 $(INSTALL_DIR) $(1)/usr/lib
460 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libblkid.{a,so*} $(1)/usr/lib
461 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfdisk.{a,so*} $(1)/usr/lib
462 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libmount.{a,so*} $(1)/usr/lib
463 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libuuid.{a,so*} $(1)/usr/lib
464 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libsmartcols.{a,so*} $(1)/usr/lib
468 define Package/libfdisk/install
469 $(INSTALL_DIR) $(1)/usr/lib
470 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib/
473 define Package/libblkid/install
474 $(INSTALL_DIR) $(1)/usr/lib
475 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib/
478 define Package/libmount/install
479 $(INSTALL_DIR) $(1)/usr/lib
480 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib/
483 define Package/libsmartcols/install
484 $(INSTALL_DIR) $(1)/usr/lib
485 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib/
488 define Package/libuuid/install
489 $(INSTALL_DIR) $(1)/usr/lib
490 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib/
493 define Package/agetty/install
494 $(INSTALL_DIR) $(1)/usr/sbin
495 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/agetty $(1)/usr/sbin/
498 define Package/blkdiscard/install
499 $(INSTALL_DIR) $(1)/usr/sbin
500 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkdiscard $(1)/usr/sbin/
503 define Package/blkid/install
504 $(INSTALL_DIR) $(1)/usr/sbin
505 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
508 define Package/cal/install
509 $(INSTALL_DIR) $(1)/usr/bin
510 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cal $(1)/usr/bin/
513 define Package/cfdisk/install
514 $(INSTALL_DIR) $(1)/usr/sbin
515 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cfdisk $(1)/usr/sbin/
518 define Package/dmesg/install
519 $(INSTALL_DIR) $(1)/usr/bin
520 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmesg $(1)/usr/bin/
523 define Package/fdisk/install
524 $(INSTALL_DIR) $(1)/usr/sbin
525 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fdisk $(1)/usr/sbin/
528 define Package/findfs/install
529 $(INSTALL_DIR) $(1)/usr/sbin
530 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/findfs $(1)/usr/sbin/
533 define Package/flock/install
534 $(INSTALL_DIR) $(1)/usr/bin
535 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/flock $(1)/usr/bin/
538 define Package/getopt/install
539 $(INSTALL_DIR) $(1)/usr/bin
540 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getopt $(1)/usr/bin/
543 define Package/hwclock/install
544 $(INSTALL_DIR) $(1)/usr/sbin
545 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hwclock $(1)/usr/sbin/
548 define Package/logger/install
549 $(INSTALL_DIR) $(1)/usr/bin
550 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/
553 define Package/look/install
554 $(INSTALL_DIR) $(1)/usr/bin
555 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/look $(1)/usr/bin/
558 define Package/losetup/install
559 $(INSTALL_DIR) $(1)/usr/sbin
560 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/losetup $(1)/usr/sbin/
563 define Package/lsblk/install
564 $(INSTALL_DIR) $(1)/usr/bin
565 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsblk $(1)/usr/bin/
568 define Package/mcookie/install
569 $(INSTALL_DIR) $(1)/usr/bin
570 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mcookie $(1)/usr/bin/
573 define Package/mount-utils/install
574 $(INSTALL_DIR) $(1)/usr/bin
575 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{u,}mount $(1)/usr/bin/
576 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mountpoint $(1)/usr/bin/
577 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/findmnt $(1)/usr/bin/
580 define Package/namei/install
581 $(INSTALL_DIR) $(1)/usr/bin
582 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/namei $(1)/usr/bin/
585 define Package/prlimit/install
586 $(INSTALL_DIR) $(1)/usr/bin
587 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prlimit $(1)/usr/bin/
590 define Package/rename/install
591 $(INSTALL_DIR) $(1)/usr/bin
592 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rename $(1)/usr/bin/
595 define Package/partx-utils/install
596 $(INSTALL_DIR) $(1)/usr/sbin
597 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partx $(1)/usr/sbin/
598 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/addpart $(1)/usr/sbin/
599 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/delpart $(1)/usr/sbin/
602 define Package/script-utils/install
603 $(INSTALL_DIR) $(1)/usr/bin
604 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/script $(1)/usr/bin/
605 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scriptreplay $(1)/usr/bin/
608 define Package/setterm/install
609 $(INSTALL_DIR) $(1)/usr/bin
610 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/setterm $(1)/usr/bin/
613 define Package/sfdisk/install
614 $(INSTALL_DIR) $(1)/usr/sbin
615 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sfdisk $(1)/usr/sbin/
618 define Package/swap-utils/install
619 $(INSTALL_DIR) $(1)/usr/sbin
620 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkswap $(1)/usr/sbin/
621 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/
624 define Package/uuidd/install
625 $(INSTALL_DIR) $(1)/usr/sbin
626 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin//uuidd $(1)/usr/sbin/
629 define Package/uuidgen/install
630 $(INSTALL_DIR) $(1)/usr/bin
631 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin//uuidgen $(1)/usr/bin/
634 define Package/wall/install
635 $(INSTALL_DIR) $(1)/usr/bin
636 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wall $(1)/usr/bin/
639 define Package/whereis/install
640 $(INSTALL_DIR) $(1)/usr/bin
641 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whereis $(1)/usr/bin/
644 define Package/wipefs/install
645 $(INSTALL_DIR) $(1)/usr/sbin
646 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wipefs $(1)/usr/sbin/
649 $(eval $(call BuildPackage,libblkid))
650 $(eval $(call BuildPackage,libfdisk))
651 $(eval $(call BuildPackage,libmount))
652 $(eval $(call BuildPackage,libsmartcols))
653 $(eval $(call BuildPackage,libuuid))
654 $(eval $(call BuildPackage,agetty))
655 $(eval $(call BuildPackage,blkdiscard))
656 $(eval $(call BuildPackage,blkid))
657 $(eval $(call BuildPackage,cal))
658 $(eval $(call BuildPackage,cfdisk))
659 $(eval $(call BuildPackage,dmesg))
660 $(eval $(call BuildPackage,fdisk))
661 $(eval $(call BuildPackage,findfs))
662 $(eval $(call BuildPackage,flock))
663 $(eval $(call BuildPackage,getopt))
664 $(eval $(call BuildPackage,hwclock))
665 $(eval $(call BuildPackage,logger))
666 $(eval $(call BuildPackage,look))
667 $(eval $(call BuildPackage,losetup))
668 $(eval $(call BuildPackage,lsblk))
669 $(eval $(call BuildPackage,mcookie))
670 $(eval $(call BuildPackage,mount-utils))
671 $(eval $(call BuildPackage,namei))
672 $(eval $(call BuildPackage,prlimit))
673 $(eval $(call BuildPackage,rename))
674 $(eval $(call BuildPackage,partx-utils))
675 $(eval $(call BuildPackage,script-utils))
676 $(eval $(call BuildPackage,setterm))
677 $(eval $(call BuildPackage,sfdisk))
678 $(eval $(call BuildPackage,swap-utils))
679 $(eval $(call BuildPackage,uuidd))
680 $(eval $(call BuildPackage,uuidgen))
681 $(eval $(call BuildPackage,wall))
682 $(eval $(call BuildPackage,whereis))
683 $(eval $(call BuildPackage,wipefs))