2 # Copyright (C) 2007-2014 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
22 PKG_BUILD_DEPENDS
:=libncurses
25 include $(INCLUDE_DIR
)/package.mk
27 define Package
/util-linux
/Default
30 URL
:=http
://www.kernel.org
/pub
/linux
/utils
/util-linux
/
41 TARGET_CFLAGS
+= $(FPIC
) -std
=gnu99
43 define Build
/InstallDev
44 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
47 installdirs install-data
49 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
50 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/blkid.
pc $(1)/usr
/lib
/pkgconfig
51 $(CP
) $(PKG_BUILD_DIR
)/libmount
/mount.
pc $(1)/usr
/lib
/pkgconfig
52 $(CP
) $(PKG_BUILD_DIR
)/libsmartcols
/smartcols.
pc $(1)/usr
/lib
/pkgconfig
53 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/uuid.
pc $(1)/usr
/lib
/pkgconfig
55 $(INSTALL_DIR
) $(1)/usr
/include/blkid
56 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/src
/blkid.h
$(1)/usr
/include/blkid
57 $(INSTALL_DIR
) $(1)/usr
/include/libmount
58 $(CP
) $(PKG_BUILD_DIR
)/libmount
/src
/libmount.h
$(1)/usr
/include/libmount
59 $(INSTALL_DIR
) $(1)/usr
/include/uuid
60 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/src
/uuid.h
$(1)/usr
/include/uuid
61 $(INSTALL_DIR
) $(1)/usr
/include/smartcols
62 $(CP
) $(PKG_BUILD_DIR
)/libsmartcols
/src
/libsmartcols.h
$(1)/usr
/include/smartcols
64 $(INSTALL_DIR
) $(1)/usr
/lib
65 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libblkid.
{a
,so
*} $(1)/usr
/lib
66 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libmount.
{a
,so
*} $(1)/usr
/lib
67 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libuuid.
{a
,so
*} $(1)/usr
/lib
68 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libsmartcols.
{a
,so
*} $(1)/usr
/lib
71 define Package
/libblkid
72 $(call Package
/util-linux
/Default
)
74 TITLE
:=block device id library
79 define Package
/libblkid
/description
80 The libblkid library is used to identify block devices
(disks
) as to their
81 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
82 information such
as filesystem labels
/volume names
, partitions
, unique
83 identifiers
/serial numbers...
86 define Package
/libmount
87 $(call Package
/util-linux
/Default
)
94 define Package
/libmount
/description
95 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
96 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
99 define Package
/libuuid
100 $(call Package
/util-linux
/Default
)
101 TITLE
:=DCE compatible Universally Unique Identifier library
106 define Package
/libuuid
/description
107 The UUID library is used to generate unique identifiers for objects
108 that may be accessible beyond the local system. This library
109 generates UUIDs compatible with those created by the Open Software
110 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
113 define Package
/libsmartcols
114 $(call Package
/util-linux
/Default
)
115 TITLE
:=table or tree library
120 define Package
/libsmartcols
/description
121 The smartcols library is used to
print tables and trees in a pretty way.
124 define Package
/agetty
125 $(call Package
/util-linux
/Default
)
126 TITLE
:=alternative Linux getty
130 define Package
/agetty
/description
131 agetty opens a tty port
, prompts for a login name and invokes the
136 $(call Package
/util-linux
/Default
)
137 TITLE
:=locate
/print block device attributes
138 DEPENDS
:= +libblkid
+libuuid
142 define Package
/blkid
/description
143 The blkid program is the command-line interface to working with the libblkid
148 $(call Package
/util-linux
/Default
)
149 TITLE
:=display a calendar
150 DEPENDS
:= +libncurses
153 define Package
/cal
/description
154 cal displays a simple calendar
157 define Package
/cfdisk
158 $(call Package
/util-linux
/Default
)
159 TITLE
:=display or manipulate disk partition table
160 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
164 define Package
/cfdisk
/description
165 cfdisk is a curses-based program for partitioning any hard disk drive
169 $(call Package
/util-linux
/Default
)
170 TITLE
:=print or control the kernel ring buffer
174 define Package
/dmesg
/description
175 dmesg is used to examine or control the kernel ring buffer
179 $(call Package
/util-linux
/Default
)
180 TITLE
:=manipulate disk partition table
181 DEPENDS
:= +libblkid
+libsmartcols
185 define Package
/fdisk
/description
186 a menu-driven program for creation and manipulation of partition tables
189 define Package
/findfs
190 $(call Package
/util-linux
/Default
)
191 TITLE
:=find a filesystem by label or UUID
196 define Package
/findfs
/description
197 findfs will search the disks in the system looking for a filesystem which has
198 a label matching label or a UUID equal to uuid
202 $(call Package
/util-linux
/Default
)
203 TITLE
:=manage locks from
shell scripts
206 define Package
/flock
/description
207 manages flock locks from within
shell scripts or the command line
210 define Package
/getopt
211 $(call Package
/util-linux
/Default
)
212 TITLE
:=parse command options
(enhanced
)
215 define Package
/getopt
/description
216 getopt is used to break up
(parse
) options in command lines for easy parsing
217 by
shell procedures
, and to
check for legal options
220 define Package
/hwclock
221 $(call Package
/util-linux
/Default
)
222 TITLE
:=query or set the hardware clock
225 define Package
/hwclock
/description
226 hwclock is a tool for accessing the Hardware Clock
229 define Package
/logger
230 $(call Package
/util-linux
/Default
)
231 TITLE
:=a
shell command interface to the syslog system log module
234 define Package
/logger
/description
235 logger makes entries in the system log
, it provides a
shell command interface
236 to the syslog system log module
240 $(call Package
/util-linux
/Default
)
241 TITLE
:=display lines beginning with a given string
244 define Package
/look
/description
245 look utility displays any lines in file which contain string
248 define Package
/losetup
249 $(call Package
/util-linux
/Default
)
250 TITLE
:=set up and control loop devices
251 DEPENDS
:= +libsmartcols
254 define Package
/losetup
/description
255 losetup is used to associate loop devices with regular files or block devices
,
256 to detach loop devices and to query the status of a loop device
260 $(call Package
/util-linux
/Default
)
261 TITLE
:=list block devices
262 DEPENDS
:= +libblkid
+libmount
+libsmartcols
266 define Package
/lsblk
/description
267 lsblk lists information about
all or the specified block devices
270 define Package
/mcookie
271 $(call Package
/util-linux
/Default
)
272 TITLE
:=generate magic cookies for xauth
275 define Package
/mcookie
/description
276 mcookie generates a
128-bit random hexadecimal number for use with the X
280 define Package
/mount-utils
281 $(call Package
/util-linux
/Default
)
282 TITLE
:=related
(u
)mount utilities
283 DEPENDS
+= +libmount
+libsmartcols
286 define Package
/mount-utils
/description
287 contains
: mount
, umount
, findmnt
291 $(call Package
/util-linux
/Default
)
292 TITLE
:=follow a pathname until a terminal point is found
295 define Package
/namei
/description
296 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
297 files
, directories
, and so forth
)
300 define Package
/rename
301 $(call Package
/util-linux
/Default
)
305 define Package
/rename
/description
306 rename will rename the specified files by replacing the first occurrence of
307 expression in their name by replacement
310 define Package
/partx-utils
311 $(call Package
/util-linux
/Default
)
312 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
313 DEPENDS
:= +libblkid
+libsmartcols
317 define Package
/partx-utils
/description
318 contains partx
, addpart
, delpart
321 define Package
/script-utils
322 $(call Package
/util-linux
/Default
)
323 TITLE
:=make and replay typescript of terminal session
327 define Package
/script-utils
/description
328 contains
: script
, scriptreplay
331 define Package
/setterm
332 $(call Package
/util-linux
/Default
)
333 TITLE
:=set terminal attributes
334 DEPENDS
:= +libncurses
338 define Package
/setterm
/description
339 setterm writes to standard output a character string that will invoke the
340 specified terminal capabilities
343 define Package
/sfdisk
344 $(call Package
/util-linux
/Default
)
345 TITLE
:=partition table manipulator for Linux
349 define Package
/sfdisk
/description
350 list the size of a partition
, list the partitions on a device
, check the
351 partitions on a device and repartition a device
354 define Package
/swap-utils
355 $(call Package
/util-linux
/Default
)
356 TITLE
:=swap space management utilities
361 define Package
/swap-utils
/description
362 contains
: mkswap
, swaplabel
366 $(call Package
/util-linux
/Default
)
367 TITLE
:=UUID generation daemon
371 define Package
/uuidd
/description
372 The uuidd daemon is used by the UUID library to generate universally unique
373 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
374 guaranteed-unique fashion
, even in the face of large numbers of threads
375 running on different CPUs trying to grab UUIDs.
378 define Package
/uuidgen
379 $(call Package
/util-linux
/Default
)
380 TITLE
:=create a new UUID value
384 define Package
/uuidgen
/description
385 The uuidgen program creates
(and prints
) a new universally unique identifier
386 (UUID
) using the libuuid library. The new UUID can reasonably be considered
387 unique among
all UUIDs created on the local system
, and among UUIDs created on
388 other systems in the past and in the future.
392 $(call Package
/util-linux
/Default
)
393 TITLE
:=send a message to everybody
's terminal
397 define Package/wall/description
398 wall sends a message to everybody logged in with their mesg permission
402 define Package/whereis
403 $(call Package/util-linux/Default)
404 TITLE:=locate the binary, source, and manual page files for a command
407 define Package/whereis/description
408 whereis locates source/binary and manuals sections for specified files
411 define Package/wipefs
412 $(call Package/util-linux/Default)
413 TITLE:=wipe a signature from a device
418 define Package/wipefs/description
419 wipefs can erase filesystem, raid or partition table signatures (magic
420 strings) from the specified device to make the signature invisible for
424 define Package/libblkid/install
425 $(INSTALL_DIR) $(1)/usr/lib
426 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
429 define Package/libmount/install
430 $(INSTALL_DIR) $(1)/usr/lib
431 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
434 define Package/libsmartcols/install
435 $(INSTALL_DIR) $(1)/usr/lib
436 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
439 define Package/libuuid/install
440 $(INSTALL_DIR) $(1)/usr/lib
441 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
444 define Package/agetty/install
445 $(INSTALL_DIR) $(1)/usr/sbin
446 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
449 define Package/blkid/install
450 $(INSTALL_DIR) $(1)/usr/sbin
451 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
454 define Package/cal/install
455 $(INSTALL_DIR) $(1)/usr/bin
456 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
459 define Package/cfdisk/install
460 $(INSTALL_DIR) $(1)/usr/sbin
461 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
464 define Package/dmesg/install
465 $(INSTALL_DIR) $(1)/usr/sbin
466 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
469 define Package/fdisk/install
470 $(INSTALL_DIR) $(1)/usr/sbin
471 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
474 define Package/findfs/install
475 $(INSTALL_DIR) $(1)/usr/sbin
476 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
479 define Package/flock/install
480 $(INSTALL_DIR) $(1)/usr/bin
481 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
484 define Package/getopt/install
485 $(INSTALL_DIR) $(1)/usr/bin
486 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
489 define Package/hwclock/install
490 $(INSTALL_DIR) $(1)/usr/sbin
491 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
494 define Package/logger/install
495 $(INSTALL_DIR) $(1)/usr/bin
496 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
499 define Package/look/install
500 $(INSTALL_DIR) $(1)/usr/bin
501 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
504 define Package/losetup/install
505 $(INSTALL_DIR) $(1)/usr/sbin
506 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
509 define Package/lsblk/install
510 $(INSTALL_DIR) $(1)/usr/bin
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
514 define Package/mcookie/install
515 $(INSTALL_DIR) $(1)/usr/bin
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
519 define Package/mount-utils/install
520 $(INSTALL_DIR) $(1)/usr/bin
521 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
522 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
523 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
526 define Package/namei/install
527 $(INSTALL_DIR) $(1)/usr/bin
528 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
531 define Package/rename/install
532 $(INSTALL_DIR) $(1)/usr/bin
533 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
536 define Package/partx-utils/install
537 $(INSTALL_DIR) $(1)/usr/sbin
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
540 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
543 define Package/script-utils/install
544 $(INSTALL_DIR) $(1)/usr/bin
545 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
546 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
549 define Package/setterm/install
550 $(INSTALL_DIR) $(1)/usr/bin
551 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
554 define Package/sfdisk/install
555 $(INSTALL_DIR) $(1)/usr/sbin
556 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
559 define Package/swap-utils/install
560 $(INSTALL_DIR) $(1)/usr/sbin
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
562 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
565 define Package/uuidd/install
566 $(INSTALL_DIR) $(1)/usr/sbin
567 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
570 define Package/uuidgen/install
571 $(INSTALL_DIR) $(1)/usr/bin
572 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
575 define Package/wall/install
576 $(INSTALL_DIR) $(1)/usr/bin
577 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
580 define Package/whereis/install
581 $(INSTALL_DIR) $(1)/usr/bin
582 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
585 define Package/wipefs/install
586 $(INSTALL_DIR) $(1)/usr/sbin
587 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
590 $(eval $(call BuildPackage,libblkid))
591 $(eval $(call BuildPackage,libmount))
592 $(eval $(call BuildPackage,libsmartcols))
593 $(eval $(call BuildPackage,libuuid))
594 $(eval $(call BuildPackage,agetty))
595 $(eval $(call BuildPackage,blkid))
596 $(eval $(call BuildPackage,cal))
597 $(eval $(call BuildPackage,cfdisk))
598 $(eval $(call BuildPackage,dmesg))
599 $(eval $(call BuildPackage,fdisk))
600 $(eval $(call BuildPackage,findfs))
601 $(eval $(call BuildPackage,flock))
602 $(eval $(call BuildPackage,getopt))
603 $(eval $(call BuildPackage,hwclock))
604 $(eval $(call BuildPackage,logger))
605 $(eval $(call BuildPackage,look))
606 $(eval $(call BuildPackage,losetup))
607 $(eval $(call BuildPackage,lsblk))
608 $(eval $(call BuildPackage,mcookie))
609 $(eval $(call BuildPackage,mount-utils))
610 $(eval $(call BuildPackage,namei))
611 $(eval $(call BuildPackage,rename))
612 $(eval $(call BuildPackage,partx-utils))
613 $(eval $(call BuildPackage,script-utils))
614 $(eval $(call BuildPackage,setterm))
615 $(eval $(call BuildPackage,sfdisk))
616 $(eval $(call BuildPackage,swap-utils))
617 $(eval $(call BuildPackage,uuidd))
618 $(eval $(call BuildPackage,uuidgen))
619 $(eval $(call BuildPackage,wall))
620 $(eval $(call BuildPackage,whereis))
621 $(eval $(call BuildPackage,wipefs))