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.30
16 PKG_HASH
:=7b5be5489e9b5b7177832836467aba1c87bf0e9bcbcb5a6f35d76cd4782589dc
17 PKG_CPE_ID
:=cpe
:/a
:kernel
:util-linux
20 PKG_LICENSE_FILES
:= COPYING \
24 Documentation
/licenses
/COPYING.GPLv2 \
25 Documentation
/licenses
/COPYING.LGPLv2.1 \
27 Documentation
/licenses
/COPYING.BSD-3
34 DISABLE_NLS
:=--disable-nls
36 include $(INCLUDE_DIR
)/package.mk
38 define Package
/util-linux
/Default
42 URL
:=http
://www.kernel.org
/pub
/linux
/utils
/util-linux
/
45 define Package
/libblkid
46 $(call Package
/util-linux
/Default
)
48 TITLE
:=block device id library
53 define Package
/libblkid
/description
54 The libblkid library is used to identify block devices
(disks
) as to their
55 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
56 information such
as filesystem labels
/volume names
, partitions
, unique
57 identifiers
/serial numbers...
60 define Package
/libfdisk
61 $(call Package
/util-linux
/Default
)
62 DEPENDS
:=+libuuid
+libblkid
63 TITLE
:=partition manipulating library
68 define Package
/libfdisk
/description
69 The libfdisk library is used for manipulating with partition tables.
72 define Package
/libmount
73 $(call Package
/util-linux
/Default
)
80 define Package
/libmount
/description
81 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
82 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
85 define Package
/libuuid
86 $(call Package
/util-linux
/Default
)
87 TITLE
:=DCE compatible Universally Unique Identifier library
92 define Package
/libuuid
/description
93 The UUID library is used to generate unique identifiers for objects
94 that may be accessible beyond the local system. This library
95 generates UUIDs compatible with those created by the Open Software
96 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
99 define Package
/libsmartcols
100 $(call Package
/util-linux
/Default
)
101 TITLE
:=table or tree library
106 define Package
/libsmartcols
/description
107 The smartcols library is used to
print tables and trees in a pretty way.
110 define Package
/agetty
111 $(call Package
/util-linux
/Default
)
112 TITLE
:=alternative Linux getty
116 define Package
/agetty
/description
117 agetty opens a tty port
, prompts for a login name and invokes the
121 define Package
/blkdiscard
122 $(call Package
/util-linux
/Default
)
123 TITLE
:=discard sectors on a device
127 define Package
/blkdiscard
/description
128 The blkdiscard is used to discard device sectors. This is useful for
129 solid-state drivers
(SSDs
) and thinly-provisioned storage. Unlike fstrim
,
130 this command is used directly on the block device.
134 $(call Package
/util-linux
/Default
)
135 TITLE
:=locate and
print block device attributes
136 DEPENDS
:= +libblkid
+libuuid
140 define Package
/blkid
/description
141 The blkid program is the command-line interface to working with the libblkid
146 $(call Package
/util-linux
/Default
)
147 TITLE
:=display a calendar
148 DEPENDS
:= +libncurses
151 define Package
/cal
/description
152 cal displays a simple calendar
155 define Package
/cfdisk
156 $(call Package
/util-linux
/Default
)
157 TITLE
:=display or manipulate disk partition table
158 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
+libfdisk
+libmount
162 define Package
/cfdisk
/description
163 cfdisk is a curses-based program for partitioning any hard disk drive
167 $(call Package
/util-linux
/Default
)
168 TITLE
:=print or control the kernel ring buffer
169 DEPENDS
:= +libncursesw
172 define Package
/dmesg
/description
173 dmesg is used to examine or control the kernel ring buffer
177 $(call Package
/util-linux
/Default
)
178 TITLE
:=manipulate disk partition table
179 DEPENDS
:= +libblkid
+libsmartcols
+libfdisk
+libncursesw
183 define Package
/fdisk
/description
184 a menu-driven program for creation and manipulation of partition tables
187 define Package
/findfs
188 $(call Package
/util-linux
/Default
)
189 TITLE
:=find a filesystem by label or UUID
194 define Package
/findfs
/description
195 findfs will search the disks in the system looking for a filesystem which has
196 a label matching label or a UUID equal to uuid
200 $(call Package
/util-linux
/Default
)
201 TITLE
:=manage locks from
shell scripts
204 define Package
/flock
/description
205 manages flock locks from within
shell scripts or the command line
208 define Package
/getopt
209 $(call Package
/util-linux
/Default
)
210 TITLE
:=parse command options
(enhanced
)
213 define Package
/getopt
/description
214 getopt is used to break up
(parse
) options in command lines for easy parsing
215 by
shell procedures
, and to
check for legal options
218 define Package
/hwclock
219 $(call Package
/util-linux
/Default
)
220 TITLE
:=query or set the hardware clock
223 define Package
/hwclock
/description
224 hwclock is a tool for accessing the Hardware Clock
227 define Package
/logger
228 $(call Package
/util-linux
/Default
)
229 TITLE
:=a
shell command interface to the syslog system log module
232 define Package
/logger
/description
233 logger makes entries in the system log
, it provides a
shell command interface
234 to the syslog system log module
238 $(call Package
/util-linux
/Default
)
239 TITLE
:=display lines beginning with a given string
242 define Package
/look
/description
243 look utility displays any lines in file which contain string
246 define Package
/losetup
247 $(call Package
/util-linux
/Default
)
248 TITLE
:=set up and control loop devices
249 DEPENDS
:= +libsmartcols
252 define Package
/losetup
/description
253 losetup is used to associate loop devices with regular files or block devices
,
254 to detach loop devices and to query the status of a loop device
258 $(call Package
/util-linux
/Default
)
259 TITLE
:=list block devices
260 DEPENDS
:= +libblkid
+libmount
+libsmartcols
264 define Package
/lsblk
/description
265 lsblk lists information about
all or the specified block devices
268 define Package
/mcookie
269 $(call Package
/util-linux
/Default
)
270 TITLE
:=generate magic cookies for xauth
273 define Package
/mcookie
/description
274 mcookie generates a
128-bit random hexadecimal number for use with the X
278 define Package
/mount-utils
279 $(call Package
/util-linux
/Default
)
280 TITLE
:=related
(u
)mount utilities
281 DEPENDS
+= +libmount
+libsmartcols
284 define Package
/mount-utils
/description
285 contains
: mount
, umount
, findmnt
289 $(call Package
/util-linux
/Default
)
290 TITLE
:=follow a pathname until a terminal point is found
293 define Package
/namei
/description
294 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
295 files
, directories
, and so forth
)
298 define Package
/prlimit
299 $(call Package
/util-linux
/Default
)
300 TITLE
:=get and set process resource limits
301 DEPENDS
:= +libsmartcols
304 define Package
/prlimit
/description
305 Given a process id and one or more resources
, prlimit tries to retrieve
306 and
/or modify the limits.
309 define Package
/rename
310 $(call Package
/util-linux
/Default
)
314 define Package
/rename
/description
315 rename will rename the specified files by replacing the first occurrence of
316 expression in their name by replacement
319 define Package
/partx-utils
320 $(call Package
/util-linux
/Default
)
321 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
322 DEPENDS
:= +libblkid
+libsmartcols
326 define Package
/partx-utils
/description
327 contains partx
, addpart
, delpart
330 define Package
/script-utils
331 $(call Package
/util-linux
/Default
)
332 TITLE
:=make and replay typescript of terminal session
336 define Package
/script-utils
/description
337 contains
: script
, scriptreplay
340 define Package
/setterm
341 $(call Package
/util-linux
/Default
)
342 TITLE
:=set terminal attributes
343 DEPENDS
:= +libncurses
347 define Package
/setterm
/description
348 setterm writes to standard output a character string that will invoke the
349 specified terminal capabilities
352 define Package
/sfdisk
353 $(call Package
/util-linux
/Default
)
354 TITLE
:=partition table manipulator for Linux
356 DEPENDS
:= +libblkid
+libfdisk
+libsmartcols
+libncursesw
359 define Package
/sfdisk
/description
360 list the size of a partition
, list the partitions on a device
, check the
361 partitions on a device and repartition a device
364 define Package
/swap-utils
365 $(call Package
/util-linux
/Default
)
366 TITLE
:=swap space management utilities
371 define Package
/swap-utils
/description
372 contains
: mkswap
, swaplabel
376 $(call Package
/util-linux
/Default
)
377 TITLE
:=UUID generation daemon
381 define Package
/uuidd
/description
382 The uuidd daemon is used by the UUID library to generate universally unique
383 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
384 guaranteed-unique fashion
, even in the face of large numbers of threads
385 running on different CPUs trying to grab UUIDs.
388 define Package
/uuidgen
389 $(call Package
/util-linux
/Default
)
390 TITLE
:=create a new UUID value
394 define Package
/uuidgen
/description
395 The uuidgen program creates
(and prints
) a new universally unique identifier
396 (UUID
) using the libuuid library. The new UUID can reasonably be considered
397 unique among
all UUIDs created on the local system
, and among UUIDs created on
398 other systems in the past and in the future.
402 $(call Package
/util-linux
/Default
)
403 TITLE
:=send a message to everybody
's terminal
407 define Package/wall/description
408 wall sends a message to everybody logged in with their mesg permission
412 define Package/whereis
413 $(call Package/util-linux/Default)
414 TITLE:=locate the binary, source, and manual page files for a command
417 define Package/whereis/description
418 whereis locates source/binary and manuals sections for specified files
421 define Package/wipefs
422 $(call Package/util-linux/Default)
423 TITLE:=wipe a signature from a device
428 define Package/wipefs/description
429 wipefs can erase filesystem, raid or partition table signatures (magic
430 strings) from the specified device to make the signature invisible for
435 --disable-use-tty-group \
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))