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
/
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
)/libmount
/mount.
pc $(1)/usr
/lib
/pkgconfig
58 $(CP
) $(PKG_BUILD_DIR
)/libsmartcols
/smartcols.
pc $(1)/usr
/lib
/pkgconfig
59 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/uuid.
pc $(1)/usr
/lib
/pkgconfig
61 $(INSTALL_DIR
) $(1)/usr
/include/blkid
62 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/src
/blkid.h
$(1)/usr
/include/blkid
63 $(INSTALL_DIR
) $(1)/usr
/include/libmount
64 $(CP
) $(PKG_BUILD_DIR
)/libmount
/src
/libmount.h
$(1)/usr
/include/libmount
65 $(INSTALL_DIR
) $(1)/usr
/include/uuid
66 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/src
/uuid.h
$(1)/usr
/include/uuid
67 $(INSTALL_DIR
) $(1)/usr
/include/smartcols
68 $(CP
) $(PKG_BUILD_DIR
)/libsmartcols
/src
/libsmartcols.h
$(1)/usr
/include/smartcols
70 $(INSTALL_DIR
) $(1)/usr
/lib
71 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libblkid.
{a
,so
*} $(1)/usr
/lib
72 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libmount.
{a
,so
*} $(1)/usr
/lib
73 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libuuid.
{a
,so
*} $(1)/usr
/lib
74 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libsmartcols.
{a
,so
*} $(1)/usr
/lib
77 define Package
/libblkid
78 $(call Package
/util-linux
/Default
)
80 TITLE
:=block device id library
85 define Package
/libblkid
/description
86 The libblkid library is used to identify block devices
(disks
) as to their
87 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
88 information such
as filesystem labels
/volume names
, partitions
, unique
89 identifiers
/serial numbers...
92 define Package
/libmount
93 $(call Package
/util-linux
/Default
)
100 define Package
/libmount
/description
101 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
102 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
105 define Package
/libuuid
106 $(call Package
/util-linux
/Default
)
107 TITLE
:=DCE compatible Universally Unique Identifier library
112 define Package
/libuuid
/description
113 The UUID library is used to generate unique identifiers for objects
114 that may be accessible beyond the local system. This library
115 generates UUIDs compatible with those created by the Open Software
116 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
119 define Package
/libsmartcols
120 $(call Package
/util-linux
/Default
)
121 TITLE
:=table or tree library
126 define Package
/libsmartcols
/description
127 The smartcols library is used to
print tables and trees in a pretty way.
130 define Package
/agetty
131 $(call Package
/util-linux
/Default
)
132 TITLE
:=alternative Linux getty
136 define Package
/agetty
/description
137 agetty opens a tty port
, prompts for a login name and invokes the
142 $(call Package
/util-linux
/Default
)
143 TITLE
:=locate
/print block device attributes
144 DEPENDS
:= +libblkid
+libuuid
148 define Package
/blkid
/description
149 The blkid program is the command-line interface to working with the libblkid
154 $(call Package
/util-linux
/Default
)
155 TITLE
:=display a calendar
156 DEPENDS
:= +libncurses
159 define Package
/cal
/description
160 cal displays a simple calendar
163 define Package
/cfdisk
164 $(call Package
/util-linux
/Default
)
165 TITLE
:=display or manipulate disk partition table
166 DEPENDS
:= +libblkid
+libncurses
+libsmartcols
170 define Package
/cfdisk
/description
171 cfdisk is a curses-based program for partitioning any hard disk drive
175 $(call Package
/util-linux
/Default
)
176 TITLE
:=print or control the kernel ring buffer
180 define Package
/dmesg
/description
181 dmesg is used to examine or control the kernel ring buffer
185 $(call Package
/util-linux
/Default
)
186 TITLE
:=manipulate disk partition table
187 DEPENDS
:= +libblkid
+libsmartcols
191 define Package
/fdisk
/description
192 a menu-driven program for creation and manipulation of partition tables
195 define Package
/findfs
196 $(call Package
/util-linux
/Default
)
197 TITLE
:=find a filesystem by label or UUID
202 define Package
/findfs
/description
203 findfs will search the disks in the system looking for a filesystem which has
204 a label matching label or a UUID equal to uuid
208 $(call Package
/util-linux
/Default
)
209 TITLE
:=manage locks from
shell scripts
212 define Package
/flock
/description
213 manages flock locks from within
shell scripts or the command line
216 define Package
/getopt
217 $(call Package
/util-linux
/Default
)
218 TITLE
:=parse command options
(enhanced
)
221 define Package
/getopt
/description
222 getopt is used to break up
(parse
) options in command lines for easy parsing
223 by
shell procedures
, and to
check for legal options
226 define Package
/hwclock
227 $(call Package
/util-linux
/Default
)
228 TITLE
:=query or set the hardware clock
231 define Package
/hwclock
/description
232 hwclock is a tool for accessing the Hardware Clock
235 define Package
/logger
236 $(call Package
/util-linux
/Default
)
237 TITLE
:=a
shell command interface to the syslog system log module
240 define Package
/logger
/description
241 logger makes entries in the system log
, it provides a
shell command interface
242 to the syslog system log module
246 $(call Package
/util-linux
/Default
)
247 TITLE
:=display lines beginning with a given string
250 define Package
/look
/description
251 look utility displays any lines in file which contain string
254 define Package
/losetup
255 $(call Package
/util-linux
/Default
)
256 TITLE
:=set up and control loop devices
257 DEPENDS
:= +libsmartcols
260 define Package
/losetup
/description
261 losetup is used to associate loop devices with regular files or block devices
,
262 to detach loop devices and to query the status of a loop device
266 $(call Package
/util-linux
/Default
)
267 TITLE
:=list block devices
268 DEPENDS
:= +libblkid
+libmount
+libsmartcols
272 define Package
/lsblk
/description
273 lsblk lists information about
all or the specified block devices
276 define Package
/mcookie
277 $(call Package
/util-linux
/Default
)
278 TITLE
:=generate magic cookies for xauth
281 define Package
/mcookie
/description
282 mcookie generates a
128-bit random hexadecimal number for use with the X
286 define Package
/mount-utils
287 $(call Package
/util-linux
/Default
)
288 TITLE
:=related
(u
)mount utilities
289 DEPENDS
+= +libmount
+libsmartcols
292 define Package
/mount-utils
/description
293 contains
: mount
, umount
, findmnt
297 $(call Package
/util-linux
/Default
)
298 TITLE
:=follow a pathname until a terminal point is found
301 define Package
/namei
/description
302 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
303 files
, directories
, and so forth
)
306 define Package
/prlimit
307 $(call Package
/util-linux
/Default
)
308 TITLE
:=get and set process resource limits
309 DEPENDS
:= +libsmartcols
312 define Package
/prlimit
/description
313 Given a process id and one or more resources
, prlimit tries to retrieve
314 and
/or modify the limits.
317 define Package
/rename
318 $(call Package
/util-linux
/Default
)
322 define Package
/rename
/description
323 rename will rename the specified files by replacing the first occurrence of
324 expression in their name by replacement
327 define Package
/partx-utils
328 $(call Package
/util-linux
/Default
)
329 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
330 DEPENDS
:= +libblkid
+libsmartcols
334 define Package
/partx-utils
/description
335 contains partx
, addpart
, delpart
338 define Package
/script-utils
339 $(call Package
/util-linux
/Default
)
340 TITLE
:=make and replay typescript of terminal session
344 define Package
/script-utils
/description
345 contains
: script
, scriptreplay
348 define Package
/setterm
349 $(call Package
/util-linux
/Default
)
350 TITLE
:=set terminal attributes
351 DEPENDS
:= +libncurses
355 define Package
/setterm
/description
356 setterm writes to standard output a character string that will invoke the
357 specified terminal capabilities
360 define Package
/sfdisk
361 $(call Package
/util-linux
/Default
)
362 TITLE
:=partition table manipulator for Linux
366 define Package
/sfdisk
/description
367 list the size of a partition
, list the partitions on a device
, check the
368 partitions on a device and repartition a device
371 define Package
/swap-utils
372 $(call Package
/util-linux
/Default
)
373 TITLE
:=swap space management utilities
378 define Package
/swap-utils
/description
379 contains
: mkswap
, swaplabel
383 $(call Package
/util-linux
/Default
)
384 TITLE
:=UUID generation daemon
388 define Package
/uuidd
/description
389 The uuidd daemon is used by the UUID library to generate universally unique
390 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
391 guaranteed-unique fashion
, even in the face of large numbers of threads
392 running on different CPUs trying to grab UUIDs.
395 define Package
/uuidgen
396 $(call Package
/util-linux
/Default
)
397 TITLE
:=create a new UUID value
401 define Package
/uuidgen
/description
402 The uuidgen program creates
(and prints
) a new universally unique identifier
403 (UUID
) using the libuuid library. The new UUID can reasonably be considered
404 unique among
all UUIDs created on the local system
, and among UUIDs created on
405 other systems in the past and in the future.
409 $(call Package
/util-linux
/Default
)
410 TITLE
:=send a message to everybody
's terminal
414 define Package/wall/description
415 wall sends a message to everybody logged in with their mesg permission
419 define Package/whereis
420 $(call Package/util-linux/Default)
421 TITLE:=locate the binary, source, and manual page files for a command
424 define Package/whereis/description
425 whereis locates source/binary and manuals sections for specified files
428 define Package/wipefs
429 $(call Package/util-linux/Default)
430 TITLE:=wipe a signature from a device
435 define Package/wipefs/description
436 wipefs can erase filesystem, raid or partition table signatures (magic
437 strings) from the specified device to make the signature invisible for
441 define Package/libblkid/install
442 $(INSTALL_DIR) $(1)/usr/lib
443 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so* $(1)/usr/lib/
446 define Package/libmount/install
447 $(INSTALL_DIR) $(1)/usr/lib
448 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so* $(1)/usr/lib/
451 define Package/libsmartcols/install
452 $(INSTALL_DIR) $(1)/usr/lib
453 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so* $(1)/usr/lib/
456 define Package/libuuid/install
457 $(INSTALL_DIR) $(1)/usr/lib
458 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so* $(1)/usr/lib/
461 define Package/agetty/install
462 $(INSTALL_DIR) $(1)/usr/sbin
463 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
466 define Package/blkid/install
467 $(INSTALL_DIR) $(1)/usr/sbin
468 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
471 define Package/cal/install
472 $(INSTALL_DIR) $(1)/usr/bin
473 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
476 define Package/cfdisk/install
477 $(INSTALL_DIR) $(1)/usr/sbin
478 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
481 define Package/dmesg/install
482 $(INSTALL_DIR) $(1)/usr/sbin
483 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
486 define Package/fdisk/install
487 $(INSTALL_DIR) $(1)/usr/sbin
488 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
491 define Package/findfs/install
492 $(INSTALL_DIR) $(1)/usr/sbin
493 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
496 define Package/flock/install
497 $(INSTALL_DIR) $(1)/usr/bin
498 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
501 define Package/getopt/install
502 $(INSTALL_DIR) $(1)/usr/bin
503 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
506 define Package/hwclock/install
507 $(INSTALL_DIR) $(1)/usr/sbin
508 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
511 define Package/logger/install
512 $(INSTALL_DIR) $(1)/usr/bin
513 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
516 define Package/look/install
517 $(INSTALL_DIR) $(1)/usr/bin
518 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
521 define Package/losetup/install
522 $(INSTALL_DIR) $(1)/usr/sbin
523 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/losetup $(1)/usr/sbin/
526 define Package/lsblk/install
527 $(INSTALL_DIR) $(1)/usr/bin
528 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
531 define Package/mcookie/install
532 $(INSTALL_DIR) $(1)/usr/bin
533 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
536 define Package/mount-utils/install
537 $(INSTALL_DIR) $(1)/usr/bin
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
540 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
543 define Package/namei/install
544 $(INSTALL_DIR) $(1)/usr/bin
545 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
548 define Package/prlimit/install
549 $(INSTALL_DIR) $(1)/usr/bin
550 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/prlimit $(1)/usr/bin/
553 define Package/rename/install
554 $(INSTALL_DIR) $(1)/usr/bin
555 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
558 define Package/partx-utils/install
559 $(INSTALL_DIR) $(1)/usr/sbin
560 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
562 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
565 define Package/script-utils/install
566 $(INSTALL_DIR) $(1)/usr/bin
567 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
568 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
571 define Package/setterm/install
572 $(INSTALL_DIR) $(1)/usr/bin
573 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
576 define Package/sfdisk/install
577 $(INSTALL_DIR) $(1)/usr/sbin
578 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
581 define Package/swap-utils/install
582 $(INSTALL_DIR) $(1)/usr/sbin
583 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
584 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
587 define Package/uuidd/install
588 $(INSTALL_DIR) $(1)/usr/sbin
589 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
592 define Package/uuidgen/install
593 $(INSTALL_DIR) $(1)/usr/bin
594 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
597 define Package/wall/install
598 $(INSTALL_DIR) $(1)/usr/bin
599 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
602 define Package/whereis/install
603 $(INSTALL_DIR) $(1)/usr/bin
604 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
607 define Package/wipefs/install
608 $(INSTALL_DIR) $(1)/usr/sbin
609 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
612 $(eval $(call BuildPackage,libblkid))
613 $(eval $(call BuildPackage,libmount))
614 $(eval $(call BuildPackage,libsmartcols))
615 $(eval $(call BuildPackage,libuuid))
616 $(eval $(call BuildPackage,agetty))
617 $(eval $(call BuildPackage,blkid))
618 $(eval $(call BuildPackage,cal))
619 $(eval $(call BuildPackage,cfdisk))
620 $(eval $(call BuildPackage,dmesg))
621 $(eval $(call BuildPackage,fdisk))
622 $(eval $(call BuildPackage,findfs))
623 $(eval $(call BuildPackage,flock))
624 $(eval $(call BuildPackage,getopt))
625 $(eval $(call BuildPackage,hwclock))
626 $(eval $(call BuildPackage,logger))
627 $(eval $(call BuildPackage,look))
628 $(eval $(call BuildPackage,losetup))
629 $(eval $(call BuildPackage,lsblk))
630 $(eval $(call BuildPackage,mcookie))
631 $(eval $(call BuildPackage,mount-utils))
632 $(eval $(call BuildPackage,namei))
633 $(eval $(call BuildPackage,prlimit))
634 $(eval $(call BuildPackage,rename))
635 $(eval $(call BuildPackage,partx-utils))
636 $(eval $(call BuildPackage,script-utils))
637 $(eval $(call BuildPackage,setterm))
638 $(eval $(call BuildPackage,sfdisk))
639 $(eval $(call BuildPackage,swap-utils))
640 $(eval $(call BuildPackage,uuidd))
641 $(eval $(call BuildPackage,uuidgen))
642 $(eval $(call BuildPackage,wall))
643 $(eval $(call BuildPackage,whereis))
644 $(eval $(call BuildPackage,wipefs))