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.28
16 PKG_MD5SUM
:=e534e6ccc49107e5d31c329af798ef7d
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
/
45 $(if
$(CONFIG_PACKAGE_cal
)$(CONFIG_PACKAGE_cfdisk
)$(CONFIG_PACKAGE_setterm
),--with-ncurses
,--without-ncurses
)
47 TARGET_CFLAGS
+= $(FPIC
) -std
=gnu99
49 define Build
/InstallDev
50 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
53 installdirs install-data
55 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
56 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/blkid.
pc $(1)/usr
/lib
/pkgconfig
57 $(CP
) $(PKG_BUILD_DIR
)/libfdisk
/fdisk.
pc $(1)/usr
/lib
/pkgconfig
58 $(CP
) $(PKG_BUILD_DIR
)/libmount
/mount.
pc $(1)/usr
/lib
/pkgconfig
59 $(CP
) $(PKG_BUILD_DIR
)/libsmartcols
/smartcols.
pc $(1)/usr
/lib
/pkgconfig
60 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/uuid.
pc $(1)/usr
/lib
/pkgconfig
62 $(INSTALL_DIR
) $(1)/usr
/include/blkid
63 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/src
/blkid.h
$(1)/usr
/include/blkid
64 $(INSTALL_DIR
) $(1)/usr
/include/fdisk
65 $(CP
) $(PKG_BUILD_DIR
)/libfdisk
/src
/libfdisk.h
$(1)/usr
/include/fdisk
66 $(INSTALL_DIR
) $(1)/usr
/include/libmount
67 $(CP
) $(PKG_BUILD_DIR
)/libmount
/src
/libmount.h
$(1)/usr
/include/libmount
68 $(INSTALL_DIR
) $(1)/usr
/include/uuid
69 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/src
/uuid.h
$(1)/usr
/include/uuid
70 $(INSTALL_DIR
) $(1)/usr
/include/smartcols
71 $(CP
) $(PKG_BUILD_DIR
)/libsmartcols
/src
/libsmartcols.h
$(1)/usr
/include/smartcols
73 $(INSTALL_DIR
) $(1)/usr
/lib
74 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libblkid.
{a
,so
*} $(1)/usr
/lib
75 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libfdisk.
{a
,so
*} $(1)/usr
/lib
76 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libmount.
{a
,so
*} $(1)/usr
/lib
77 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libuuid.
{a
,so
*} $(1)/usr
/lib
78 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libsmartcols.
{a
,so
*} $(1)/usr
/lib
81 define Package
/libblkid
82 $(call Package
/util-linux
/Default
)
84 TITLE
:=block device id library
89 define Package
/libblkid
/description
90 The libblkid library is used to identify block devices
(disks
) as to their
91 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
92 information such
as filesystem labels
/volume names
, partitions
, unique
93 identifiers
/serial numbers...
96 define Package
/libfdisk
97 $(call Package
/util-linux
/Default
)
98 DEPENDS
:=+libuuid
+libblkid
99 TITLE
:=partition manipulating library
104 define Package
/libfdisk
/description
105 The libfdisk library is used for manipulating with partition tables.
108 define Package
/libmount
109 $(call Package
/util-linux
/Default
)
116 define Package
/libmount
/description
117 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
118 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
121 define Package
/libuuid
122 $(call Package
/util-linux
/Default
)
123 TITLE
:=DCE compatible Universally Unique Identifier library
128 define Package
/libuuid
/description
129 The UUID library is used to generate unique identifiers for objects
130 that may be accessible beyond the local system. This library
131 generates UUIDs compatible with those created by the Open Software
132 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
135 define Package
/libsmartcols
136 $(call Package
/util-linux
/Default
)
137 TITLE
:=table or tree library
142 define Package
/libsmartcols
/description
143 The smartcols library is used to
print tables and trees in a pretty way.
146 define Package
/agetty
147 $(call Package
/util-linux
/Default
)
148 TITLE
:=alternative Linux getty
152 define Package
/agetty
/description
153 agetty opens a tty port
, prompts for a login name and invokes the
157 define Package
/blkdiscard
158 $(call Package
/util-linux
/Default
)
159 TITLE
:=discard sectors on a device
163 define Package
/blkdiscard
/description
164 The blkdiscard is used to discard device sectors. This is useful for
165 solid-state drivers
(SSDs
) and thinly-provisioned storage. Unlike fstrim
,
166 this command is used directly on the block device.
170 $(call Package
/util-linux
/Default
)
171 TITLE
:=locate
/print block device attributes
172 DEPENDS
:= +libblkid
+libuuid
176 define Package
/blkid
/description
177 The blkid program is the command-line interface to working with the libblkid
182 $(call Package
/util-linux
/Default
)
183 TITLE
:=display a calendar
184 DEPENDS
:= +libncurses
187 define Package
/cal
/description
188 cal displays a simple calendar
191 define Package
/cfdisk
192 $(call Package
/util-linux
/Default
)
193 TITLE
:=display or manipulate disk partition table
194 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
+libfdisk
+libmount
198 define Package
/cfdisk
/description
199 cfdisk is a curses-based program for partitioning any hard disk drive
203 $(call Package
/util-linux
/Default
)
204 TITLE
:=print or control the kernel ring buffer
208 define Package
/dmesg
/description
209 dmesg is used to examine or control the kernel ring buffer
213 $(call Package
/util-linux
/Default
)
214 TITLE
:=manipulate disk partition table
215 DEPENDS
:= +libblkid
+libsmartcols
+libfdisk
219 define Package
/fdisk
/description
220 a menu-driven program for creation and manipulation of partition tables
223 define Package
/findfs
224 $(call Package
/util-linux
/Default
)
225 TITLE
:=find a filesystem by label or UUID
230 define Package
/findfs
/description
231 findfs will search the disks in the system looking for a filesystem which has
232 a label matching label or a UUID equal to uuid
236 $(call Package
/util-linux
/Default
)
237 TITLE
:=manage locks from
shell scripts
240 define Package
/flock
/description
241 manages flock locks from within
shell scripts or the command line
244 define Package
/getopt
245 $(call Package
/util-linux
/Default
)
246 TITLE
:=parse command options
(enhanced
)
249 define Package
/getopt
/description
250 getopt is used to break up
(parse
) options in command lines for easy parsing
251 by
shell procedures
, and to
check for legal options
254 define Package
/hwclock
255 $(call Package
/util-linux
/Default
)
256 TITLE
:=query or set the hardware clock
259 define Package
/hwclock
/description
260 hwclock is a tool for accessing the Hardware Clock
263 define Package
/logger
264 $(call Package
/util-linux
/Default
)
265 TITLE
:=a
shell command interface to the syslog system log module
268 define Package
/logger
/description
269 logger makes entries in the system log
, it provides a
shell command interface
270 to the syslog system log module
274 $(call Package
/util-linux
/Default
)
275 TITLE
:=display lines beginning with a given string
278 define Package
/look
/description
279 look utility displays any lines in file which contain string
282 define Package
/losetup
283 $(call Package
/util-linux
/Default
)
284 TITLE
:=set up and control loop devices
285 DEPENDS
:= +libsmartcols
288 define Package
/losetup
/description
289 losetup is used to associate loop devices with regular files or block devices
,
290 to detach loop devices and to query the status of a loop device
294 $(call Package
/util-linux
/Default
)
295 TITLE
:=list block devices
296 DEPENDS
:= +libblkid
+libmount
+libsmartcols
300 define Package
/lsblk
/description
301 lsblk lists information about
all or the specified block devices
304 define Package
/mcookie
305 $(call Package
/util-linux
/Default
)
306 TITLE
:=generate magic cookies for xauth
309 define Package
/mcookie
/description
310 mcookie generates a
128-bit random hexadecimal number for use with the X
314 define Package
/mount-utils
315 $(call Package
/util-linux
/Default
)
316 TITLE
:=related
(u
)mount utilities
317 DEPENDS
+= +libmount
+libsmartcols
320 define Package
/mount-utils
/description
321 contains
: mount
, umount
, findmnt
325 $(call Package
/util-linux
/Default
)
326 TITLE
:=follow a pathname until a terminal point is found
329 define Package
/namei
/description
330 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
331 files
, directories
, and so forth
)
334 define Package
/prlimit
335 $(call Package
/util-linux
/Default
)
336 TITLE
:=get and set process resource limits
337 DEPENDS
:= +libsmartcols
340 define Package
/prlimit
/description
341 Given a process id and one or more resources
, prlimit tries to retrieve
342 and
/or modify the limits.
345 define Package
/rename
346 $(call Package
/util-linux
/Default
)
350 define Package
/rename
/description
351 rename will rename the specified files by replacing the first occurrence of
352 expression in their name by replacement
355 define Package
/partx-utils
356 $(call Package
/util-linux
/Default
)
357 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
358 DEPENDS
:= +libblkid
+libsmartcols
362 define Package
/partx-utils
/description
363 contains partx
, addpart
, delpart
366 define Package
/script-utils
367 $(call Package
/util-linux
/Default
)
368 TITLE
:=make and replay typescript of terminal session
372 define Package
/script-utils
/description
373 contains
: script
, scriptreplay
376 define Package
/setterm
377 $(call Package
/util-linux
/Default
)
378 TITLE
:=set terminal attributes
379 DEPENDS
:= +libncurses
383 define Package
/setterm
/description
384 setterm writes to standard output a character string that will invoke the
385 specified terminal capabilities
388 define Package
/sfdisk
389 $(call Package
/util-linux
/Default
)
390 TITLE
:=partition table manipulator for Linux
394 define Package
/sfdisk
/description
395 list the size of a partition
, list the partitions on a device
, check the
396 partitions on a device and repartition a device
399 define Package
/swap-utils
400 $(call Package
/util-linux
/Default
)
401 TITLE
:=swap space management utilities
406 define Package
/swap-utils
/description
407 contains
: mkswap
, swaplabel
411 $(call Package
/util-linux
/Default
)
412 TITLE
:=UUID generation daemon
416 define Package
/uuidd
/description
417 The uuidd daemon is used by the UUID library to generate universally unique
418 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
419 guaranteed-unique fashion
, even in the face of large numbers of threads
420 running on different CPUs trying to grab UUIDs.
423 define Package
/uuidgen
424 $(call Package
/util-linux
/Default
)
425 TITLE
:=create a new UUID value
429 define Package
/uuidgen
/description
430 The uuidgen program creates
(and prints
) a new universally unique identifier
431 (UUID
) using the libuuid library. The new UUID can reasonably be considered
432 unique among
all UUIDs created on the local system
, and among UUIDs created on
433 other systems in the past and in the future.
437 $(call Package
/util-linux
/Default
)
438 TITLE
:=send a message to everybody
's terminal
442 define Package/wall/description
443 wall sends a message to everybody logged in with their mesg permission
447 define Package/whereis
448 $(call Package/util-linux/Default)
449 TITLE:=locate the binary, source, and manual page files for a command
452 define Package/whereis/description
453 whereis locates source/binary and manuals sections for specified files
456 define Package/wipefs
457 $(call Package/util-linux/Default)
458 TITLE:=wipe a signature from a device
463 define Package/wipefs/description
464 wipefs can erase filesystem, raid or partition table signatures (magic
465 strings) from the specified device to make the signature invisible for
469 define Package/libfdisk/install
470 $(INSTALL_DIR) $(1)/usr/lib
471 $(CP) $(PKG_BUILD_DIR)/.libs/libfdisk.so* $(1)/usr/lib/
474 define Package/libblkid/install
475 $(INSTALL_DIR) $(1)/usr/lib
476 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
479 define Package/libmount/install
480 $(INSTALL_DIR) $(1)/usr/lib
481 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
484 define Package/libsmartcols/install
485 $(INSTALL_DIR) $(1)/usr/lib
486 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
489 define Package/libuuid/install
490 $(INSTALL_DIR) $(1)/usr/lib
491 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
494 define Package/agetty/install
495 $(INSTALL_DIR) $(1)/usr/sbin
496 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
499 define Package/blkdiscard/install
500 $(INSTALL_DIR) $(1)/usr/sbin
501 $(INSTALL_BIN) $(PKG_BUILD_DIR)/blkdiscard $(1)/usr/sbin/
504 define Package/blkid/install
505 $(INSTALL_DIR) $(1)/usr/sbin
506 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
509 define Package/cal/install
510 $(INSTALL_DIR) $(1)/usr/bin
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
514 define Package/cfdisk/install
515 $(INSTALL_DIR) $(1)/usr/sbin
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
519 define Package/dmesg/install
520 $(INSTALL_DIR) $(1)/usr/sbin
521 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
524 define Package/fdisk/install
525 $(INSTALL_DIR) $(1)/usr/sbin
526 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
529 define Package/findfs/install
530 $(INSTALL_DIR) $(1)/usr/sbin
531 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
534 define Package/flock/install
535 $(INSTALL_DIR) $(1)/usr/bin
536 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
539 define Package/getopt/install
540 $(INSTALL_DIR) $(1)/usr/bin
541 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
544 define Package/hwclock/install
545 $(INSTALL_DIR) $(1)/usr/sbin
546 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
549 define Package/logger/install
550 $(INSTALL_DIR) $(1)/usr/bin
551 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
554 define Package/look/install
555 $(INSTALL_DIR) $(1)/usr/bin
556 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
559 define Package/losetup/install
560 $(INSTALL_DIR) $(1)/usr/sbin
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
564 define Package/lsblk/install
565 $(INSTALL_DIR) $(1)/usr/bin
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
569 define Package/mcookie/install
570 $(INSTALL_DIR) $(1)/usr/bin
571 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
574 define Package/mount-utils/install
575 $(INSTALL_DIR) $(1)/usr/bin
576 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
577 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
578 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
581 define Package/namei/install
582 $(INSTALL_DIR) $(1)/usr/bin
583 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
586 define Package/prlimit/install
587 $(INSTALL_DIR) $(1)/usr/bin
588 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/prlimit $(1)/usr/bin/
591 define Package/rename/install
592 $(INSTALL_DIR) $(1)/usr/bin
593 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
596 define Package/partx-utils/install
597 $(INSTALL_DIR) $(1)/usr/sbin
598 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
599 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
600 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
603 define Package/script-utils/install
604 $(INSTALL_DIR) $(1)/usr/bin
605 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
606 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
609 define Package/setterm/install
610 $(INSTALL_DIR) $(1)/usr/bin
611 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
614 define Package/sfdisk/install
615 $(INSTALL_DIR) $(1)/usr/sbin
616 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
619 define Package/swap-utils/install
620 $(INSTALL_DIR) $(1)/usr/sbin
621 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
622 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
625 define Package/uuidd/install
626 $(INSTALL_DIR) $(1)/usr/sbin
627 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
630 define Package/uuidgen/install
631 $(INSTALL_DIR) $(1)/usr/bin
632 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
635 define Package/wall/install
636 $(INSTALL_DIR) $(1)/usr/bin
637 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
640 define Package/whereis/install
641 $(INSTALL_DIR) $(1)/usr/bin
642 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
645 define Package/wipefs/install
646 $(INSTALL_DIR) $(1)/usr/sbin
647 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
650 $(eval $(call BuildPackage,libblkid))
651 $(eval $(call BuildPackage,libfdisk))
652 $(eval $(call BuildPackage,libmount))
653 $(eval $(call BuildPackage,libsmartcols))
654 $(eval $(call BuildPackage,libuuid))
655 $(eval $(call BuildPackage,agetty))
656 $(eval $(call BuildPackage,blkdiscard))
657 $(eval $(call BuildPackage,blkid))
658 $(eval $(call BuildPackage,cal))
659 $(eval $(call BuildPackage,cfdisk))
660 $(eval $(call BuildPackage,dmesg))
661 $(eval $(call BuildPackage,fdisk))
662 $(eval $(call BuildPackage,findfs))
663 $(eval $(call BuildPackage,flock))
664 $(eval $(call BuildPackage,getopt))
665 $(eval $(call BuildPackage,hwclock))
666 $(eval $(call BuildPackage,logger))
667 $(eval $(call BuildPackage,look))
668 $(eval $(call BuildPackage,losetup))
669 $(eval $(call BuildPackage,lsblk))
670 $(eval $(call BuildPackage,mcookie))
671 $(eval $(call BuildPackage,mount-utils))
672 $(eval $(call BuildPackage,namei))
673 $(eval $(call BuildPackage,prlimit))
674 $(eval $(call BuildPackage,rename))
675 $(eval $(call BuildPackage,partx-utils))
676 $(eval $(call BuildPackage,script-utils))
677 $(eval $(call BuildPackage,setterm))
678 $(eval $(call BuildPackage,sfdisk))
679 $(eval $(call BuildPackage,swap-utils))
680 $(eval $(call BuildPackage,uuidd))
681 $(eval $(call BuildPackage,uuidgen))
682 $(eval $(call BuildPackage,wall))
683 $(eval $(call BuildPackage,whereis))
684 $(eval $(call BuildPackage,wipefs))