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
:=1be4363a91ac428c9e43fc04dc6d2c66a19ec1e36f1105bd4b481540be13b841
19 PKG_LICENSE_FILES
:= COPYING \
23 Documentation
/licenses
/COPYING.GPLv2 \
24 Documentation
/licenses
/COPYING.LGPLv2.1 \
26 Documentation
/licenses
/COPYING.BSD-3
33 include $(INCLUDE_DIR
)/package.mk
35 define Package
/util-linux
/Default
39 URL
:=http
://www.kernel.org
/pub
/linux
/utils
/util-linux
/
42 define Package
/libblkid
43 $(call Package
/util-linux
/Default
)
45 TITLE
:=block device id library
50 define Package
/libblkid
/description
51 The libblkid library is used to identify block devices
(disks
) as to their
52 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
53 information such
as filesystem labels
/volume names
, partitions
, unique
54 identifiers
/serial numbers...
57 define Package
/libfdisk
58 $(call Package
/util-linux
/Default
)
59 DEPENDS
:=+libuuid
+libblkid
60 TITLE
:=partition manipulating library
65 define Package
/libfdisk
/description
66 The libfdisk library is used for manipulating with partition tables.
69 define Package
/libmount
70 $(call Package
/util-linux
/Default
)
77 define Package
/libmount
/description
78 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
79 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
82 define Package
/libuuid
83 $(call Package
/util-linux
/Default
)
84 TITLE
:=DCE compatible Universally Unique Identifier library
89 define Package
/libuuid
/description
90 The UUID library is used to generate unique identifiers for objects
91 that may be accessible beyond the local system. This library
92 generates UUIDs compatible with those created by the Open Software
93 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
96 define Package
/libsmartcols
97 $(call Package
/util-linux
/Default
)
98 TITLE
:=table or tree library
103 define Package
/libsmartcols
/description
104 The smartcols library is used to
print tables and trees in a pretty way.
107 define Package
/agetty
108 $(call Package
/util-linux
/Default
)
109 TITLE
:=alternative Linux getty
113 define Package
/agetty
/description
114 agetty opens a tty port
, prompts for a login name and invokes the
118 define Package
/blkdiscard
119 $(call Package
/util-linux
/Default
)
120 TITLE
:=discard sectors on a device
124 define Package
/blkdiscard
/description
125 The blkdiscard is used to discard device sectors. This is useful for
126 solid-state drivers
(SSDs
) and thinly-provisioned storage. Unlike fstrim
,
127 this command is used directly on the block device.
131 $(call Package
/util-linux
/Default
)
132 TITLE
:=locate and
print block device attributes
133 DEPENDS
:= +libblkid
+libuuid
137 define Package
/blkid
/description
138 The blkid program is the command-line interface to working with the libblkid
143 $(call Package
/util-linux
/Default
)
144 TITLE
:=display a calendar
145 DEPENDS
:= +libncurses
148 define Package
/cal
/description
149 cal displays a simple calendar
152 define Package
/cfdisk
153 $(call Package
/util-linux
/Default
)
154 TITLE
:=display or manipulate disk partition table
155 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
+libfdisk
+libmount
159 define Package
/cfdisk
/description
160 cfdisk is a curses-based program for partitioning any hard disk drive
164 $(call Package
/util-linux
/Default
)
165 TITLE
:=print or control the kernel ring buffer
166 DEPENDS
:= +libncursesw
169 define Package
/dmesg
/description
170 dmesg is used to examine or control the kernel ring buffer
174 $(call Package
/util-linux
/Default
)
175 TITLE
:=manipulate disk partition table
176 DEPENDS
:= +libblkid
+libsmartcols
+libfdisk
+libncursesw
180 define Package
/fdisk
/description
181 a menu-driven program for creation and manipulation of partition tables
184 define Package
/findfs
185 $(call Package
/util-linux
/Default
)
186 TITLE
:=find a filesystem by label or UUID
191 define Package
/findfs
/description
192 findfs will search the disks in the system looking for a filesystem which has
193 a label matching label or a UUID equal to uuid
197 $(call Package
/util-linux
/Default
)
198 TITLE
:=manage locks from
shell scripts
201 define Package
/flock
/description
202 manages flock locks from within
shell scripts or the command line
205 define Package
/getopt
206 $(call Package
/util-linux
/Default
)
207 TITLE
:=parse command options
(enhanced
)
210 define Package
/getopt
/description
211 getopt is used to break up
(parse
) options in command lines for easy parsing
212 by
shell procedures
, and to
check for legal options
215 define Package
/hwclock
216 $(call Package
/util-linux
/Default
)
217 TITLE
:=query or set the hardware clock
220 define Package
/hwclock
/description
221 hwclock is a tool for accessing the Hardware Clock
224 define Package
/logger
225 $(call Package
/util-linux
/Default
)
226 TITLE
:=a
shell command interface to the syslog system log module
229 define Package
/logger
/description
230 logger makes entries in the system log
, it provides a
shell command interface
231 to the syslog system log module
235 $(call Package
/util-linux
/Default
)
236 TITLE
:=display lines beginning with a given string
239 define Package
/look
/description
240 look utility displays any lines in file which contain string
243 define Package
/losetup
244 $(call Package
/util-linux
/Default
)
245 TITLE
:=set up and control loop devices
246 DEPENDS
:= +libsmartcols
249 define Package
/losetup
/description
250 losetup is used to associate loop devices with regular files or block devices
,
251 to detach loop devices and to query the status of a loop device
255 $(call Package
/util-linux
/Default
)
256 TITLE
:=list block devices
257 DEPENDS
:= +libblkid
+libmount
+libsmartcols
261 define Package
/lsblk
/description
262 lsblk lists information about
all or the specified block devices
265 define Package
/mcookie
266 $(call Package
/util-linux
/Default
)
267 TITLE
:=generate magic cookies for xauth
270 define Package
/mcookie
/description
271 mcookie generates a
128-bit random hexadecimal number for use with the X
275 define Package
/mount-utils
276 $(call Package
/util-linux
/Default
)
277 TITLE
:=related
(u
)mount utilities
278 DEPENDS
+= +libmount
+libsmartcols
281 define Package
/mount-utils
/description
282 contains
: mount
, umount
, findmnt
286 $(call Package
/util-linux
/Default
)
287 TITLE
:=follow a pathname until a terminal point is found
290 define Package
/namei
/description
291 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
292 files
, directories
, and so forth
)
295 define Package
/prlimit
296 $(call Package
/util-linux
/Default
)
297 TITLE
:=get and set process resource limits
298 DEPENDS
:= +libsmartcols
301 define Package
/prlimit
/description
302 Given a process id and one or more resources
, prlimit tries to retrieve
303 and
/or modify the limits.
306 define Package
/rename
307 $(call Package
/util-linux
/Default
)
311 define Package
/rename
/description
312 rename will rename the specified files by replacing the first occurrence of
313 expression in their name by replacement
316 define Package
/partx-utils
317 $(call Package
/util-linux
/Default
)
318 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
319 DEPENDS
:= +libblkid
+libsmartcols
323 define Package
/partx-utils
/description
324 contains partx
, addpart
, delpart
327 define Package
/script-utils
328 $(call Package
/util-linux
/Default
)
329 TITLE
:=make and replay typescript of terminal session
333 define Package
/script-utils
/description
334 contains
: script
, scriptreplay
337 define Package
/setterm
338 $(call Package
/util-linux
/Default
)
339 TITLE
:=set terminal attributes
340 DEPENDS
:= +libncurses
344 define Package
/setterm
/description
345 setterm writes to standard output a character string that will invoke the
346 specified terminal capabilities
349 define Package
/sfdisk
350 $(call Package
/util-linux
/Default
)
351 TITLE
:=partition table manipulator for Linux
353 DEPENDS
:= +libblkid
+libfdisk
+libsmartcols
+libncursesw
356 define Package
/sfdisk
/description
357 list the size of a partition
, list the partitions on a device
, check the
358 partitions on a device and repartition a device
361 define Package
/swap-utils
362 $(call Package
/util-linux
/Default
)
363 TITLE
:=swap space management utilities
368 define Package
/swap-utils
/description
369 contains
: mkswap
, swaplabel
373 $(call Package
/util-linux
/Default
)
374 TITLE
:=UUID generation daemon
378 define Package
/uuidd
/description
379 The uuidd daemon is used by the UUID library to generate universally unique
380 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
381 guaranteed-unique fashion
, even in the face of large numbers of threads
382 running on different CPUs trying to grab UUIDs.
385 define Package
/uuidgen
386 $(call Package
/util-linux
/Default
)
387 TITLE
:=create a new UUID value
391 define Package
/uuidgen
/description
392 The uuidgen program creates
(and prints
) a new universally unique identifier
393 (UUID
) using the libuuid library. The new UUID can reasonably be considered
394 unique among
all UUIDs created on the local system
, and among UUIDs created on
395 other systems in the past and in the future.
399 $(call Package
/util-linux
/Default
)
400 TITLE
:=send a message to everybody
's terminal
404 define Package/wall/description
405 wall sends a message to everybody logged in with their mesg permission
409 define Package/whereis
410 $(call Package/util-linux/Default)
411 TITLE:=locate the binary, source, and manual page files for a command
414 define Package/whereis/description
415 whereis locates source/binary and manuals sections for specified files
418 define Package/wipefs
419 $(call Package/util-linux/Default)
420 TITLE:=wipe a signature from a device
425 define Package/wipefs/description
426 wipefs can erase filesystem, raid or partition table signatures (magic
427 strings) from the specified device to make the signature invisible for
432 --disable-use-tty-group \
442 TARGET_CFLAGS += $(FPIC) -std=gnu99
444 define Build/InstallDev
445 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
446 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig
447 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig
448 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig
449 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig
450 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig
452 $(INSTALL_DIR) $(1)/usr/include/blkid
453 $(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid
454 $(INSTALL_DIR) $(1)/usr/include/libfdisk
455 $(CP) $(PKG_INSTALL_DIR)/usr/include/libfdisk/libfdisk.h $(1)/usr/include/libfdisk
456 $(INSTALL_DIR) $(1)/usr/include/libmount
457 $(CP) $(PKG_INSTALL_DIR)/usr/include/libmount/libmount.h $(1)/usr/include/libmount
458 $(INSTALL_DIR) $(1)/usr/include/uuid
459 $(CP) $(PKG_INSTALL_DIR)/usr/include/uuid/uuid.h $(1)/usr/include/uuid
460 $(INSTALL_DIR) $(1)/usr/include/libsmartcols
461 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
463 $(INSTALL_DIR) $(1)/usr/lib
464 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib
465 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib
466 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib
467 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib
468 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib
470 $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
471 $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
472 $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
473 $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
474 $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
478 define Package/libfdisk/install
479 $(INSTALL_DIR) $(1)/usr/lib
480 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib/
481 $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
484 define Package/libblkid/install
485 $(INSTALL_DIR) $(1)/usr/lib
486 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib/
487 $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
490 define Package/libmount/install
491 $(INSTALL_DIR) $(1)/usr/lib
492 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib/
493 $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
496 define Package/libsmartcols/install
497 $(INSTALL_DIR) $(1)/usr/lib
498 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib/
499 $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
502 define Package/libuuid/install
503 $(INSTALL_DIR) $(1)/usr/lib
504 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib/
505 $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
508 define Package/agetty/install
509 $(INSTALL_DIR) $(1)/usr/sbin
510 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/agetty $(1)/usr/sbin/
513 define Package/blkdiscard/install
514 $(INSTALL_DIR) $(1)/usr/sbin
515 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkdiscard $(1)/usr/sbin/
518 define Package/blkid/install
519 $(INSTALL_DIR) $(1)/usr/sbin
520 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
523 define Package/cal/install
524 $(INSTALL_DIR) $(1)/usr/bin
525 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cal $(1)/usr/bin/
528 define Package/cfdisk/install
529 $(INSTALL_DIR) $(1)/usr/sbin
530 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cfdisk $(1)/usr/sbin/
533 define Package/dmesg/install
534 $(INSTALL_DIR) $(1)/usr/bin
535 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmesg $(1)/usr/bin/
538 define Package/fdisk/install
539 $(INSTALL_DIR) $(1)/usr/sbin
540 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fdisk $(1)/usr/sbin/
543 define Package/findfs/install
544 $(INSTALL_DIR) $(1)/usr/sbin
545 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/findfs $(1)/usr/sbin/
548 define Package/flock/install
549 $(INSTALL_DIR) $(1)/usr/bin
550 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/flock $(1)/usr/bin/
553 define Package/getopt/install
554 $(INSTALL_DIR) $(1)/usr/bin
555 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getopt $(1)/usr/bin/
558 define Package/hwclock/install
559 $(INSTALL_DIR) $(1)/usr/sbin
560 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hwclock $(1)/usr/sbin/
563 define Package/logger/install
564 $(INSTALL_DIR) $(1)/usr/bin
565 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/
568 define Package/look/install
569 $(INSTALL_DIR) $(1)/usr/bin
570 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/look $(1)/usr/bin/
573 define Package/losetup/install
574 $(INSTALL_DIR) $(1)/usr/sbin
575 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/losetup $(1)/usr/sbin/
578 define Package/lsblk/install
579 $(INSTALL_DIR) $(1)/usr/bin
580 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsblk $(1)/usr/bin/
583 define Package/mcookie/install
584 $(INSTALL_DIR) $(1)/usr/bin
585 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mcookie $(1)/usr/bin/
588 define Package/mount-utils/install
589 $(INSTALL_DIR) $(1)/usr/bin
590 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{u,}mount $(1)/usr/bin/
591 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mountpoint $(1)/usr/bin/
592 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/findmnt $(1)/usr/bin/
595 define Package/namei/install
596 $(INSTALL_DIR) $(1)/usr/bin
597 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/namei $(1)/usr/bin/
600 define Package/prlimit/install
601 $(INSTALL_DIR) $(1)/usr/bin
602 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prlimit $(1)/usr/bin/
605 define Package/rename/install
606 $(INSTALL_DIR) $(1)/usr/bin
607 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rename $(1)/usr/bin/
610 define Package/partx-utils/install
611 $(INSTALL_DIR) $(1)/usr/sbin
612 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partx $(1)/usr/sbin/
613 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/addpart $(1)/usr/sbin/
614 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/delpart $(1)/usr/sbin/
617 define Package/script-utils/install
618 $(INSTALL_DIR) $(1)/usr/bin
619 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/script $(1)/usr/bin/
620 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scriptreplay $(1)/usr/bin/
623 define Package/setterm/install
624 $(INSTALL_DIR) $(1)/usr/bin
625 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/setterm $(1)/usr/bin/
628 define Package/sfdisk/install
629 $(INSTALL_DIR) $(1)/usr/sbin
630 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sfdisk $(1)/usr/sbin/
633 define Package/swap-utils/install
634 $(INSTALL_DIR) $(1)/usr/sbin
635 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkswap $(1)/usr/sbin/
636 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/
639 define Package/uuidd/install
640 $(INSTALL_DIR) $(1)/usr/sbin
641 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin//uuidd $(1)/usr/sbin/
644 define Package/uuidgen/install
645 $(INSTALL_DIR) $(1)/usr/bin
646 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin//uuidgen $(1)/usr/bin/
649 define Package/wall/install
650 $(INSTALL_DIR) $(1)/usr/bin
651 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wall $(1)/usr/bin/
654 define Package/whereis/install
655 $(INSTALL_DIR) $(1)/usr/bin
656 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whereis $(1)/usr/bin/
659 define Package/wipefs/install
660 $(INSTALL_DIR) $(1)/usr/sbin
661 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wipefs $(1)/usr/sbin/
664 $(eval $(call BuildPackage,libblkid))
665 $(eval $(call BuildPackage,libfdisk))
666 $(eval $(call BuildPackage,libmount))
667 $(eval $(call BuildPackage,libsmartcols))
668 $(eval $(call BuildPackage,libuuid))
669 $(eval $(call BuildPackage,agetty))
670 $(eval $(call BuildPackage,blkdiscard))
671 $(eval $(call BuildPackage,blkid))
672 $(eval $(call BuildPackage,cal))
673 $(eval $(call BuildPackage,cfdisk))
674 $(eval $(call BuildPackage,dmesg))
675 $(eval $(call BuildPackage,fdisk))
676 $(eval $(call BuildPackage,findfs))
677 $(eval $(call BuildPackage,flock))
678 $(eval $(call BuildPackage,getopt))
679 $(eval $(call BuildPackage,hwclock))
680 $(eval $(call BuildPackage,logger))
681 $(eval $(call BuildPackage,look))
682 $(eval $(call BuildPackage,losetup))
683 $(eval $(call BuildPackage,lsblk))
684 $(eval $(call BuildPackage,mcookie))
685 $(eval $(call BuildPackage,mount-utils))
686 $(eval $(call BuildPackage,namei))
687 $(eval $(call BuildPackage,prlimit))
688 $(eval $(call BuildPackage,rename))
689 $(eval $(call BuildPackage,partx-utils))
690 $(eval $(call BuildPackage,script-utils))
691 $(eval $(call BuildPackage,setterm))
692 $(eval $(call BuildPackage,sfdisk))
693 $(eval $(call BuildPackage,swap-utils))
694 $(eval $(call BuildPackage,uuidd))
695 $(eval $(call BuildPackage,uuidgen))
696 $(eval $(call BuildPackage,wall))
697 $(eval $(call BuildPackage,whereis))
698 $(eval $(call BuildPackage,wipefs))