2 # Copyright (C) 2007-2012 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.21
16 PKG_MD5SUM
:=ad602dcd528f340b1329cfa6200d8f80
19 PKG_BUILD_DEPENDS
:=libncurses
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/util-linux
/Default
27 URL
:=http
://www.kernel.org
/pub
/linux
/utils
/util-linux
/
31 scanf_cv_alloc_modifier
="ms"
39 define Build
/InstallDev
40 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
43 installdirs install-data
45 $(INSTALL_DIR
) $(1)/usr
/lib
/pkgconfig
46 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/blkid.
pc $(1)/usr
/lib
/pkgconfig
47 $(CP
) $(PKG_BUILD_DIR
)/libmount
/mount.
pc $(1)/usr
/lib
/pkgconfig
48 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/uuid.
pc $(1)/usr
/lib
/pkgconfig
50 $(INSTALL_DIR
) $(1)/usr
/include/blkid
51 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/src
/blkid.h
$(1)/usr
/include/blkid
52 $(INSTALL_DIR
) $(1)/usr
/include/libmount
53 $(CP
) $(PKG_BUILD_DIR
)/libmount
/src
/libmount.h
$(1)/usr
/include/libmount
54 $(INSTALL_DIR
) $(1)/usr
/include/uuid
55 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/src
/uuid.h
$(1)/usr
/include/uuid
57 $(INSTALL_DIR
) $(1)/usr
/lib
58 $(CP
) $(PKG_BUILD_DIR
)/libblkid
/src
/.libs
/libblkid.
{a
,so.
*} $(1)/usr
/lib
59 $(CP
) $(PKG_BUILD_DIR
)/libmount
/src
/.libs
/libmount.
{a
,so.
*} $(1)/usr
/lib
60 $(CP
) $(PKG_BUILD_DIR
)/libuuid
/src
/.libs
/libuuid.
{a
,so.
*} $(1)/usr
/lib
63 define Package
/libblkid
64 $(call Package
/util-linux
/Default
)
65 TITLE
:=block device id library
70 define Package
/libblkid
/description
71 The libblkid library is used to identify block devices
(disks
) as to their
72 content
(e.g. filesystem type
, partitions
) as well
as extracting additional
73 information such
as filesystem labels
/volume names
, partitions
, unique
74 identifiers
/serial numbers...
77 define Package
/libmount
78 $(call Package
/util-linux
/Default
)
84 define Package
/libblkid
/description
85 The libmount library is used to parse
/etc
/fstab
, /etc
/mtab and
86 /proc
/self
/mountinfo files
, manage the mtab file
, evaluate mount options...
89 define Package
/libuuid
90 $(call Package
/util-linux
/Default
)
91 TITLE
:=DCE compatible Universally Unique Identifier library
96 define Package
/libuuid
/description
97 The UUID library is used to generate unique identifiers for objects
98 that may be accessible beyond the local system. This library
99 generates UUIDs compatible with those created by the Open Software
100 Foundation
(OSF
) Distributed Computing Environment
(DCE
) utility.
103 define Package
/agetty
104 $(call Package
/util-linux
/Default
)
105 TITLE
:=alternative Linux getty
109 define Package
/agetty
/description
110 agetty opens a tty port
, prompts for a login name and invokes the
115 $(call Package
/util-linux
/Default
)
116 TITLE
:=locate
/print block device attributes
117 DEPENDS
:= +libblkid
+libuuid
121 define Package
/blkid
/description
122 The blkid program is the command-line interface to working with the libblkid
127 $(call Package
/util-linux
/Default
)
128 TITLE
:=display a calendar
129 DEPENDS
:= +libncurses
132 define Package
/cal
/description
133 cal displays a simple calendar
136 define Package
/cfdisk
137 $(call Package
/util-linux
/Default
)
138 TITLE
:=display or manipulate disk partition table
139 DEPENDS
:= +libblkid
+libncurses
+libuuid
143 define Package
/cfdisk
/description
144 cfdisk is a curses-based program for partitioning any hard disk drive
148 $(call Package
/util-linux
/Default
)
149 TITLE
:=print or control the kernel ring buffer
152 define Package
/dmesg
/description
153 dmesg is used to examine or control the kernel ring buffer
157 $(call Package
/util-linux
/Default
)
158 TITLE
:=manipulate disk partition table
159 DEPENDS
:= +libblkid
+libuuid
163 define Package
/fdisk
/description
164 a menu-driven program for creation and manipulation of partition tables
167 define Package
/findfs
168 $(call Package
/util-linux
/Default
)
169 TITLE
:=find a filesystem by label or UUID
170 DEPENDS
:= +libblkid
+libuuid
174 define Package
/findfs
/description
175 findfs will search the disks in the system looking for a filesystem which has
176 a label matching label or a UUID equal to uuid
180 $(call Package
/util-linux
/Default
)
181 TITLE
:=manage locks from
shell scripts
184 define Package
/flock
/description
185 manages flock locks from within
shell scripts or the command line
188 define Package
/getopt
189 $(call Package
/util-linux
/Default
)
190 TITLE
:=parse command options
(enhanced
)
193 define Package
/getopt
/description
194 getopt is used to break up
(parse
) options in command lines for easy parsing
195 by
shell procedures
, and to
check for legal options
198 define Package
/hwclock
199 $(call Package
/util-linux
/Default
)
200 TITLE
:=query or set the hardware clock
203 define Package
/hwclock
/description
204 hwclock is a tool for accessing the Hardware Clock
207 define Package
/logger
208 $(call Package
/util-linux
/Default
)
209 TITLE
:=a
shell command interface to the syslog system log module
212 define Package
/logger
/description
213 logger makes entries in the system log
, it provides a
shell command interface to the syslog system log module
217 $(call Package
/util-linux
/Default
)
218 TITLE
:=display lines beginning with a given string
221 define Package
/look
/description
222 look utility displays any lines in file which contain string
225 define Package
/losetup
226 $(call Package
/util-linux
/Default
)
227 TITLE
:=set up and control loop devices
230 define Package
/losetup
/description
231 losetup is used to associate loop devices with regular files or block devices
,
232 to detach loop devices and to query the status of a loop device
236 $(call Package
/util-linux
/Default
)
237 TITLE
:=list block devices
238 DEPENDS
:= +libblkid
+libuuid
242 define Package
/lsblk
/description
243 lsblk lists information about
all or the specified block devices
246 define Package
/mcookie
247 $(call Package
/util-linux
/Default
)
248 TITLE
:=generate magic cookies for xauth
251 define Package
/mcookie
/description
252 mcookie generates a
128-bit random hexadecimal number for use with the X
256 define Package
/mount-utils
257 $(call Package
/util-linux
/Default
)
258 TITLE
:=related
(u
)mount utilities
259 DEPENDS
+= +libblkid
+libmount
+libuuid
262 define Package
/mount-utils
/description
263 contains
: mount
, umount
, findmnt
267 $(call Package
/util-linux
/Default
)
268 TITLE
:=follow a pathname until a terminal point is found
271 define Package
/namei
/description
272 namei uses its arguments
as pathnames to any type of Unix file
(symlinks
,
273 files
, directories
, and so forth
)
276 define Package
/rename
277 $(call Package
/util-linux
/Default
)
281 define Package
/rename
/description
282 rename will rename the specified files by replacing the first occurrence of
283 expression in their name by replacement
286 define Package
/partx-utils
287 $(call Package
/util-linux
/Default
)
288 TITLE
:=inform kernel about the presence and numbering of on-disk partitions
289 DEPENDS
:= +libblkid
+libuuid
293 define Package
/partx-utils
/description
294 contains partx
, addpart
, delpart
297 define Package
/script-utils
298 $(call Package
/util-linux
/Default
)
299 TITLE
:=make and replay typescript of terminal session
303 define Package
/script-utils
/description
304 contains
: script
, scriptreplay
307 define Package
/setterm
308 $(call Package
/util-linux
/Default
)
309 TITLE
:=set terminal attributes
313 define Package
/setterm
/description
314 setterm writes to standard output a character string that will invoke the
315 specified terminal capabilities
318 define Package
/sfdisk
319 $(call Package
/util-linux
/Default
)
320 TITLE
:=partition table manipulator for Linux
324 define Package
/sfdisk
/description
325 list the size of a partition
, list the partitions on a device
, check the
326 partitions on a device and repartition a device
329 define Package
/swap-utils
330 $(call Package
/util-linux
/Default
)
331 TITLE
:=swap space management utilities
332 DEPENDS
+= +libblkid
+libuuid
336 define Package
/swap-utils
/description
337 contains
: mkswap
, swaplabel
, swapon
, swapoff
341 $(call Package
/util-linux
/Default
)
342 TITLE
:=UUID generation daemon
346 define Package
/uuidd
/description
347 The uuidd daemon is used by the UUID library to generate universally unique
348 identifiers
(UUIDs
), especially time-based UUIDs
, in a secure and
349 guaranteed-unique fashion
, even in the face of large numbers of threads
350 running on different CPUs trying to grab UUIDs.
353 define Package
/uuidgen
354 $(call Package
/util-linux
/Default
)
355 TITLE
:=create a new UUID value
359 define Package
/uuidgen
/description
360 The uuidgen program creates
(and prints
) a new universally unique identifier
361 (UUID
) using the libuuid library. The new UUID can reasonably be considered
362 unique among
all UUIDs created on the local system
, and among UUIDs created on
363 other systems in the past and in the future.
367 $(call Package
/util-linux
/Default
)
368 TITLE
:=send a message to everybody
's terminal
372 define Package/wall/description
373 Wall sends a message to everybody logged in with their mesg permission
377 define Package/whereis
378 $(call Package/util-linux/Default)
379 TITLE:=locate the binary, source, and manual page files for a command
382 define Package/wipefs/description
383 whereis locates source/binary and manuals sections for specified files
386 define Package/wipefs
387 $(call Package/util-linux/Default)
388 TITLE:=wipe a signature from a device
389 DEPENDS:= +libblkid +libuuid
393 define Package/wipefs/description
394 wipefs can erase filesystem, raid or partition table signatures (magic
395 strings) from the specified device to make the signature invisible for
399 define Package/libblkid/install
400 $(INSTALL_DIR) $(1)/usr/lib
401 $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
404 define Package/libmount/install
405 $(INSTALL_DIR) $(1)/usr/lib
406 $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
409 define Package/libuuid/install
410 $(INSTALL_DIR) $(1)/usr/lib
411 $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
414 define Package/agetty/install
415 $(INSTALL_DIR) $(1)/sbin
416 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
419 define Package/blkid/install
420 $(INSTALL_DIR) $(1)/sbin
421 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
424 define Package/cal/install
425 $(INSTALL_DIR) $(1)/usr/bin
426 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
429 define Package/cfdisk/install
430 $(INSTALL_DIR) $(1)/sbin
431 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
434 define Package/fdisk/install
435 $(INSTALL_DIR) $(1)/sbin
436 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
439 define Package/findfs/install
440 $(INSTALL_DIR) $(1)/sbin
441 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
444 define Package/flock/install
445 $(INSTALL_DIR) $(1)/usr/bin
446 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
449 define Package/getopt/install
450 $(INSTALL_DIR) $(1)/usr/bin
451 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
454 define Package/hwclock/install
455 $(INSTALL_DIR) $(1)/sbin
456 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
459 define Package/logger/install
460 $(INSTALL_DIR) $(1)/usr/bin
461 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
464 define Package/look/install
465 $(INSTALL_DIR) $(1)/usr/bin
466 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
469 define Package/losetup/install
470 $(INSTALL_DIR) $(1)/sbin
471 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
474 define Package/lsblk/install
475 $(INSTALL_DIR) $(1)/bin
476 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
479 define Package/mcookie/install
480 $(INSTALL_DIR) $(1)/usr/bin
481 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
484 define Package/mount-utils/install
485 $(INSTALL_DIR) $(1)/bin
486 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/bin/
487 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/bin/
488 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/bin/
491 define Package/namei/install
492 $(INSTALL_DIR) $(1)/usr/bin/
493 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
496 define Package/rename/install
497 $(INSTALL_DIR) $(1)/usr/bin/
498 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
501 define Package/partx-utils/install
502 $(INSTALL_DIR) $(1)/usr/sbin
503 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
504 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
505 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
508 define Package/script-utils/install
509 $(INSTALL_DIR) $(1)/usr/bin
510 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
514 define Package/setterm/install
515 $(INSTALL_DIR) $(1)/usr/bin
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
519 define Package/sfdisk/install
520 $(INSTALL_DIR) $(1)/sbin
521 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
524 define Package/swap-utils/install
525 $(INSTALL_DIR) $(1)/sbin
526 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/sbin/
527 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/sbin/
528 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/swapon $(1)/sbin/
529 ln -sf swapon $(1)/sbin/swapoff
532 define Package/uuidd/install
533 $(INSTALL_DIR) $(1)/usr/sbin
534 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
537 define Package/uuidgen/install
538 $(INSTALL_DIR) $(1)/usr/bin
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
542 define Package/wall/install
543 $(INSTALL_DIR) $(1)/usr/bin
544 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
547 define Package/whereis/install
548 $(INSTALL_DIR) $(1)/usr/bin
549 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
552 define Package/wipefs/install
553 $(INSTALL_DIR) $(1)/sbin
554 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
557 $(eval $(call BuildPackage,libblkid))
558 $(eval $(call BuildPackage,libmount))
559 $(eval $(call BuildPackage,libuuid))
560 $(eval $(call BuildPackage,agetty))
561 $(eval $(call BuildPackage,blkid))
562 $(eval $(call BuildPackage,cal))
563 $(eval $(call BuildPackage,cfdisk))
564 $(eval $(call BuildPackage,dmesg))
565 $(eval $(call BuildPackage,fdisk))
566 $(eval $(call BuildPackage,findfs))
567 $(eval $(call BuildPackage,flock))
568 $(eval $(call BuildPackage,getopt))
569 $(eval $(call BuildPackage,hwclock))
570 $(eval $(call BuildPackage,logger))
571 $(eval $(call BuildPackage,look))
572 $(eval $(call BuildPackage,losetup))
573 $(eval $(call BuildPackage,lsblk))
574 $(eval $(call BuildPackage,mcookie))
575 $(eval $(call BuildPackage,mount-utils))
576 $(eval $(call BuildPackage,namei))
577 $(eval $(call BuildPackage,rename))
578 $(eval $(call BuildPackage,partx-utils))
579 $(eval $(call BuildPackage,script-utils))
580 $(eval $(call BuildPackage,setterm))
581 $(eval $(call BuildPackage,sfdisk))
582 $(eval $(call BuildPackage,swap-utils))
583 $(eval $(call BuildPackage,uuidd))
584 $(eval $(call BuildPackage,uuidgen))
585 $(eval $(call BuildPackage,wall))
586 $(eval $(call BuildPackage,whereis))
587 $(eval $(call BuildPackage,wipefs))