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
141 $(call Package
/util-linux
/Default
)
142 TITLE
:=locate
/print block device attributes
143 DEPENDS
:= +libblkid
+libuuid
147 define Package
/blkid
/description
148 The blkid program is the command-line interface to working with the libblkid
153 $(call Package
/util-linux
/Default
)
154 TITLE
:=display a calendar
155 DEPENDS
:= +libncurses
158 define Package
/cal
/description
159 cal displays a simple calendar
162 define Package
/cfdisk
163 $(call Package
/util-linux
/Default
)
164 TITLE
:=display or manipulate disk partition table
165 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
169 define Package
/cfdisk
/description
170 cfdisk is a curses-based program for partitioning any hard disk drive
174 $(call Package
/util-linux
/Default
)
175 TITLE
:=print or control the kernel ring buffer
179 define Package
/dmesg
/description
180 dmesg is used to examine or control the kernel ring buffer
184 $(call Package
/util-linux
/Default
)
185 TITLE
:=manipulate disk partition table
186 DEPENDS
:= +libblkid
+libsmartcols
190 define Package
/fdisk
/description
191 a menu-driven program for creation and manipulation of partition tables
194 define Package
/findfs
195 $(call Package
/util-linux
/Default
)
196 TITLE
:=find a filesystem by label or UUID
201 define Package
/findfs
/description
202 findfs will search the disks in the system looking for a filesystem which has
203 a label matching label or a UUID equal to uuid
207 $(call Package
/util-linux
/Default
)
208 TITLE
:=manage locks from
shell scripts
211 define Package
/flock
/description
212 manages flock locks from within
shell scripts or the command line
215 define Package
/getopt
216 $(call Package
/util-linux
/Default
)
217 TITLE
:=parse command options
(enhanced
)
220 define Package
/getopt
/description
221 getopt is used to break up
(parse
) options in command lines for easy parsing
222 by
shell procedures
, and to
check for legal options
225 define Package
/hwclock
226 $(call Package
/util-linux
/Default
)
227 TITLE
:=query or set the hardware clock
230 define Package
/hwclock
/description
231 hwclock is a tool for accessing the Hardware Clock
234 define Package
/logger
235 $(call Package
/util-linux
/Default
)
236 TITLE
:=a
shell command interface to the syslog system log module
239 define Package
/logger
/description
240 logger makes entries in the system log
, it provides a
shell command interface
241 to the syslog system log module
245 $(call Package
/util-linux
/Default
)
246 TITLE
:=display lines beginning with a given string
249 define Package
/look
/description
250 look utility displays any lines in file which contain string
253 define Package
/losetup
254 $(call Package
/util-linux
/Default
)
255 TITLE
:=set up and control loop devices
256 DEPENDS
:= +libsmartcols
259 define Package
/losetup
/description
260 losetup is used to associate loop devices with regular files or block devices
,
261 to detach loop devices and to query the status of a loop device
265 $(call Package
/util-linux
/Default
)
266 TITLE
:=list block devices
267 DEPENDS
:= +libblkid
+libmount
+libsmartcols
271 define Package
/lsblk
/description
272 lsblk lists information about
all or the specified block devices
275 define Package
/mcookie
276 $(call Package
/util-linux
/Default
)
277 TITLE
:=generate magic cookies for xauth
280 define Package
/mcookie
/description
281 mcookie generates a
128-bit random hexadecimal number for use with the X
285 define Package
/mount-utils
286 $(call Package
/util-linux
/Default
)
287 TITLE
:=related
(u
)mount utilities
288 DEPENDS
+= +libmount
+libsmartcols
291 define Package
/mount-utils
/description
292 contains
: mount
, umount
, findmnt
296 $(call Package
/util-linux
/Default
)
297 TITLE
:=follow a pathname until a terminal point is found
300 define Package
/namei
/description
301 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
302 files
, directories
, and so forth
)
305 define Package
/prlimit
306 $(call Package
/util-linux
/Default
)
307 TITLE
:=get and set process resource limits
308 DEPENDS
:= +libsmartcols
311 define Package
/prlimit
/description
312 Given a process id and one or more resources
, prlimit tries to retrieve
313 and
/or modify the limits.
316 define Package
/rename
317 $(call Package
/util-linux
/Default
)
321 define Package
/rename
/description
322 rename will rename the specified files by replacing the first occurrence of
323 expression in their name by replacement
326 define Package
/partx-utils
327 $(call Package
/util-linux
/Default
)
328 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
329 DEPENDS
:= +libblkid
+libsmartcols
333 define Package
/partx-utils
/description
334 contains partx
, addpart
, delpart
337 define Package
/script-utils
338 $(call Package
/util-linux
/Default
)
339 TITLE
:=make and replay typescript of terminal session
343 define Package
/script-utils
/description
344 contains
: script
, scriptreplay
347 define Package
/setterm
348 $(call Package
/util-linux
/Default
)
349 TITLE
:=set terminal attributes
350 DEPENDS
:= +libncurses
354 define Package
/setterm
/description
355 setterm writes to standard output a character string that will invoke the
356 specified terminal capabilities
359 define Package
/sfdisk
360 $(call Package
/util-linux
/Default
)
361 TITLE
:=partition table manipulator for Linux
365 define Package
/sfdisk
/description
366 list the size of a partition
, list the partitions on a device
, check the
367 partitions on a device and repartition a device
370 define Package
/swap-utils
371 $(call Package
/util-linux
/Default
)
372 TITLE
:=swap space management utilities
377 define Package
/swap-utils
/description
378 contains
: mkswap
, swaplabel
382 $(call Package
/util-linux
/Default
)
383 TITLE
:=UUID generation daemon
387 define Package
/uuidd
/description
388 The uuidd daemon is used by the UUID library to generate universally unique
389 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
390 guaranteed-unique fashion
, even in the face of large numbers of threads
391 running on different CPUs trying to grab UUIDs.
394 define Package
/uuidgen
395 $(call Package
/util-linux
/Default
)
396 TITLE
:=create a new UUID value
400 define Package
/uuidgen
/description
401 The uuidgen program creates
(and prints
) a new universally unique identifier
402 (UUID
) using the libuuid library. The new UUID can reasonably be considered
403 unique among
all UUIDs created on the local system
, and among UUIDs created on
404 other systems in the past and in the future.
408 $(call Package
/util-linux
/Default
)
409 TITLE
:=send a message to everybody
's terminal
413 define Package/wall/description
414 wall sends a message to everybody logged in with their mesg permission
418 define Package/whereis
419 $(call Package/util-linux/Default)
420 TITLE:=locate the binary, source, and manual page files for a command
423 define Package/whereis/description
424 whereis locates source/binary and manuals sections for specified files
427 define Package/wipefs
428 $(call Package/util-linux/Default)
429 TITLE:=wipe a signature from a device
434 define Package/wipefs/description
435 wipefs can erase filesystem, raid or partition table signatures (magic
436 strings) from the specified device to make the signature invisible for
440 define Package/libblkid/install
441 $(INSTALL_DIR) $(1)/usr/lib
442 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
445 define Package/libmount/install
446 $(INSTALL_DIR) $(1)/usr/lib
447 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
450 define Package/libsmartcols/install
451 $(INSTALL_DIR) $(1)/usr/lib
452 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
455 define Package/libuuid/install
456 $(INSTALL_DIR) $(1)/usr/lib
457 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
460 define Package/agetty/install
461 $(INSTALL_DIR) $(1)/usr/sbin
462 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
465 define Package/blkid/install
466 $(INSTALL_DIR) $(1)/usr/sbin
467 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
470 define Package/cal/install
471 $(INSTALL_DIR) $(1)/usr/bin
472 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
475 define Package/cfdisk/install
476 $(INSTALL_DIR) $(1)/usr/sbin
477 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
480 define Package/dmesg/install
481 $(INSTALL_DIR) $(1)/usr/sbin
482 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
485 define Package/fdisk/install
486 $(INSTALL_DIR) $(1)/usr/sbin
487 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
490 define Package/findfs/install
491 $(INSTALL_DIR) $(1)/usr/sbin
492 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
495 define Package/flock/install
496 $(INSTALL_DIR) $(1)/usr/bin
497 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
500 define Package/getopt/install
501 $(INSTALL_DIR) $(1)/usr/bin
502 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
505 define Package/hwclock/install
506 $(INSTALL_DIR) $(1)/usr/sbin
507 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
510 define Package/logger/install
511 $(INSTALL_DIR) $(1)/usr/bin
512 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
515 define Package/look/install
516 $(INSTALL_DIR) $(1)/usr/bin
517 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
520 define Package/losetup/install
521 $(INSTALL_DIR) $(1)/usr/sbin
522 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
525 define Package/lsblk/install
526 $(INSTALL_DIR) $(1)/usr/bin
527 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
530 define Package/mcookie/install
531 $(INSTALL_DIR) $(1)/usr/bin
532 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
535 define Package/mount-utils/install
536 $(INSTALL_DIR) $(1)/usr/bin
537 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
542 define Package/namei/install
543 $(INSTALL_DIR) $(1)/usr/bin
544 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
547 define Package/prlimit/install
548 $(INSTALL_DIR) $(1)/usr/bin
549 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/prlimit $(1)/usr/bin/
552 define Package/rename/install
553 $(INSTALL_DIR) $(1)/usr/bin
554 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
557 define Package/partx-utils/install
558 $(INSTALL_DIR) $(1)/usr/sbin
559 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
560 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
564 define Package/script-utils/install
565 $(INSTALL_DIR) $(1)/usr/bin
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
567 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
570 define Package/setterm/install
571 $(INSTALL_DIR) $(1)/usr/bin
572 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
575 define Package/sfdisk/install
576 $(INSTALL_DIR) $(1)/usr/sbin
577 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
580 define Package/swap-utils/install
581 $(INSTALL_DIR) $(1)/usr/sbin
582 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
583 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
586 define Package/uuidd/install
587 $(INSTALL_DIR) $(1)/usr/sbin
588 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
591 define Package/uuidgen/install
592 $(INSTALL_DIR) $(1)/usr/bin
593 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
596 define Package/wall/install
597 $(INSTALL_DIR) $(1)/usr/bin
598 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
601 define Package/whereis/install
602 $(INSTALL_DIR) $(1)/usr/bin
603 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
606 define Package/wipefs/install
607 $(INSTALL_DIR) $(1)/usr/sbin
608 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
611 $(eval $(call BuildPackage,libblkid))
612 $(eval $(call BuildPackage,libmount))
613 $(eval $(call BuildPackage,libsmartcols))
614 $(eval $(call BuildPackage,libuuid))
615 $(eval $(call BuildPackage,agetty))
616 $(eval $(call BuildPackage,blkid))
617 $(eval $(call BuildPackage,cal))
618 $(eval $(call BuildPackage,cfdisk))
619 $(eval $(call BuildPackage,dmesg))
620 $(eval $(call BuildPackage,fdisk))
621 $(eval $(call BuildPackage,findfs))
622 $(eval $(call BuildPackage,flock))
623 $(eval $(call BuildPackage,getopt))
624 $(eval $(call BuildPackage,hwclock))
625 $(eval $(call BuildPackage,logger))
626 $(eval $(call BuildPackage,look))
627 $(eval $(call BuildPackage,losetup))
628 $(eval $(call BuildPackage,lsblk))
629 $(eval $(call BuildPackage,mcookie))
630 $(eval $(call BuildPackage,mount-utils))
631 $(eval $(call BuildPackage,namei))
632 $(eval $(call BuildPackage,prlimit))
633 $(eval $(call BuildPackage,rename))
634 $(eval $(call BuildPackage,partx-utils))
635 $(eval $(call BuildPackage,script-utils))
636 $(eval $(call BuildPackage,setterm))
637 $(eval $(call BuildPackage,sfdisk))
638 $(eval $(call BuildPackage,swap-utils))
639 $(eval $(call BuildPackage,uuidd))
640 $(eval $(call BuildPackage,uuidgen))
641 $(eval $(call BuildPackage,wall))
642 $(eval $(call BuildPackage,whereis))
643 $(eval $(call BuildPackage,wipefs))