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 DISABLE_NLS
:=--disable-nls
35 include $(INCLUDE_DIR
)/package.mk
37 define Package
/util-linux
/Default
41 URL
:=http
://www.kernel.org
/pub
/linux
/utils
/util-linux
/
44 define Package
/libblkid
45 $(call Package
/util-linux
/Default
)
47 TITLE
:=block device id library
52 define Package
/libblkid
/description
53 The libblkid library is used to identify block devices
(disks
) as to their
54 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
55 information such
as filesystem labels
/volume names
, partitions
, unique
56 identifiers
/serial numbers...
59 define Package
/libfdisk
60 $(call Package
/util-linux
/Default
)
61 DEPENDS
:=+libuuid
+libblkid
62 TITLE
:=partition manipulating library
67 define Package
/libfdisk
/description
68 The libfdisk library is used for manipulating with partition tables.
71 define Package
/libmount
72 $(call Package
/util-linux
/Default
)
79 define Package
/libmount
/description
80 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
81 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
84 define Package
/libuuid
85 $(call Package
/util-linux
/Default
)
86 TITLE
:=DCE compatible Universally Unique Identifier library
91 define Package
/libuuid
/description
92 The UUID library is used to generate unique identifiers for objects
93 that may be accessible beyond the local system. This library
94 generates UUIDs compatible with those created by the Open Software
95 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
98 define Package
/libsmartcols
99 $(call Package
/util-linux
/Default
)
100 TITLE
:=table or tree library
105 define Package
/libsmartcols
/description
106 The smartcols library is used to
print tables and trees in a pretty way.
109 define Package
/agetty
110 $(call Package
/util-linux
/Default
)
111 TITLE
:=alternative Linux getty
115 define Package
/agetty
/description
116 agetty opens a tty port
, prompts for a login name and invokes the
120 define Package
/blkdiscard
121 $(call Package
/util-linux
/Default
)
122 TITLE
:=discard sectors on a device
126 define Package
/blkdiscard
/description
127 The blkdiscard is used to discard device sectors. This is useful for
128 solid-state drivers
(SSDs
) and thinly-provisioned storage. Unlike fstrim
,
129 this command is used directly on the block device.
133 $(call Package
/util-linux
/Default
)
134 TITLE
:=locate and
print block device attributes
135 DEPENDS
:= +libblkid
+libuuid
139 define Package
/blkid
/description
140 The blkid program is the command-line interface to working with the libblkid
145 $(call Package
/util-linux
/Default
)
146 TITLE
:=display a calendar
147 DEPENDS
:= +libncurses
150 define Package
/cal
/description
151 cal displays a simple calendar
154 define Package
/cfdisk
155 $(call Package
/util-linux
/Default
)
156 TITLE
:=display or manipulate disk partition table
157 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
+libfdisk
+libmount
161 define Package
/cfdisk
/description
162 cfdisk is a curses-based program for partitioning any hard disk drive
166 $(call Package
/util-linux
/Default
)
167 TITLE
:=print or control the kernel ring buffer
168 DEPENDS
:= +libncursesw
171 define Package
/dmesg
/description
172 dmesg is used to examine or control the kernel ring buffer
176 $(call Package
/util-linux
/Default
)
177 TITLE
:=manipulate disk partition table
178 DEPENDS
:= +libblkid
+libsmartcols
+libfdisk
+libncursesw
182 define Package
/fdisk
/description
183 a menu-driven program for creation and manipulation of partition tables
186 define Package
/findfs
187 $(call Package
/util-linux
/Default
)
188 TITLE
:=find a filesystem by label or UUID
193 define Package
/findfs
/description
194 findfs will search the disks in the system looking for a filesystem which has
195 a label matching label or a UUID equal to uuid
199 $(call Package
/util-linux
/Default
)
200 TITLE
:=manage locks from
shell scripts
203 define Package
/flock
/description
204 manages flock locks from within
shell scripts or the command line
207 define Package
/getopt
208 $(call Package
/util-linux
/Default
)
209 TITLE
:=parse command options
(enhanced
)
212 define Package
/getopt
/description
213 getopt is used to break up
(parse
) options in command lines for easy parsing
214 by
shell procedures
, and to
check for legal options
217 define Package
/hwclock
218 $(call Package
/util-linux
/Default
)
219 TITLE
:=query or set the hardware clock
222 define Package
/hwclock
/description
223 hwclock is a tool for accessing the Hardware Clock
226 define Package
/logger
227 $(call Package
/util-linux
/Default
)
228 TITLE
:=a
shell command interface to the syslog system log module
231 define Package
/logger
/description
232 logger makes entries in the system log
, it provides a
shell command interface
233 to the syslog system log module
237 $(call Package
/util-linux
/Default
)
238 TITLE
:=display lines beginning with a given string
241 define Package
/look
/description
242 look utility displays any lines in file which contain string
245 define Package
/losetup
246 $(call Package
/util-linux
/Default
)
247 TITLE
:=set up and control loop devices
248 DEPENDS
:= +libsmartcols
251 define Package
/losetup
/description
252 losetup is used to associate loop devices with regular files or block devices
,
253 to detach loop devices and to query the status of a loop device
257 $(call Package
/util-linux
/Default
)
258 TITLE
:=list block devices
259 DEPENDS
:= +libblkid
+libmount
+libsmartcols
263 define Package
/lsblk
/description
264 lsblk lists information about
all or the specified block devices
267 define Package
/mcookie
268 $(call Package
/util-linux
/Default
)
269 TITLE
:=generate magic cookies for xauth
272 define Package
/mcookie
/description
273 mcookie generates a
128-bit random hexadecimal number for use with the X
277 define Package
/mount-utils
278 $(call Package
/util-linux
/Default
)
279 TITLE
:=related
(u
)mount utilities
280 DEPENDS
+= +libmount
+libsmartcols
283 define Package
/mount-utils
/description
284 contains
: mount
, umount
, findmnt
288 $(call Package
/util-linux
/Default
)
289 TITLE
:=follow a pathname until a terminal point is found
292 define Package
/namei
/description
293 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
294 files
, directories
, and so forth
)
297 define Package
/prlimit
298 $(call Package
/util-linux
/Default
)
299 TITLE
:=get and set process resource limits
300 DEPENDS
:= +libsmartcols
303 define Package
/prlimit
/description
304 Given a process id and one or more resources
, prlimit tries to retrieve
305 and
/or modify the limits.
308 define Package
/rename
309 $(call Package
/util-linux
/Default
)
313 define Package
/rename
/description
314 rename will rename the specified files by replacing the first occurrence of
315 expression in their name by replacement
318 define Package
/partx-utils
319 $(call Package
/util-linux
/Default
)
320 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
321 DEPENDS
:= +libblkid
+libsmartcols
325 define Package
/partx-utils
/description
326 contains partx
, addpart
, delpart
329 define Package
/script-utils
330 $(call Package
/util-linux
/Default
)
331 TITLE
:=make and replay typescript of terminal session
335 define Package
/script-utils
/description
336 contains
: script
, scriptreplay
339 define Package
/setterm
340 $(call Package
/util-linux
/Default
)
341 TITLE
:=set terminal attributes
342 DEPENDS
:= +libncurses
346 define Package
/setterm
/description
347 setterm writes to standard output a character string that will invoke the
348 specified terminal capabilities
351 define Package
/sfdisk
352 $(call Package
/util-linux
/Default
)
353 TITLE
:=partition table manipulator for Linux
355 DEPENDS
:= +libblkid
+libfdisk
+libsmartcols
+libncursesw
358 define Package
/sfdisk
/description
359 list the size of a partition
, list the partitions on a device
, check the
360 partitions on a device and repartition a device
363 define Package
/swap-utils
364 $(call Package
/util-linux
/Default
)
365 TITLE
:=swap space management utilities
370 define Package
/swap-utils
/description
371 contains
: mkswap
, swaplabel
375 $(call Package
/util-linux
/Default
)
376 TITLE
:=UUID generation daemon
380 define Package
/uuidd
/description
381 The uuidd daemon is used by the UUID library to generate universally unique
382 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
383 guaranteed-unique fashion
, even in the face of large numbers of threads
384 running on different CPUs trying to grab UUIDs.
387 define Package
/uuidgen
388 $(call Package
/util-linux
/Default
)
389 TITLE
:=create a new UUID value
393 define Package
/uuidgen
/description
394 The uuidgen program creates
(and prints
) a new universally unique identifier
395 (UUID
) using the libuuid library. The new UUID can reasonably be considered
396 unique among
all UUIDs created on the local system
, and among UUIDs created on
397 other systems in the past and in the future.
401 $(call Package
/util-linux
/Default
)
402 TITLE
:=send a message to everybody
's terminal
406 define Package/wall/description
407 wall sends a message to everybody logged in with their mesg permission
411 define Package/whereis
412 $(call Package/util-linux/Default)
413 TITLE:=locate the binary, source, and manual page files for a command
416 define Package/whereis/description
417 whereis locates source/binary and manuals sections for specified files
420 define Package/wipefs
421 $(call Package/util-linux/Default)
422 TITLE:=wipe a signature from a device
427 define Package/wipefs/description
428 wipefs can erase filesystem, raid or partition table signatures (magic
429 strings) from the specified device to make the signature invisible for
434 --disable-use-tty-group \
444 TARGET_CFLAGS += $(FPIC) -std=gnu99
446 define Build/InstallDev
447 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
448 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/blkid.pc $(1)/usr/lib/pkgconfig
449 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/fdisk.pc $(1)/usr/lib/pkgconfig
450 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mount.pc $(1)/usr/lib/pkgconfig
451 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/smartcols.pc $(1)/usr/lib/pkgconfig
452 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/uuid.pc $(1)/usr/lib/pkgconfig
454 $(INSTALL_DIR) $(1)/usr/include/blkid
455 $(CP) $(PKG_INSTALL_DIR)/usr/include/blkid/blkid.h $(1)/usr/include/blkid
456 $(INSTALL_DIR) $(1)/usr/include/libfdisk
457 $(CP) $(PKG_INSTALL_DIR)/usr/include/libfdisk/libfdisk.h $(1)/usr/include/libfdisk
458 $(INSTALL_DIR) $(1)/usr/include/libmount
459 $(CP) $(PKG_INSTALL_DIR)/usr/include/libmount/libmount.h $(1)/usr/include/libmount
460 $(INSTALL_DIR) $(1)/usr/include/uuid
461 $(CP) $(PKG_INSTALL_DIR)/usr/include/uuid/uuid.h $(1)/usr/include/uuid
462 $(INSTALL_DIR) $(1)/usr/include/libsmartcols
463 $(CP) $(PKG_INSTALL_DIR)/usr/include/libsmartcols/libsmartcols.h $(1)/usr/include/libsmartcols
465 $(INSTALL_DIR) $(1)/usr/lib
466 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib
467 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib
468 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib
469 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib
470 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib
472 $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
473 $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
474 $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
475 $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
476 $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
480 define Package/libfdisk/install
481 $(INSTALL_DIR) $(1)/usr/lib
482 $(CP) $(PKG_INSTALL_DIR)/lib/libfdisk.so* $(1)/usr/lib/
483 $(LN) libfdisk.so.1 $(1)/usr/lib/libfdisk.so
486 define Package/libblkid/install
487 $(INSTALL_DIR) $(1)/usr/lib
488 $(CP) $(PKG_INSTALL_DIR)/lib/libblkid.so* $(1)/usr/lib/
489 $(LN) libblkid.so.1 $(1)/usr/lib/libblkid.so
492 define Package/libmount/install
493 $(INSTALL_DIR) $(1)/usr/lib
494 $(CP) $(PKG_INSTALL_DIR)/lib/libmount.so* $(1)/usr/lib/
495 $(LN) libmount.so.1 $(1)/usr/lib/libmount.so
498 define Package/libsmartcols/install
499 $(INSTALL_DIR) $(1)/usr/lib
500 $(CP) $(PKG_INSTALL_DIR)/lib/libsmartcols.so* $(1)/usr/lib/
501 $(LN) libsmartcols.so.1 $(1)/usr/lib/libsmartcols.so
504 define Package/libuuid/install
505 $(INSTALL_DIR) $(1)/usr/lib
506 $(CP) $(PKG_INSTALL_DIR)/lib/libuuid.so* $(1)/usr/lib/
507 $(LN) libuuid.so.1 $(1)/usr/lib/libuuid.so
510 define Package/agetty/install
511 $(INSTALL_DIR) $(1)/usr/sbin
512 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/agetty $(1)/usr/sbin/
515 define Package/blkdiscard/install
516 $(INSTALL_DIR) $(1)/usr/sbin
517 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkdiscard $(1)/usr/sbin/
520 define Package/blkid/install
521 $(INSTALL_DIR) $(1)/usr/sbin
522 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/blkid $(1)/usr/sbin/
525 define Package/cal/install
526 $(INSTALL_DIR) $(1)/usr/bin
527 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cal $(1)/usr/bin/
530 define Package/cfdisk/install
531 $(INSTALL_DIR) $(1)/usr/sbin
532 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/cfdisk $(1)/usr/sbin/
535 define Package/dmesg/install
536 $(INSTALL_DIR) $(1)/usr/bin
537 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dmesg $(1)/usr/bin/
540 define Package/fdisk/install
541 $(INSTALL_DIR) $(1)/usr/sbin
542 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fdisk $(1)/usr/sbin/
545 define Package/findfs/install
546 $(INSTALL_DIR) $(1)/usr/sbin
547 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/findfs $(1)/usr/sbin/
550 define Package/flock/install
551 $(INSTALL_DIR) $(1)/usr/bin
552 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/flock $(1)/usr/bin/
555 define Package/getopt/install
556 $(INSTALL_DIR) $(1)/usr/bin
557 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/getopt $(1)/usr/bin/
560 define Package/hwclock/install
561 $(INSTALL_DIR) $(1)/usr/sbin
562 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/hwclock $(1)/usr/sbin/
565 define Package/logger/install
566 $(INSTALL_DIR) $(1)/usr/bin
567 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/logger $(1)/usr/bin/
570 define Package/look/install
571 $(INSTALL_DIR) $(1)/usr/bin
572 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/look $(1)/usr/bin/
575 define Package/losetup/install
576 $(INSTALL_DIR) $(1)/usr/sbin
577 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/losetup $(1)/usr/sbin/
580 define Package/lsblk/install
581 $(INSTALL_DIR) $(1)/usr/bin
582 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/lsblk $(1)/usr/bin/
585 define Package/mcookie/install
586 $(INSTALL_DIR) $(1)/usr/bin
587 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mcookie $(1)/usr/bin/
590 define Package/mount-utils/install
591 $(INSTALL_DIR) $(1)/usr/bin
592 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/{u,}mount $(1)/usr/bin/
593 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/mountpoint $(1)/usr/bin/
594 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/findmnt $(1)/usr/bin/
597 define Package/namei/install
598 $(INSTALL_DIR) $(1)/usr/bin
599 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/namei $(1)/usr/bin/
602 define Package/prlimit/install
603 $(INSTALL_DIR) $(1)/usr/bin
604 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prlimit $(1)/usr/bin/
607 define Package/rename/install
608 $(INSTALL_DIR) $(1)/usr/bin
609 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/rename $(1)/usr/bin/
612 define Package/partx-utils/install
613 $(INSTALL_DIR) $(1)/usr/sbin
614 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/partx $(1)/usr/sbin/
615 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/addpart $(1)/usr/sbin/
616 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/delpart $(1)/usr/sbin/
619 define Package/script-utils/install
620 $(INSTALL_DIR) $(1)/usr/bin
621 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/script $(1)/usr/bin/
622 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/scriptreplay $(1)/usr/bin/
625 define Package/setterm/install
626 $(INSTALL_DIR) $(1)/usr/bin
627 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/setterm $(1)/usr/bin/
630 define Package/sfdisk/install
631 $(INSTALL_DIR) $(1)/usr/sbin
632 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/sfdisk $(1)/usr/sbin/
635 define Package/swap-utils/install
636 $(INSTALL_DIR) $(1)/usr/sbin
637 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/mkswap $(1)/usr/sbin/
638 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/swaplabel $(1)/usr/sbin/
641 define Package/uuidd/install
642 $(INSTALL_DIR) $(1)/usr/sbin
643 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin//uuidd $(1)/usr/sbin/
646 define Package/uuidgen/install
647 $(INSTALL_DIR) $(1)/usr/bin
648 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin//uuidgen $(1)/usr/bin/
651 define Package/wall/install
652 $(INSTALL_DIR) $(1)/usr/bin
653 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/wall $(1)/usr/bin/
656 define Package/whereis/install
657 $(INSTALL_DIR) $(1)/usr/bin
658 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/whereis $(1)/usr/bin/
661 define Package/wipefs/install
662 $(INSTALL_DIR) $(1)/usr/sbin
663 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/wipefs $(1)/usr/sbin/
666 $(eval $(call BuildPackage,libblkid))
667 $(eval $(call BuildPackage,libfdisk))
668 $(eval $(call BuildPackage,libmount))
669 $(eval $(call BuildPackage,libsmartcols))
670 $(eval $(call BuildPackage,libuuid))
671 $(eval $(call BuildPackage,agetty))
672 $(eval $(call BuildPackage,blkdiscard))
673 $(eval $(call BuildPackage,blkid))
674 $(eval $(call BuildPackage,cal))
675 $(eval $(call BuildPackage,cfdisk))
676 $(eval $(call BuildPackage,dmesg))
677 $(eval $(call BuildPackage,fdisk))
678 $(eval $(call BuildPackage,findfs))
679 $(eval $(call BuildPackage,flock))
680 $(eval $(call BuildPackage,getopt))
681 $(eval $(call BuildPackage,hwclock))
682 $(eval $(call BuildPackage,logger))
683 $(eval $(call BuildPackage,look))
684 $(eval $(call BuildPackage,losetup))
685 $(eval $(call BuildPackage,lsblk))
686 $(eval $(call BuildPackage,mcookie))
687 $(eval $(call BuildPackage,mount-utils))
688 $(eval $(call BuildPackage,namei))
689 $(eval $(call BuildPackage,prlimit))
690 $(eval $(call BuildPackage,rename))
691 $(eval $(call BuildPackage,partx-utils))
692 $(eval $(call BuildPackage,script-utils))
693 $(eval $(call BuildPackage,setterm))
694 $(eval $(call BuildPackage,sfdisk))
695 $(eval $(call BuildPackage,swap-utils))
696 $(eval $(call BuildPackage,uuidd))
697 $(eval $(call BuildPackage,uuidgen))
698 $(eval $(call BuildPackage,wall))
699 $(eval $(call BuildPackage,whereis))
700 $(eval $(call BuildPackage,wipefs))