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.24
16 PKG_MD5SUM:=88d46ae23ca599ac5af9cf96b531590f
18 PKG_LICENSE:=GPLv2 LGPLv2.1 BSD-3c
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/
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)/.libs/libblkid.{a,so*} $(1)/usr/lib
61 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.{a,so*} $(1)/usr/lib
62 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.{a,so*} $(1)/usr/lib
65 define Package/libblkid
66 $(call Package/util-linux/Default)
68 TITLE:=block device id library
73 define Package/libblkid/description
74 The libblkid library is used to identify block devices (disks) as to their
75 content (e.g. filesystem type, partitions) as well as extracting additional
76 information such as filesystem labels/volume names, partitions, unique
77 identifiers/serial numbers...
80 define Package/libmount
81 $(call Package/util-linux/Default)
88 define Package/libmount/description
89 The libmount library is used to parse /etc/fstab, /etc/mtab and
90 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
93 define Package/libuuid
94 $(call Package/util-linux/Default)
95 TITLE:=DCE compatible Universally Unique Identifier library
100 define Package/libuuid/description
101 The UUID library is used to generate unique identifiers for objects
102 that may be accessible beyond the local system. This library
103 generates UUIDs compatible with those created by the Open Software
104 Foundation (OSF) Distributed Computing Environment (DCE) utility.
107 define Package/agetty
108 $(call Package/util-linux/Default)
109 TITLE:=alternative Linux getty
113 define Package/agetty/description
114 agetty opens a tty port, prompts for a login name and invokes the
119 $(call Package/util-linux/Default)
120 TITLE:=locate/print block device attributes
125 define Package/blkid/description
126 The blkid program is the command-line interface to working with the libblkid
131 $(call Package/util-linux/Default)
132 TITLE:=display a calendar
133 DEPENDS:= +libncurses
136 define Package/cal/description
137 cal displays a simple calendar
140 define Package/cfdisk
141 $(call Package/util-linux/Default)
142 TITLE:=display or manipulate disk partition table
143 DEPENDS:= +libblkid +libncurses
147 define Package/cfdisk/description
148 cfdisk is a curses-based program for partitioning any hard disk drive
152 $(call Package/util-linux/Default)
153 TITLE:=print or control the kernel ring buffer
156 define Package/dmesg/description
157 dmesg is used to examine or control the kernel ring buffer
161 $(call Package/util-linux/Default)
162 TITLE:=manipulate disk partition table
167 define Package/fdisk/description
168 a menu-driven program for creation and manipulation of partition tables
171 define Package/findfs
172 $(call Package/util-linux/Default)
173 TITLE:=find a filesystem by label or UUID
178 define Package/findfs/description
179 findfs will search the disks in the system looking for a filesystem which has
180 a label matching label or a UUID equal to uuid
184 $(call Package/util-linux/Default)
185 TITLE:=manage locks from shell scripts
188 define Package/flock/description
189 manages flock locks from within shell scripts or the command line
192 define Package/getopt
193 $(call Package/util-linux/Default)
194 TITLE:=parse command options (enhanced)
197 define Package/getopt/description
198 getopt is used to break up (parse) options in command lines for easy parsing
199 by shell procedures, and to check for legal options
202 define Package/hwclock
203 $(call Package/util-linux/Default)
204 TITLE:=query or set the hardware clock
207 define Package/hwclock/description
208 hwclock is a tool for accessing the Hardware Clock
211 define Package/logger
212 $(call Package/util-linux/Default)
213 TITLE:=a shell command interface to the syslog system log module
216 define Package/logger/description
217 logger makes entries in the system log, it provides a shell command interface
218 to the syslog system log module
222 $(call Package/util-linux/Default)
223 TITLE:=display lines beginning with a given string
226 define Package/look/description
227 look utility displays any lines in file which contain string
230 define Package/losetup
231 $(call Package/util-linux/Default)
232 TITLE:=set up and control loop devices
235 define Package/losetup/description
236 losetup is used to associate loop devices with regular files or block devices,
237 to detach loop devices and to query the status of a loop device
241 $(call Package/util-linux/Default)
242 TITLE:=list block devices
247 define Package/lsblk/description
248 lsblk lists information about all or the specified block devices
251 define Package/mcookie
252 $(call Package/util-linux/Default)
253 TITLE:=generate magic cookies for xauth
256 define Package/mcookie/description
257 mcookie generates a 128-bit random hexadecimal number for use with the X
261 define Package/mount-utils
262 $(call Package/util-linux/Default)
263 TITLE:=related (u)mount utilities
267 define Package/mount-utils/description
268 contains: mount, umount, findmnt
272 $(call Package/util-linux/Default)
273 TITLE:=follow a pathname until a terminal point is found
276 define Package/namei/description
277 namei uses its arguments as pathnames to any type of Unix file (symlinks,
278 files, directories, and so forth)
281 define Package/rename
282 $(call Package/util-linux/Default)
286 define Package/rename/description
287 rename will rename the specified files by replacing the first occurrence of
288 expression in their name by replacement
291 define Package/partx-utils
292 $(call Package/util-linux/Default)
293 TITLE:=inform kernel about the presence and numbering of on-disk partitions
298 define Package/partx-utils/description
299 contains partx, addpart, delpart
302 define Package/script-utils
303 $(call Package/util-linux/Default)
304 TITLE:=make and replay typescript of terminal session
308 define Package/script-utils/description
309 contains: script, scriptreplay
312 define Package/setterm
313 $(call Package/util-linux/Default)
314 TITLE:=set terminal attributes
315 DEPENDS:= +libncurses
319 define Package/setterm/description
320 setterm writes to standard output a character string that will invoke the
321 specified terminal capabilities
324 define Package/sfdisk
325 $(call Package/util-linux/Default)
326 TITLE:=partition table manipulator for Linux
330 define Package/sfdisk/description
331 list the size of a partition, list the partitions on a device, check the
332 partitions on a device and repartition a device
335 define Package/swap-utils
336 $(call Package/util-linux/Default)
337 TITLE:=swap space management utilities
342 define Package/swap-utils/description
343 contains: mkswap, swaplabel
347 $(call Package/util-linux/Default)
348 TITLE:=UUID generation daemon
352 define Package/uuidd/description
353 The uuidd daemon is used by the UUID library to generate universally unique
354 identifiers (UUIDs), especially time-based UUIDs, in a secure and
355 guaranteed-unique fashion, even in the face of large numbers of threads
356 running on different CPUs trying to grab UUIDs.
359 define Package/uuidgen
360 $(call Package/util-linux/Default)
361 TITLE:=create a new UUID value
365 define Package/uuidgen/description
366 The uuidgen program creates (and prints) a new universally unique identifier
367 (UUID) using the libuuid library. The new UUID can reasonably be considered
368 unique among all UUIDs created on the local system, and among UUIDs created on
369 other systems in the past and in the future.
373 $(call Package/util-linux/Default)
374 TITLE:=send a message to everybody's terminal
378 define Package/wall/description
379 wall sends a message to everybody logged in with their mesg permission
383 define Package/whereis
384 $(call Package/util-linux/Default)
385 TITLE:=locate the binary, source, and manual page files for a command
388 define Package/whereis/description
389 whereis locates source/binary and manuals sections for specified files
392 define Package/wipefs
393 $(call Package/util-linux/Default)
394 TITLE:=wipe a signature from a device
399 define Package/wipefs/description
400 wipefs can erase filesystem, raid or partition table signatures (magic
401 strings) from the specified device to make the signature invisible for
405 define Package/libblkid/install
406 $(INSTALL_DIR) $(1)/usr/lib
407 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
410 define Package/libmount/install
411 $(INSTALL_DIR) $(1)/usr/lib
412 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
415 define Package/libuuid/install
416 $(INSTALL_DIR) $(1)/usr/lib
417 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
420 define Package/agetty/install
421 $(INSTALL_DIR) $(1)/usr/sbin
422 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
425 define Package/blkid/install
426 $(INSTALL_DIR) $(1)/usr/sbin
427 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
430 define Package/cal/install
431 $(INSTALL_DIR) $(1)/usr/bin
432 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
435 define Package/cfdisk/install
436 $(INSTALL_DIR) $(1)/usr/sbin
437 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
440 define Package/fdisk/install
441 $(INSTALL_DIR) $(1)/usr/sbin
442 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
445 define Package/findfs/install
446 $(INSTALL_DIR) $(1)/usr/sbin
447 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
450 define Package/flock/install
451 $(INSTALL_DIR) $(1)/usr/bin
452 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
455 define Package/getopt/install
456 $(INSTALL_DIR) $(1)/usr/bin
457 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
460 define Package/hwclock/install
461 $(INSTALL_DIR) $(1)/usr/sbin
462 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
465 define Package/logger/install
466 $(INSTALL_DIR) $(1)/usr/bin
467 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
470 define Package/look/install
471 $(INSTALL_DIR) $(1)/usr/bin
472 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
475 define Package/losetup/install
476 $(INSTALL_DIR) $(1)/usr/sbin
477 $(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
480 define Package/lsblk/install
481 $(INSTALL_DIR) $(1)/usr/bin
482 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
485 define Package/mcookie/install
486 $(INSTALL_DIR) $(1)/usr/bin
487 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
490 define Package/mount-utils/install
491 $(INSTALL_DIR) $(1)/usr/bin
492 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
493 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
494 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
497 define Package/namei/install
498 $(INSTALL_DIR) $(1)/usr/bin
499 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
502 define Package/rename/install
503 $(INSTALL_DIR) $(1)/usr/bin
504 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
507 define Package/partx-utils/install
508 $(INSTALL_DIR) $(1)/usr/sbin
509 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
510 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
514 define Package/script-utils/install
515 $(INSTALL_DIR) $(1)/usr/bin
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
517 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
520 define Package/setterm/install
521 $(INSTALL_DIR) $(1)/usr/bin
522 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
525 define Package/sfdisk/install
526 $(INSTALL_DIR) $(1)/usr/sbin
527 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
530 define Package/swap-utils/install
531 $(INSTALL_DIR) $(1)/usr/sbin
532 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
533 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
536 define Package/uuidd/install
537 $(INSTALL_DIR) $(1)/usr/sbin
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
541 define Package/uuidgen/install
542 $(INSTALL_DIR) $(1)/usr/bin
543 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
546 define Package/wall/install
547 $(INSTALL_DIR) $(1)/usr/bin
548 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
551 define Package/whereis/install
552 $(INSTALL_DIR) $(1)/usr/bin
553 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
556 define Package/wipefs/install
557 $(INSTALL_DIR) $(1)/usr/sbin
558 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
561 $(eval $(call BuildPackage,libblkid))
562 $(eval $(call BuildPackage,libmount))
563 $(eval $(call BuildPackage,libuuid))
564 $(eval $(call BuildPackage,agetty))
565 $(eval $(call BuildPackage,blkid))
566 $(eval $(call BuildPackage,cal))
567 $(eval $(call BuildPackage,cfdisk))
568 $(eval $(call BuildPackage,dmesg))
569 $(eval $(call BuildPackage,fdisk))
570 $(eval $(call BuildPackage,findfs))
571 $(eval $(call BuildPackage,flock))
572 $(eval $(call BuildPackage,getopt))
573 $(eval $(call BuildPackage,hwclock))
574 $(eval $(call BuildPackage,logger))
575 $(eval $(call BuildPackage,look))
576 $(eval $(call BuildPackage,losetup))
577 $(eval $(call BuildPackage,lsblk))
578 $(eval $(call BuildPackage,mcookie))
579 $(eval $(call BuildPackage,mount-utils))
580 $(eval $(call BuildPackage,namei))
581 $(eval $(call BuildPackage,rename))
582 $(eval $(call BuildPackage,partx-utils))
583 $(eval $(call BuildPackage,script-utils))
584 $(eval $(call BuildPackage,setterm))
585 $(eval $(call BuildPackage,sfdisk))
586 $(eval $(call BuildPackage,swap-utils))
587 $(eval $(call BuildPackage,uuidd))
588 $(eval $(call BuildPackage,uuidgen))
589 $(eval $(call BuildPackage,wall))
590 $(eval $(call BuildPackage,whereis))
591 $(eval $(call BuildPackage,wipefs))