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 TARGET_CFLAGS += $(FPIC)
41 define Build/InstallDev
42 $(MAKE) -C $(PKG_BUILD_DIR) \
45 installdirs install-data
47 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
48 $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
49 $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
50 $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
52 $(INSTALL_DIR) $(1)/usr/include/blkid
53 $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
54 $(INSTALL_DIR) $(1)/usr/include/libmount
55 $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
56 $(INSTALL_DIR) $(1)/usr/include/uuid
57 $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.{a,so.*} $(1)/usr/lib
61 $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.{a,so.*} $(1)/usr/lib
62 $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.{a,so.*} $(1)/usr/lib
65 define Package/libblkid
66 $(call Package/util-linux/Default)
67 TITLE:=block device id library
72 define Package/libblkid/description
73 The libblkid library is used to identify block devices (disks) as to their
74 content (e.g. filesystem type, partitions) as well as extracting additional
75 information such as filesystem labels/volume names, partitions, unique
76 identifiers/serial numbers...
79 define Package/libmount
80 $(call Package/util-linux/Default)
86 define Package/libmount/description
87 The libmount library is used to parse /etc/fstab, /etc/mtab and
88 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
91 define Package/libuuid
92 $(call Package/util-linux/Default)
93 TITLE:=DCE compatible Universally Unique Identifier library
98 define Package/libuuid/description
99 The UUID library is used to generate unique identifiers for objects
100 that may be accessible beyond the local system. This library
101 generates UUIDs compatible with those created by the Open Software
102 Foundation (OSF) Distributed Computing Environment (DCE) utility.
105 define Package/agetty
106 $(call Package/util-linux/Default)
107 TITLE:=alternative Linux getty
111 define Package/agetty/description
112 agetty opens a tty port, prompts for a login name and invokes the
117 $(call Package/util-linux/Default)
118 TITLE:=locate/print block device attributes
119 DEPENDS:= +libblkid +libuuid
123 define Package/blkid/description
124 The blkid program is the command-line interface to working with the libblkid
129 $(call Package/util-linux/Default)
130 TITLE:=display a calendar
131 DEPENDS:= +libncurses
134 define Package/cal/description
135 cal displays a simple calendar
138 define Package/cfdisk
139 $(call Package/util-linux/Default)
140 TITLE:=display or manipulate disk partition table
141 DEPENDS:= +libblkid +libncurses +libuuid
145 define Package/cfdisk/description
146 cfdisk is a curses-based program for partitioning any hard disk drive
150 $(call Package/util-linux/Default)
151 TITLE:=print or control the kernel ring buffer
154 define Package/dmesg/description
155 dmesg is used to examine or control the kernel ring buffer
159 $(call Package/util-linux/Default)
160 TITLE:=manipulate disk partition table
161 DEPENDS:= +libblkid +libuuid
165 define Package/fdisk/description
166 a menu-driven program for creation and manipulation of partition tables
169 define Package/findfs
170 $(call Package/util-linux/Default)
171 TITLE:=find a filesystem by label or UUID
172 DEPENDS:= +libblkid +libuuid
176 define Package/findfs/description
177 findfs will search the disks in the system looking for a filesystem which has
178 a label matching label or a UUID equal to uuid
182 $(call Package/util-linux/Default)
183 TITLE:=manage locks from shell scripts
186 define Package/flock/description
187 manages flock locks from within shell scripts or the command line
190 define Package/getopt
191 $(call Package/util-linux/Default)
192 TITLE:=parse command options (enhanced)
195 define Package/getopt/description
196 getopt is used to break up (parse) options in command lines for easy parsing
197 by shell procedures, and to check for legal options
200 define Package/hwclock
201 $(call Package/util-linux/Default)
202 TITLE:=query or set the hardware clock
205 define Package/hwclock/description
206 hwclock is a tool for accessing the Hardware Clock
209 define Package/logger
210 $(call Package/util-linux/Default)
211 TITLE:=a shell command interface to the syslog system log module
214 define Package/logger/description
215 logger makes entries in the system log, it provides a shell command interface to the syslog system log module
219 $(call Package/util-linux/Default)
220 TITLE:=display lines beginning with a given string
223 define Package/look/description
224 look utility displays any lines in file which contain string
227 define Package/losetup
228 $(call Package/util-linux/Default)
229 TITLE:=set up and control loop devices
232 define Package/losetup/description
233 losetup is used to associate loop devices with regular files or block devices,
234 to detach loop devices and to query the status of a loop device
238 $(call Package/util-linux/Default)
239 TITLE:=list block devices
240 DEPENDS:= +libblkid +libuuid
244 define Package/lsblk/description
245 lsblk lists information about all or the specified block devices
248 define Package/mcookie
249 $(call Package/util-linux/Default)
250 TITLE:=generate magic cookies for xauth
253 define Package/mcookie/description
254 mcookie generates a 128-bit random hexadecimal number for use with the X
258 define Package/mount-utils
259 $(call Package/util-linux/Default)
260 TITLE:=related (u)mount utilities
261 DEPENDS+= +libblkid +libmount +libuuid
264 define Package/mount-utils/description
265 contains: mount, umount, findmnt
269 $(call Package/util-linux/Default)
270 TITLE:=follow a pathname until a terminal point is found
273 define Package/namei/description
274 namei uses its arguments as pathnames to any type of Unix file (symlinks,
275 files, directories, and so forth)
278 define Package/rename
279 $(call Package/util-linux/Default)
283 define Package/rename/description
284 rename will rename the specified files by replacing the first occurrence of
285 expression in their name by replacement
288 define Package/partx-utils
289 $(call Package/util-linux/Default)
290 TITLE:=inform kernel about the presence and numbering of on-disk partitions
291 DEPENDS:= +libblkid +libuuid
295 define Package/partx-utils/description
296 contains partx, addpart, delpart
299 define Package/script-utils
300 $(call Package/util-linux/Default)
301 TITLE:=make and replay typescript of terminal session
305 define Package/script-utils/description
306 contains: script, scriptreplay
309 define Package/setterm
310 $(call Package/util-linux/Default)
311 TITLE:=set terminal attributes
315 define Package/setterm/description
316 setterm writes to standard output a character string that will invoke the
317 specified terminal capabilities
320 define Package/sfdisk
321 $(call Package/util-linux/Default)
322 TITLE:=partition table manipulator for Linux
326 define Package/sfdisk/description
327 list the size of a partition, list the partitions on a device, check the
328 partitions on a device and repartition a device
331 define Package/swap-utils
332 $(call Package/util-linux/Default)
333 TITLE:=swap space management utilities
334 DEPENDS+= +libblkid +libuuid
338 define Package/swap-utils/description
339 contains: mkswap, swaplabel, swapon, swapoff
343 $(call Package/util-linux/Default)
344 TITLE:=UUID generation daemon
348 define Package/uuidd/description
349 The uuidd daemon is used by the UUID library to generate universally unique
350 identifiers (UUIDs), especially time-based UUIDs, in a secure and
351 guaranteed-unique fashion, even in the face of large numbers of threads
352 running on different CPUs trying to grab UUIDs.
355 define Package/uuidgen
356 $(call Package/util-linux/Default)
357 TITLE:=create a new UUID value
361 define Package/uuidgen/description
362 The uuidgen program creates (and prints) a new universally unique identifier
363 (UUID) using the libuuid library. The new UUID can reasonably be considered
364 unique among all UUIDs created on the local system, and among UUIDs created on
365 other systems in the past and in the future.
369 $(call Package/util-linux/Default)
370 TITLE:=send a message to everybody's terminal
374 define Package/wall/description
375 Wall sends a message to everybody logged in with their mesg permission
379 define Package/whereis
380 $(call Package/util-linux/Default)
381 TITLE:=locate the binary, source, and manual page files for a command
384 define Package/whereis/description
385 whereis locates source/binary and manuals sections for specified files
388 define Package/wipefs
389 $(call Package/util-linux/Default)
390 TITLE:=wipe a signature from a device
391 DEPENDS:= +libblkid +libuuid
395 define Package/wipefs/description
396 wipefs can erase filesystem, raid or partition table signatures (magic
397 strings) from the specified device to make the signature invisible for
401 define Package/libblkid/install
402 $(INSTALL_DIR) $(1)/usr/lib
403 $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
406 define Package/libmount/install
407 $(INSTALL_DIR) $(1)/usr/lib
408 $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
411 define Package/libuuid/install
412 $(INSTALL_DIR) $(1)/usr/lib
413 $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
416 define Package/agetty/install
417 $(INSTALL_DIR) $(1)/sbin
418 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
421 define Package/blkid/install
422 $(INSTALL_DIR) $(1)/sbin
423 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
426 define Package/cal/install
427 $(INSTALL_DIR) $(1)/usr/bin
428 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
431 define Package/cfdisk/install
432 $(INSTALL_DIR) $(1)/sbin
433 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
436 define Package/fdisk/install
437 $(INSTALL_DIR) $(1)/sbin
438 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
441 define Package/findfs/install
442 $(INSTALL_DIR) $(1)/sbin
443 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
446 define Package/flock/install
447 $(INSTALL_DIR) $(1)/usr/bin
448 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
451 define Package/getopt/install
452 $(INSTALL_DIR) $(1)/usr/bin
453 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
456 define Package/hwclock/install
457 $(INSTALL_DIR) $(1)/sbin
458 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
461 define Package/logger/install
462 $(INSTALL_DIR) $(1)/usr/bin
463 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
466 define Package/look/install
467 $(INSTALL_DIR) $(1)/usr/bin
468 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
471 define Package/losetup/install
472 $(INSTALL_DIR) $(1)/sbin
473 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
476 define Package/lsblk/install
477 $(INSTALL_DIR) $(1)/bin
478 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
481 define Package/mcookie/install
482 $(INSTALL_DIR) $(1)/usr/bin
483 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
486 define Package/mount-utils/install
487 $(INSTALL_DIR) $(1)/bin
488 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/bin/
489 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/bin/
490 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/bin/
493 define Package/namei/install
494 $(INSTALL_DIR) $(1)/usr/bin/
495 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
498 define Package/rename/install
499 $(INSTALL_DIR) $(1)/usr/bin/
500 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
503 define Package/partx-utils/install
504 $(INSTALL_DIR) $(1)/usr/sbin
505 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
506 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
507 $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
510 define Package/script-utils/install
511 $(INSTALL_DIR) $(1)/usr/bin
512 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
513 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
516 define Package/setterm/install
517 $(INSTALL_DIR) $(1)/usr/bin
518 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
521 define Package/sfdisk/install
522 $(INSTALL_DIR) $(1)/sbin
523 $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
526 define Package/swap-utils/install
527 $(INSTALL_DIR) $(1)/sbin
528 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/sbin/
529 $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/sbin/
530 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/swapon $(1)/sbin/
531 ln -sf swapon $(1)/sbin/swapoff
534 define Package/uuidd/install
535 $(INSTALL_DIR) $(1)/usr/sbin
536 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
539 define Package/uuidgen/install
540 $(INSTALL_DIR) $(1)/usr/bin
541 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
544 define Package/wall/install
545 $(INSTALL_DIR) $(1)/usr/bin
546 $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
549 define Package/whereis/install
550 $(INSTALL_DIR) $(1)/usr/bin
551 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
554 define Package/wipefs/install
555 $(INSTALL_DIR) $(1)/sbin
556 $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
559 $(eval $(call BuildPackage,libblkid))
560 $(eval $(call BuildPackage,libmount))
561 $(eval $(call BuildPackage,libuuid))
562 $(eval $(call BuildPackage,agetty))
563 $(eval $(call BuildPackage,blkid))
564 $(eval $(call BuildPackage,cal))
565 $(eval $(call BuildPackage,cfdisk))
566 $(eval $(call BuildPackage,dmesg))
567 $(eval $(call BuildPackage,fdisk))
568 $(eval $(call BuildPackage,findfs))
569 $(eval $(call BuildPackage,flock))
570 $(eval $(call BuildPackage,getopt))
571 $(eval $(call BuildPackage,hwclock))
572 $(eval $(call BuildPackage,logger))
573 $(eval $(call BuildPackage,look))
574 $(eval $(call BuildPackage,losetup))
575 $(eval $(call BuildPackage,lsblk))
576 $(eval $(call BuildPackage,mcookie))
577 $(eval $(call BuildPackage,mount-utils))
578 $(eval $(call BuildPackage,namei))
579 $(eval $(call BuildPackage,rename))
580 $(eval $(call BuildPackage,partx-utils))
581 $(eval $(call BuildPackage,script-utils))
582 $(eval $(call BuildPackage,setterm))
583 $(eval $(call BuildPackage,sfdisk))
584 $(eval $(call BuildPackage,swap-utils))
585 $(eval $(call BuildPackage,uuidd))
586 $(eval $(call BuildPackage,uuidgen))
587 $(eval $(call BuildPackage,wall))
588 $(eval $(call BuildPackage,whereis))
589 $(eval $(call BuildPackage,wipefs))