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.25
16 PKG_MD5SUM:=cab3d7be354000f629bc601238b629b3
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
30 include $(INCLUDE_DIR)/package.mk
32 define Package/util-linux/Default
35 URL:=http://www.kernel.org/pub/linux/utils/util-linux/
44 $(if $(CONFIG_PACKAGE_cal)$(CONFIG_PACKAGE_cfdisk)$(CONFIG_PACKAGE_setterm),--with-ncurses,--without-ncurses)
46 TARGET_CFLAGS += $(FPIC) -std=gnu99
48 define Build/InstallDev
49 $(MAKE) -C $(PKG_BUILD_DIR) \
52 installdirs install-data
54 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
55 $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
56 $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
57 $(CP) $(PKG_BUILD_DIR)/libsmartcols/smartcols.pc $(1)/usr/lib/pkgconfig
58 $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
60 $(INSTALL_DIR) $(1)/usr/include/blkid
61 $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
62 $(INSTALL_DIR) $(1)/usr/include/libmount
63 $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
64 $(INSTALL_DIR) $(1)/usr/include/uuid
65 $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
66 $(INSTALL_DIR) $(1)/usr/include/smartcols
67 $(CP) $(PKG_BUILD_DIR)/libsmartcols/src/libsmartcols.h $(1)/usr/include/smartcols
69 $(INSTALL_DIR) $(1)/usr/lib
70 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.{a,so*} $(1)/usr/lib
71 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.{a,so*} $(1)/usr/lib
72 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.{a,so*} $(1)/usr/lib
73 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.{a,so*} $(1)/usr/lib
76 define Package/libblkid
77 $(call Package/util-linux/Default)
79 TITLE:=block device id library
84 define Package/libblkid/description
85 The libblkid library is used to identify block devices (disks) as to their
86 content (e.g. filesystem type, partitions) as well as extracting additional
87 information such as filesystem labels/volume names, partitions, unique
88 identifiers/serial numbers...
91 define Package/libmount
92 $(call Package/util-linux/Default)
99 define Package/libmount/description
100 The libmount library is used to parse /etc/fstab, /etc/mtab and
101 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
104 define Package/libuuid
105 $(call Package/util-linux/Default)
106 TITLE:=DCE compatible Universally Unique Identifier library
111 define Package/libuuid/description
112 The UUID library is used to generate unique identifiers for objects
113 that may be accessible beyond the local system. This library
114 generates UUIDs compatible with those created by the Open Software
115 Foundation (OSF) Distributed Computing Environment (DCE) utility.
118 define Package/libsmartcols
119 $(call Package/util-linux/Default)
120 TITLE:=table or tree library
125 define Package/libsmartcols/description
126 The smartcols library is used to print tables and trees in a pretty way.
129 define Package/agetty
130 $(call Package/util-linux/Default)
131 TITLE:=alternative Linux getty
135 define Package/agetty/description
136 agetty opens a tty port, prompts for a login name and invokes the
141 $(call Package/util-linux/Default)
142 TITLE:=locate/print block device attributes
143 DEPENDS:= +libblkid +libuuid
147 define Package/blkid/description
148 The blkid program is the command-line interface to working with the libblkid
153 $(call Package/util-linux/Default)
154 TITLE:=display a calendar
155 DEPENDS:= +libncurses
158 define Package/cal/description
159 cal displays a simple calendar
162 define Package/cfdisk
163 $(call Package/util-linux/Default)
164 TITLE:=display or manipulate disk partition table
165 DEPENDS:= +libblkid +libncurses +libsmartcols
169 define Package/cfdisk/description
170 cfdisk is a curses-based program for partitioning any hard disk drive
174 $(call Package/util-linux/Default)
175 TITLE:=print or control the kernel ring buffer
179 define Package/dmesg/description
180 dmesg is used to examine or control the kernel ring buffer
184 $(call Package/util-linux/Default)
185 TITLE:=manipulate disk partition table
186 DEPENDS:= +libblkid +libsmartcols
190 define Package/fdisk/description
191 a menu-driven program for creation and manipulation of partition tables
194 define Package/findfs
195 $(call Package/util-linux/Default)
196 TITLE:=find a filesystem by label or UUID
201 define Package/findfs/description
202 findfs will search the disks in the system looking for a filesystem which has
203 a label matching label or a UUID equal to uuid
207 $(call Package/util-linux/Default)
208 TITLE:=manage locks from shell scripts
211 define Package/flock/description
212 manages flock locks from within shell scripts or the command line
215 define Package/getopt
216 $(call Package/util-linux/Default)
217 TITLE:=parse command options (enhanced)
220 define Package/getopt/description
221 getopt is used to break up (parse) options in command lines for easy parsing
222 by shell procedures, and to check for legal options
225 define Package/hwclock
226 $(call Package/util-linux/Default)
227 TITLE:=query or set the hardware clock
230 define Package/hwclock/description
231 hwclock is a tool for accessing the Hardware Clock
234 define Package/logger
235 $(call Package/util-linux/Default)
236 TITLE:=a shell command interface to the syslog system log module
239 define Package/logger/description
240 logger makes entries in the system log, it provides a shell command interface
241 to the syslog system log module
245 $(call Package/util-linux/Default)
246 TITLE:=display lines beginning with a given string
249 define Package/look/description
250 look utility displays any lines in file which contain string
253 define Package/losetup
254 $(call Package/util-linux/Default)
255 TITLE:=set up and control loop devices
256 DEPENDS:= +libsmartcols
259 define Package/losetup/description
260 losetup is used to associate loop devices with regular files or block devices,
261 to detach loop devices and to query the status of a loop device
265 $(call Package/util-linux/Default)
266 TITLE:=list block devices
267 DEPENDS:= +libblkid +libmount +libsmartcols
271 define Package/lsblk/description
272 lsblk lists information about all or the specified block devices
275 define Package/mcookie
276 $(call Package/util-linux/Default)
277 TITLE:=generate magic cookies for xauth
280 define Package/mcookie/description
281 mcookie generates a 128-bit random hexadecimal number for use with the X
285 define Package/mount-utils
286 $(call Package/util-linux/Default)
287 TITLE:=related (u)mount utilities
288 DEPENDS+= +libmount +libsmartcols
291 define Package/mount-utils/description
292 contains: mount, umount, findmnt
296 $(call Package/util-linux/Default)
297 TITLE:=follow a pathname until a terminal point is found
300 define Package/namei/description
301 namei uses its arguments as pathnames to any type of Unix file (symlinks,
302 files, directories, and so forth)
305 define Package/rename
306 $(call Package/util-linux/Default)
310 define Package/rename/description
311 rename will rename the specified files by replacing the first occurrence of
312 expression in their name by replacement
315 define Package/partx-utils
316 $(call Package/util-linux/Default)
317 TITLE:=inform kernel about the presence and numbering of on-disk partitions
318 DEPENDS:= +libblkid +libsmartcols
322 define Package/partx-utils/description
323 contains partx, addpart, delpart
326 define Package/script-utils
327 $(call Package/util-linux/Default)
328 TITLE:=make and replay typescript of terminal session
332 define Package/script-utils/description
333 contains: script, scriptreplay
336 define Package/setterm
337 $(call Package/util-linux/Default)
338 TITLE:=set terminal attributes
339 DEPENDS:= +libncurses
343 define Package/setterm/description
344 setterm writes to standard output a character string that will invoke the
345 specified terminal capabilities
348 define Package/sfdisk
349 $(call Package/util-linux/Default)
350 TITLE:=partition table manipulator for Linux
354 define Package/sfdisk/description
355 list the size of a partition, list the partitions on a device, check the
356 partitions on a device and repartition a device
359 define Package/swap-utils
360 $(call Package/util-linux/Default)
361 TITLE:=swap space management utilities
366 define Package/swap-utils/description
367 contains: mkswap, swaplabel
371 $(call Package/util-linux/Default)
372 TITLE:=UUID generation daemon
376 define Package/uuidd/description
377 The uuidd daemon is used by the UUID library to generate universally unique
378 identifiers (UUIDs), especially time-based UUIDs, in a secure and
379 guaranteed-unique fashion, even in the face of large numbers of threads
380 running on different CPUs trying to grab UUIDs.
383 define Package/uuidgen
384 $(call Package/util-linux/Default)
385 TITLE:=create a new UUID value
389 define Package/uuidgen/description
390 The uuidgen program creates (and prints) a new universally unique identifier
391 (UUID) using the libuuid library. The new UUID can reasonably be considered
392 unique among all UUIDs created on the local system, and among UUIDs created on
393 other systems in the past and in the future.
397 $(call Package/util-linux/Default)
398 TITLE:=send a message to everybody's terminal
402 define Package/wall/description
403 wall sends a message to everybody logged in with their mesg permission
407 define Package/whereis
408 $(call Package/util-linux/Default)
409 TITLE:=locate the binary, source, and manual page files for a command
412 define Package/whereis/description
413 whereis locates source/binary and manuals sections for specified files
416 define Package/wipefs
417 $(call Package/util-linux/Default)
418 TITLE:=wipe a signature from a device
423 define Package/wipefs/description
424 wipefs can erase filesystem, raid or partition table signatures (magic
425 strings) from the specified device to make the signature invisible for
429 define Package/libblkid/install
430 $(INSTALL_DIR) $(1)/usr/lib
431 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
434 define Package/libmount/install
435 $(INSTALL_DIR) $(1)/usr/lib
436 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
439 define Package/libsmartcols/install
440 $(INSTALL_DIR) $(1)/usr/lib
441 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
444 define Package/libuuid/install
445 $(INSTALL_DIR) $(1)/usr/lib
446 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
449 define Package/agetty/install
450 $(INSTALL_DIR) $(1)/usr/sbin
451 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
454 define Package/blkid/install
455 $(INSTALL_DIR) $(1)/usr/sbin
456 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
459 define Package/cal/install
460 $(INSTALL_DIR) $(1)/usr/bin
461 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
464 define Package/cfdisk/install
465 $(INSTALL_DIR) $(1)/usr/sbin
466 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
469 define Package/dmesg/install
470 $(INSTALL_DIR) $(1)/usr/sbin
471 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
474 define Package/fdisk/install
475 $(INSTALL_DIR) $(1)/usr/sbin
476 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
479 define Package/findfs/install
480 $(INSTALL_DIR) $(1)/usr/sbin
481 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
484 define Package/flock/install
485 $(INSTALL_DIR) $(1)/usr/bin
486 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
489 define Package/getopt/install
490 $(INSTALL_DIR) $(1)/usr/bin
491 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
494 define Package/hwclock/install
495 $(INSTALL_DIR) $(1)/usr/sbin
496 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
499 define Package/logger/install
500 $(INSTALL_DIR) $(1)/usr/bin
501 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
504 define Package/look/install
505 $(INSTALL_DIR) $(1)/usr/bin
506 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
509 define Package/losetup/install
510 $(INSTALL_DIR) $(1)/usr/sbin
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
514 define Package/lsblk/install
515 $(INSTALL_DIR) $(1)/usr/bin
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
519 define Package/mcookie/install
520 $(INSTALL_DIR) $(1)/usr/bin
521 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
524 define Package/mount-utils/install
525 $(INSTALL_DIR) $(1)/usr/bin
526 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
527 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
528 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
531 define Package/namei/install
532 $(INSTALL_DIR) $(1)/usr/bin
533 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
536 define Package/rename/install
537 $(INSTALL_DIR) $(1)/usr/bin
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
541 define Package/partx-utils/install
542 $(INSTALL_DIR) $(1)/usr/sbin
543 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
544 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
545 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
548 define Package/script-utils/install
549 $(INSTALL_DIR) $(1)/usr/bin
550 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
551 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
554 define Package/setterm/install
555 $(INSTALL_DIR) $(1)/usr/bin
556 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
559 define Package/sfdisk/install
560 $(INSTALL_DIR) $(1)/usr/sbin
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
564 define Package/swap-utils/install
565 $(INSTALL_DIR) $(1)/usr/sbin
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
567 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
570 define Package/uuidd/install
571 $(INSTALL_DIR) $(1)/usr/sbin
572 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
575 define Package/uuidgen/install
576 $(INSTALL_DIR) $(1)/usr/bin
577 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
580 define Package/wall/install
581 $(INSTALL_DIR) $(1)/usr/bin
582 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
585 define Package/whereis/install
586 $(INSTALL_DIR) $(1)/usr/bin
587 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
590 define Package/wipefs/install
591 $(INSTALL_DIR) $(1)/usr/sbin
592 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
595 $(eval $(call BuildPackage,libblkid))
596 $(eval $(call BuildPackage,libmount))
597 $(eval $(call BuildPackage,libsmartcols))
598 $(eval $(call BuildPackage,libuuid))
599 $(eval $(call BuildPackage,agetty))
600 $(eval $(call BuildPackage,blkid))
601 $(eval $(call BuildPackage,cal))
602 $(eval $(call BuildPackage,cfdisk))
603 $(eval $(call BuildPackage,dmesg))
604 $(eval $(call BuildPackage,fdisk))
605 $(eval $(call BuildPackage,findfs))
606 $(eval $(call BuildPackage,flock))
607 $(eval $(call BuildPackage,getopt))
608 $(eval $(call BuildPackage,hwclock))
609 $(eval $(call BuildPackage,logger))
610 $(eval $(call BuildPackage,look))
611 $(eval $(call BuildPackage,losetup))
612 $(eval $(call BuildPackage,lsblk))
613 $(eval $(call BuildPackage,mcookie))
614 $(eval $(call BuildPackage,mount-utils))
615 $(eval $(call BuildPackage,namei))
616 $(eval $(call BuildPackage,rename))
617 $(eval $(call BuildPackage,partx-utils))
618 $(eval $(call BuildPackage,script-utils))
619 $(eval $(call BuildPackage,setterm))
620 $(eval $(call BuildPackage,sfdisk))
621 $(eval $(call BuildPackage,swap-utils))
622 $(eval $(call BuildPackage,uuidd))
623 $(eval $(call BuildPackage,uuidgen))
624 $(eval $(call BuildPackage,wall))
625 $(eval $(call BuildPackage,whereis))
626 $(eval $(call BuildPackage,wipefs))