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
)/libuuid
/uuid.
pc $(1)/usr
/lib
/pkgconfig
54 $(INSTALL_DIR
) $(1)/usr
/include/blkid
55 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/src
/blkid.h
$(1)/usr
/include/blkid
56 $(INSTALL_DIR
) $(1)/usr
/include/libmount
57 $(CP
) $(PKG_BUILD_DIR
)/libmount
/src
/libmount.h
$(1)/usr
/include/libmount
58 $(INSTALL_DIR
) $(1)/usr
/include/uuid
59 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/src
/uuid.h
$(1)/usr
/include/uuid
61 $(INSTALL_DIR
) $(1)/usr
/lib
62 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libblkid.
{a
,so
*} $(1)/usr
/lib
63 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libmount.
{a
,so
*} $(1)/usr
/lib
64 $(CP
) $(PKG_BUILD_DIR
)/.libs
/libuuid.
{a
,so
*} $(1)/usr
/lib
67 define Package
/libblkid
68 $(call Package
/util-linux
/Default
)
70 TITLE
:=block device id library
75 define Package
/libblkid
/description
76 The libblkid library is used to identify block devices
(disks
) as to their
77 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
78 information such
as filesystem labels
/volume names
, partitions
, unique
79 identifiers
/serial numbers...
82 define Package
/libmount
83 $(call Package
/util-linux
/Default
)
90 define Package
/libmount
/description
91 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
92 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
95 define Package
/libuuid
96 $(call Package
/util-linux
/Default
)
97 TITLE
:=DCE compatible Universally Unique Identifier library
102 define Package
/libuuid
/description
103 The UUID library is used to generate unique identifiers for objects
104 that may be accessible beyond the local system. This library
105 generates UUIDs compatible with those created by the Open Software
106 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
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
121 $(call Package
/util-linux
/Default
)
122 TITLE
:=locate
/print block device attributes
127 define Package
/blkid
/description
128 The blkid program is the command-line interface to working with the libblkid
133 $(call Package
/util-linux
/Default
)
134 TITLE
:=display a calendar
135 DEPENDS
:= +libncurses
138 define Package
/cal
/description
139 cal displays a simple calendar
142 define Package
/cfdisk
143 $(call Package
/util-linux
/Default
)
144 TITLE
:=display or manipulate disk partition table
145 DEPENDS
:= +libblkid
+libncurses
149 define Package
/cfdisk
/description
150 cfdisk is a curses-based program for partitioning any hard disk drive
154 $(call Package
/util-linux
/Default
)
155 TITLE
:=print or control the kernel ring buffer
159 define Package
/dmesg
/description
160 dmesg is used to examine or control the kernel ring buffer
164 $(call Package
/util-linux
/Default
)
165 TITLE
:=manipulate disk partition table
170 define Package
/fdisk
/description
171 a menu-driven program for creation and manipulation of partition tables
174 define Package
/findfs
175 $(call Package
/util-linux
/Default
)
176 TITLE
:=find a filesystem by label or UUID
181 define Package
/findfs
/description
182 findfs will search the disks in the system looking for a filesystem which has
183 a label matching label or a UUID equal to uuid
187 $(call Package
/util-linux
/Default
)
188 TITLE
:=manage locks from
shell scripts
191 define Package
/flock
/description
192 manages flock locks from within
shell scripts or the command line
195 define Package
/getopt
196 $(call Package
/util-linux
/Default
)
197 TITLE
:=parse command options
(enhanced
)
200 define Package
/getopt
/description
201 getopt is used to break up
(parse
) options in command lines for easy parsing
202 by
shell procedures
, and to
check for legal options
205 define Package
/hwclock
206 $(call Package
/util-linux
/Default
)
207 TITLE
:=query or set the hardware clock
210 define Package
/hwclock
/description
211 hwclock is a tool for accessing the Hardware Clock
214 define Package
/logger
215 $(call Package
/util-linux
/Default
)
216 TITLE
:=a
shell command interface to the syslog system log module
219 define Package
/logger
/description
220 logger makes entries in the system log
, it provides a
shell command interface
221 to the syslog system log module
225 $(call Package
/util-linux
/Default
)
226 TITLE
:=display lines beginning with a given string
229 define Package
/look
/description
230 look utility displays any lines in file which contain string
233 define Package
/losetup
234 $(call Package
/util-linux
/Default
)
235 TITLE
:=set up and control loop devices
238 define Package
/losetup
/description
239 losetup is used to associate loop devices with regular files or block devices
,
240 to detach loop devices and to query the status of a loop device
244 $(call Package
/util-linux
/Default
)
245 TITLE
:=list block devices
246 DEPENDS
:= +libblkid
+libmount
250 define Package
/lsblk
/description
251 lsblk lists information about
all or the specified block devices
254 define Package
/mcookie
255 $(call Package
/util-linux
/Default
)
256 TITLE
:=generate magic cookies for xauth
259 define Package
/mcookie
/description
260 mcookie generates a
128-bit random hexadecimal number for use with the X
264 define Package
/mount-utils
265 $(call Package
/util-linux
/Default
)
266 TITLE
:=related
(u
)mount utilities
270 define Package
/mount-utils
/description
271 contains
: mount
, umount
, findmnt
275 $(call Package
/util-linux
/Default
)
276 TITLE
:=follow a pathname until a terminal point is found
279 define Package
/namei
/description
280 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
281 files
, directories
, and so forth
)
284 define Package
/rename
285 $(call Package
/util-linux
/Default
)
289 define Package
/rename
/description
290 rename will rename the specified files by replacing the first occurrence of
291 expression in their name by replacement
294 define Package
/partx-utils
295 $(call Package
/util-linux
/Default
)
296 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
301 define Package
/partx-utils
/description
302 contains partx
, addpart
, delpart
305 define Package
/script-utils
306 $(call Package
/util-linux
/Default
)
307 TITLE
:=make and replay typescript of terminal session
311 define Package
/script-utils
/description
312 contains
: script
, scriptreplay
315 define Package
/setterm
316 $(call Package
/util-linux
/Default
)
317 TITLE
:=set terminal attributes
318 DEPENDS
:= +libncurses
322 define Package
/setterm
/description
323 setterm writes to standard output a character string that will invoke the
324 specified terminal capabilities
327 define Package
/sfdisk
328 $(call Package
/util-linux
/Default
)
329 TITLE
:=partition table manipulator for Linux
333 define Package
/sfdisk
/description
334 list the size of a partition
, list the partitions on a device
, check the
335 partitions on a device and repartition a device
338 define Package
/swap-utils
339 $(call Package
/util-linux
/Default
)
340 TITLE
:=swap space management utilities
345 define Package
/swap-utils
/description
346 contains
: mkswap
, swaplabel
350 $(call Package
/util-linux
/Default
)
351 TITLE
:=UUID generation daemon
355 define Package
/uuidd
/description
356 The uuidd daemon is used by the UUID library to generate universally unique
357 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
358 guaranteed-unique fashion
, even in the face of large numbers of threads
359 running on different CPUs trying to grab UUIDs.
362 define Package
/uuidgen
363 $(call Package
/util-linux
/Default
)
364 TITLE
:=create a new UUID value
368 define Package
/uuidgen
/description
369 The uuidgen program creates
(and prints
) a new universally unique identifier
370 (UUID
) using the libuuid library. The new UUID can reasonably be considered
371 unique among
all UUIDs created on the local system
, and among UUIDs created on
372 other systems in the past and in the future.
376 $(call Package
/util-linux
/Default
)
377 TITLE
:=send a message to everybody
's terminal
381 define Package/wall/description
382 wall sends a message to everybody logged in with their mesg permission
386 define Package/whereis
387 $(call Package/util-linux/Default)
388 TITLE:=locate the binary, source, and manual page files for a command
391 define Package/whereis/description
392 whereis locates source/binary and manuals sections for specified files
395 define Package/wipefs
396 $(call Package/util-linux/Default)
397 TITLE:=wipe a signature from a device
402 define Package/wipefs/description
403 wipefs can erase filesystem, raid or partition table signatures (magic
404 strings) from the specified device to make the signature invisible for
408 define Package/libblkid/install
409 $(INSTALL_DIR) $(1)/usr/lib
410 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
413 define Package/libmount/install
414 $(INSTALL_DIR) $(1)/usr/lib
415 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
418 define Package/libuuid/install
419 $(INSTALL_DIR) $(1)/usr/lib
420 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
423 define Package/agetty/install
424 $(INSTALL_DIR) $(1)/usr/sbin
425 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
428 define Package/blkid/install
429 $(INSTALL_DIR) $(1)/usr/sbin
430 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
433 define Package/cal/install
434 $(INSTALL_DIR) $(1)/usr/bin
435 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
438 define Package/cfdisk/install
439 $(INSTALL_DIR) $(1)/usr/sbin
440 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
443 define Package/dmesg/install
444 $(INSTALL_DIR) $(1)/usr/sbin
445 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
448 define Package/fdisk/install
449 $(INSTALL_DIR) $(1)/usr/sbin
450 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
453 define Package/findfs/install
454 $(INSTALL_DIR) $(1)/usr/sbin
455 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
458 define Package/flock/install
459 $(INSTALL_DIR) $(1)/usr/bin
460 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
463 define Package/getopt/install
464 $(INSTALL_DIR) $(1)/usr/bin
465 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
468 define Package/hwclock/install
469 $(INSTALL_DIR) $(1)/usr/sbin
470 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
473 define Package/logger/install
474 $(INSTALL_DIR) $(1)/usr/bin
475 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
478 define Package/look/install
479 $(INSTALL_DIR) $(1)/usr/bin
480 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
483 define Package/losetup/install
484 $(INSTALL_DIR) $(1)/usr/sbin
485 $(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
488 define Package/lsblk/install
489 $(INSTALL_DIR) $(1)/usr/bin
490 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
493 define Package/mcookie/install
494 $(INSTALL_DIR) $(1)/usr/bin
495 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
498 define Package/mount-utils/install
499 $(INSTALL_DIR) $(1)/usr/bin
500 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
501 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
502 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
505 define Package/namei/install
506 $(INSTALL_DIR) $(1)/usr/bin
507 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
510 define Package/rename/install
511 $(INSTALL_DIR) $(1)/usr/bin
512 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
515 define Package/partx-utils/install
516 $(INSTALL_DIR) $(1)/usr/sbin
517 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
518 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
519 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
522 define Package/script-utils/install
523 $(INSTALL_DIR) $(1)/usr/bin
524 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
525 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
528 define Package/setterm/install
529 $(INSTALL_DIR) $(1)/usr/bin
530 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
533 define Package/sfdisk/install
534 $(INSTALL_DIR) $(1)/usr/sbin
535 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
538 define Package/swap-utils/install
539 $(INSTALL_DIR) $(1)/usr/sbin
540 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
541 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
544 define Package/uuidd/install
545 $(INSTALL_DIR) $(1)/usr/sbin
546 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
549 define Package/uuidgen/install
550 $(INSTALL_DIR) $(1)/usr/bin
551 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
554 define Package/wall/install
555 $(INSTALL_DIR) $(1)/usr/bin
556 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
559 define Package/whereis/install
560 $(INSTALL_DIR) $(1)/usr/bin
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
564 define Package/wipefs/install
565 $(INSTALL_DIR) $(1)/usr/sbin
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
569 $(eval $(call BuildPackage,libblkid))
570 $(eval $(call BuildPackage,libmount))
571 $(eval $(call BuildPackage,libuuid))
572 $(eval $(call BuildPackage,agetty))
573 $(eval $(call BuildPackage,blkid))
574 $(eval $(call BuildPackage,cal))
575 $(eval $(call BuildPackage,cfdisk))
576 $(eval $(call BuildPackage,dmesg))
577 $(eval $(call BuildPackage,fdisk))
578 $(eval $(call BuildPackage,findfs))
579 $(eval $(call BuildPackage,flock))
580 $(eval $(call BuildPackage,getopt))
581 $(eval $(call BuildPackage,hwclock))
582 $(eval $(call BuildPackage,logger))
583 $(eval $(call BuildPackage,look))
584 $(eval $(call BuildPackage,losetup))
585 $(eval $(call BuildPackage,lsblk))
586 $(eval $(call BuildPackage,mcookie))
587 $(eval $(call BuildPackage,mount-utils))
588 $(eval $(call BuildPackage,namei))
589 $(eval $(call BuildPackage,rename))
590 $(eval $(call BuildPackage,partx-utils))
591 $(eval $(call BuildPackage,script-utils))
592 $(eval $(call BuildPackage,setterm))
593 $(eval $(call BuildPackage,sfdisk))
594 $(eval $(call BuildPackage,swap-utils))
595 $(eval $(call BuildPackage,uuidd))
596 $(eval $(call BuildPackage,uuidgen))
597 $(eval $(call BuildPackage,wall))
598 $(eval $(call BuildPackage,whereis))
599 $(eval $(call BuildPackage,wipefs))