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
140 define Package
/blkdiscard
141 $(call Package
/util-linux
/Default
)
142 TITLE
:=discard sectors on a device
146 define Package
/blkdiscard
/description
147 The blkdiscard is used to discard device sectors. This is useful for
148 solid-state drivers
(SSDs
) and thinly-provisioned storage. Unlike fstrim
,
149 this command is used directly on the block device.
153 $(call Package
/util-linux
/Default
)
154 TITLE
:=locate
/print block device attributes
155 DEPENDS
:= +libblkid
+libuuid
159 define Package
/blkid
/description
160 The blkid program is the command-line interface to working with the libblkid
165 $(call Package
/util-linux
/Default
)
166 TITLE
:=display a calendar
167 DEPENDS
:= +libncurses
170 define Package
/cal
/description
171 cal displays a simple calendar
174 define Package
/cfdisk
175 $(call Package
/util-linux
/Default
)
176 TITLE
:=display or manipulate disk partition table
177 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
181 define Package
/cfdisk
/description
182 cfdisk is a curses-based program for partitioning any hard disk drive
186 $(call Package
/util-linux
/Default
)
187 TITLE
:=print or control the kernel ring buffer
191 define Package
/dmesg
/description
192 dmesg is used to examine or control the kernel ring buffer
196 $(call Package
/util-linux
/Default
)
197 TITLE
:=manipulate disk partition table
198 DEPENDS
:= +libblkid
+libsmartcols
202 define Package
/fdisk
/description
203 a menu-driven program for creation and manipulation of partition tables
206 define Package
/findfs
207 $(call Package
/util-linux
/Default
)
208 TITLE
:=find a filesystem by label or UUID
213 define Package
/findfs
/description
214 findfs will search the disks in the system looking for a filesystem which has
215 a label matching label or a UUID equal to uuid
219 $(call Package
/util-linux
/Default
)
220 TITLE
:=manage locks from
shell scripts
223 define Package
/flock
/description
224 manages flock locks from within
shell scripts or the command line
227 define Package
/getopt
228 $(call Package
/util-linux
/Default
)
229 TITLE
:=parse command options
(enhanced
)
232 define Package
/getopt
/description
233 getopt is used to break up
(parse
) options in command lines for easy parsing
234 by
shell procedures
, and to
check for legal options
237 define Package
/hwclock
238 $(call Package
/util-linux
/Default
)
239 TITLE
:=query or set the hardware clock
242 define Package
/hwclock
/description
243 hwclock is a tool for accessing the Hardware Clock
246 define Package
/logger
247 $(call Package
/util-linux
/Default
)
248 TITLE
:=a
shell command interface to the syslog system log module
251 define Package
/logger
/description
252 logger makes entries in the system log
, it provides a
shell command interface
253 to the syslog system log module
257 $(call Package
/util-linux
/Default
)
258 TITLE
:=display lines beginning with a given string
261 define Package
/look
/description
262 look utility displays any lines in file which contain string
265 define Package
/losetup
266 $(call Package
/util-linux
/Default
)
267 TITLE
:=set up and control loop devices
268 DEPENDS
:= +libsmartcols
271 define Package
/losetup
/description
272 losetup is used to associate loop devices with regular files or block devices
,
273 to detach loop devices and to query the status of a loop device
277 $(call Package
/util-linux
/Default
)
278 TITLE
:=list block devices
279 DEPENDS
:= +libblkid
+libmount
+libsmartcols
283 define Package
/lsblk
/description
284 lsblk lists information about
all or the specified block devices
287 define Package
/mcookie
288 $(call Package
/util-linux
/Default
)
289 TITLE
:=generate magic cookies for xauth
292 define Package
/mcookie
/description
293 mcookie generates a
128-bit random hexadecimal number for use with the X
297 define Package
/mount-utils
298 $(call Package
/util-linux
/Default
)
299 TITLE
:=related
(u
)mount utilities
300 DEPENDS
+= +libmount
+libsmartcols
303 define Package
/mount-utils
/description
304 contains
: mount
, umount
, findmnt
308 $(call Package
/util-linux
/Default
)
309 TITLE
:=follow a pathname until a terminal point is found
312 define Package
/namei
/description
313 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
314 files
, directories
, and so forth
)
317 define Package
/prlimit
318 $(call Package
/util-linux
/Default
)
319 TITLE
:=get and set process resource limits
320 DEPENDS
:= +libsmartcols
323 define Package
/prlimit
/description
324 Given a process id and one or more resources
, prlimit tries to retrieve
325 and
/or modify the limits.
328 define Package
/rename
329 $(call Package
/util-linux
/Default
)
333 define Package
/rename
/description
334 rename will rename the specified files by replacing the first occurrence of
335 expression in their name by replacement
338 define Package
/partx-utils
339 $(call Package
/util-linux
/Default
)
340 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
341 DEPENDS
:= +libblkid
+libsmartcols
345 define Package
/partx-utils
/description
346 contains partx
, addpart
, delpart
349 define Package
/script-utils
350 $(call Package
/util-linux
/Default
)
351 TITLE
:=make and replay typescript of terminal session
355 define Package
/script-utils
/description
356 contains
: script
, scriptreplay
359 define Package
/setterm
360 $(call Package
/util-linux
/Default
)
361 TITLE
:=set terminal attributes
362 DEPENDS
:= +libncurses
366 define Package
/setterm
/description
367 setterm writes to standard output a character string that will invoke the
368 specified terminal capabilities
371 define Package
/sfdisk
372 $(call Package
/util-linux
/Default
)
373 TITLE
:=partition table manipulator for Linux
377 define Package
/sfdisk
/description
378 list the size of a partition
, list the partitions on a device
, check the
379 partitions on a device and repartition a device
382 define Package
/swap-utils
383 $(call Package
/util-linux
/Default
)
384 TITLE
:=swap space management utilities
389 define Package
/swap-utils
/description
390 contains
: mkswap
, swaplabel
394 $(call Package
/util-linux
/Default
)
395 TITLE
:=UUID generation daemon
399 define Package
/uuidd
/description
400 The uuidd daemon is used by the UUID library to generate universally unique
401 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
402 guaranteed-unique fashion
, even in the face of large numbers of threads
403 running on different CPUs trying to grab UUIDs.
406 define Package
/uuidgen
407 $(call Package
/util-linux
/Default
)
408 TITLE
:=create a new UUID value
412 define Package
/uuidgen
/description
413 The uuidgen program creates
(and prints
) a new universally unique identifier
414 (UUID
) using the libuuid library. The new UUID can reasonably be considered
415 unique among
all UUIDs created on the local system
, and among UUIDs created on
416 other systems in the past and in the future.
420 $(call Package
/util-linux
/Default
)
421 TITLE
:=send a message to everybody
's terminal
425 define Package/wall/description
426 wall sends a message to everybody logged in with their mesg permission
430 define Package/whereis
431 $(call Package/util-linux/Default)
432 TITLE:=locate the binary, source, and manual page files for a command
435 define Package/whereis/description
436 whereis locates source/binary and manuals sections for specified files
439 define Package/wipefs
440 $(call Package/util-linux/Default)
441 TITLE:=wipe a signature from a device
446 define Package/wipefs/description
447 wipefs can erase filesystem, raid or partition table signatures (magic
448 strings) from the specified device to make the signature invisible for
452 define Package/libblkid/install
453 $(INSTALL_DIR) $(1)/usr/lib
454 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
457 define Package/libmount/install
458 $(INSTALL_DIR) $(1)/usr/lib
459 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
462 define Package/libsmartcols/install
463 $(INSTALL_DIR) $(1)/usr/lib
464 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
467 define Package/libuuid/install
468 $(INSTALL_DIR) $(1)/usr/lib
469 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
472 define Package/agetty/install
473 $(INSTALL_DIR) $(1)/usr/sbin
474 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
477 define Package/blkdiscard/install
478 $(INSTALL_DIR) $(1)/usr/sbin
479 $(INSTALL_BIN) $(PKG_BUILD_DIR)/blkdiscard $(1)/usr/sbin/
482 define Package/blkid/install
483 $(INSTALL_DIR) $(1)/usr/sbin
484 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
487 define Package/cal/install
488 $(INSTALL_DIR) $(1)/usr/bin
489 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
492 define Package/cfdisk/install
493 $(INSTALL_DIR) $(1)/usr/sbin
494 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
497 define Package/dmesg/install
498 $(INSTALL_DIR) $(1)/usr/sbin
499 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
502 define Package/fdisk/install
503 $(INSTALL_DIR) $(1)/usr/sbin
504 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
507 define Package/findfs/install
508 $(INSTALL_DIR) $(1)/usr/sbin
509 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
512 define Package/flock/install
513 $(INSTALL_DIR) $(1)/usr/bin
514 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
517 define Package/getopt/install
518 $(INSTALL_DIR) $(1)/usr/bin
519 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
522 define Package/hwclock/install
523 $(INSTALL_DIR) $(1)/usr/sbin
524 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
527 define Package/logger/install
528 $(INSTALL_DIR) $(1)/usr/bin
529 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
532 define Package/look/install
533 $(INSTALL_DIR) $(1)/usr/bin
534 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
537 define Package/losetup/install
538 $(INSTALL_DIR) $(1)/usr/sbin
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
542 define Package/lsblk/install
543 $(INSTALL_DIR) $(1)/usr/bin
544 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
547 define Package/mcookie/install
548 $(INSTALL_DIR) $(1)/usr/bin
549 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
552 define Package/mount-utils/install
553 $(INSTALL_DIR) $(1)/usr/bin
554 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
555 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
556 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
559 define Package/namei/install
560 $(INSTALL_DIR) $(1)/usr/bin
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
564 define Package/prlimit/install
565 $(INSTALL_DIR) $(1)/usr/bin
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/prlimit $(1)/usr/bin/
569 define Package/rename/install
570 $(INSTALL_DIR) $(1)/usr/bin
571 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
574 define Package/partx-utils/install
575 $(INSTALL_DIR) $(1)/usr/sbin
576 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
577 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
578 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
581 define Package/script-utils/install
582 $(INSTALL_DIR) $(1)/usr/bin
583 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
584 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
587 define Package/setterm/install
588 $(INSTALL_DIR) $(1)/usr/bin
589 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
592 define Package/sfdisk/install
593 $(INSTALL_DIR) $(1)/usr/sbin
594 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
597 define Package/swap-utils/install
598 $(INSTALL_DIR) $(1)/usr/sbin
599 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
600 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
603 define Package/uuidd/install
604 $(INSTALL_DIR) $(1)/usr/sbin
605 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
608 define Package/uuidgen/install
609 $(INSTALL_DIR) $(1)/usr/bin
610 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
613 define Package/wall/install
614 $(INSTALL_DIR) $(1)/usr/bin
615 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
618 define Package/whereis/install
619 $(INSTALL_DIR) $(1)/usr/bin
620 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
623 define Package/wipefs/install
624 $(INSTALL_DIR) $(1)/usr/sbin
625 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
628 $(eval $(call BuildPackage,libblkid))
629 $(eval $(call BuildPackage,libmount))
630 $(eval $(call BuildPackage,libsmartcols))
631 $(eval $(call BuildPackage,libuuid))
632 $(eval $(call BuildPackage,agetty))
633 $(eval $(call BuildPackage,blkdiscard))
634 $(eval $(call BuildPackage,blkid))
635 $(eval $(call BuildPackage,cal))
636 $(eval $(call BuildPackage,cfdisk))
637 $(eval $(call BuildPackage,dmesg))
638 $(eval $(call BuildPackage,fdisk))
639 $(eval $(call BuildPackage,findfs))
640 $(eval $(call BuildPackage,flock))
641 $(eval $(call BuildPackage,getopt))
642 $(eval $(call BuildPackage,hwclock))
643 $(eval $(call BuildPackage,logger))
644 $(eval $(call BuildPackage,look))
645 $(eval $(call BuildPackage,losetup))
646 $(eval $(call BuildPackage,lsblk))
647 $(eval $(call BuildPackage,mcookie))
648 $(eval $(call BuildPackage,mount-utils))
649 $(eval $(call BuildPackage,namei))
650 $(eval $(call BuildPackage,prlimit))
651 $(eval $(call BuildPackage,rename))
652 $(eval $(call BuildPackage,partx-utils))
653 $(eval $(call BuildPackage,script-utils))
654 $(eval $(call BuildPackage,setterm))
655 $(eval $(call BuildPackage,sfdisk))
656 $(eval $(call BuildPackage,swap-utils))
657 $(eval $(call BuildPackage,uuidd))
658 $(eval $(call BuildPackage,uuidgen))
659 $(eval $(call BuildPackage,wall))
660 $(eval $(call BuildPackage,whereis))
661 $(eval $(call BuildPackage,wipefs))