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/
40 TARGET_CFLAGS += $(FPIC)
42 define Build/InstallDev
43 $(MAKE) -C $(PKG_BUILD_DIR) \
46 installdirs install-data
48 $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
49 $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
50 $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
51 $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
53 $(INSTALL_DIR) $(1)/usr/include/blkid
54 $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
55 $(INSTALL_DIR) $(1)/usr/include/libmount
56 $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
57 $(INSTALL_DIR) $(1)/usr/include/uuid
58 $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
60 $(INSTALL_DIR) $(1)/usr/lib
61 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.{a,so*} $(1)/usr/lib
62 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.{a,so*} $(1)/usr/lib
63 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.{a,so*} $(1)/usr/lib
66 define Package/libblkid
67 $(call Package/util-linux/Default)
69 TITLE:=block device id library
74 define Package/libblkid/description
75 The libblkid library is used to identify block devices (disks) as to their
76 content (e.g. filesystem type, partitions) as well as extracting additional
77 information such as filesystem labels/volume names, partitions, unique
78 identifiers/serial numbers...
81 define Package/libmount
82 $(call Package/util-linux/Default)
89 define Package/libmount/description
90 The libmount library is used to parse /etc/fstab, /etc/mtab and
91 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
94 define Package/libuuid
95 $(call Package/util-linux/Default)
96 TITLE:=DCE compatible Universally Unique Identifier library
101 define Package/libuuid/description
102 The UUID library is used to generate unique identifiers for objects
103 that may be accessible beyond the local system. This library
104 generates UUIDs compatible with those created by the Open Software
105 Foundation (OSF) Distributed Computing Environment (DCE) utility.
108 define Package/agetty
109 $(call Package/util-linux/Default)
110 TITLE:=alternative Linux getty
114 define Package/agetty/description
115 agetty opens a tty port, prompts for a login name and invokes the
120 $(call Package/util-linux/Default)
121 TITLE:=locate/print block device attributes
126 define Package/blkid/description
127 The blkid program is the command-line interface to working with the libblkid
132 $(call Package/util-linux/Default)
133 TITLE:=display a calendar
134 DEPENDS:= +libncurses
137 define Package/cal/description
138 cal displays a simple calendar
141 define Package/cfdisk
142 $(call Package/util-linux/Default)
143 TITLE:=display or manipulate disk partition table
144 DEPENDS:= +libblkid +libncurses
148 define Package/cfdisk/description
149 cfdisk is a curses-based program for partitioning any hard disk drive
153 $(call Package/util-linux/Default)
154 TITLE:=print or control the kernel ring buffer
157 define Package/dmesg/description
158 dmesg is used to examine or control the kernel ring buffer
162 $(call Package/util-linux/Default)
163 TITLE:=manipulate disk partition table
168 define Package/fdisk/description
169 a menu-driven program for creation and manipulation of partition tables
172 define Package/findfs
173 $(call Package/util-linux/Default)
174 TITLE:=find a filesystem by label or UUID
179 define Package/findfs/description
180 findfs will search the disks in the system looking for a filesystem which has
181 a label matching label or a UUID equal to uuid
185 $(call Package/util-linux/Default)
186 TITLE:=manage locks from shell scripts
189 define Package/flock/description
190 manages flock locks from within shell scripts or the command line
193 define Package/getopt
194 $(call Package/util-linux/Default)
195 TITLE:=parse command options (enhanced)
198 define Package/getopt/description
199 getopt is used to break up (parse) options in command lines for easy parsing
200 by shell procedures, and to check for legal options
203 define Package/hwclock
204 $(call Package/util-linux/Default)
205 TITLE:=query or set the hardware clock
208 define Package/hwclock/description
209 hwclock is a tool for accessing the Hardware Clock
212 define Package/logger
213 $(call Package/util-linux/Default)
214 TITLE:=a shell command interface to the syslog system log module
217 define Package/logger/description
218 logger makes entries in the system log, it provides a shell command interface
219 to the syslog system log module
223 $(call Package/util-linux/Default)
224 TITLE:=display lines beginning with a given string
227 define Package/look/description
228 look utility displays any lines in file which contain string
231 define Package/losetup
232 $(call Package/util-linux/Default)
233 TITLE:=set up and control loop devices
236 define Package/losetup/description
237 losetup is used to associate loop devices with regular files or block devices,
238 to detach loop devices and to query the status of a loop device
242 $(call Package/util-linux/Default)
243 TITLE:=list block devices
244 DEPENDS:= +libblkid +libmount
248 define Package/lsblk/description
249 lsblk lists information about all or the specified block devices
252 define Package/mcookie
253 $(call Package/util-linux/Default)
254 TITLE:=generate magic cookies for xauth
257 define Package/mcookie/description
258 mcookie generates a 128-bit random hexadecimal number for use with the X
262 define Package/mount-utils
263 $(call Package/util-linux/Default)
264 TITLE:=related (u)mount utilities
268 define Package/mount-utils/description
269 contains: mount, umount, findmnt
273 $(call Package/util-linux/Default)
274 TITLE:=follow a pathname until a terminal point is found
277 define Package/namei/description
278 namei uses its arguments as pathnames to any type of Unix file (symlinks,
279 files, directories, and so forth)
282 define Package/rename
283 $(call Package/util-linux/Default)
287 define Package/rename/description
288 rename will rename the specified files by replacing the first occurrence of
289 expression in their name by replacement
292 define Package/partx-utils
293 $(call Package/util-linux/Default)
294 TITLE:=inform kernel about the presence and numbering of on-disk partitions
299 define Package/partx-utils/description
300 contains partx, addpart, delpart
303 define Package/script-utils
304 $(call Package/util-linux/Default)
305 TITLE:=make and replay typescript of terminal session
309 define Package/script-utils/description
310 contains: script, scriptreplay
313 define Package/setterm
314 $(call Package/util-linux/Default)
315 TITLE:=set terminal attributes
316 DEPENDS:= +libncurses
320 define Package/setterm/description
321 setterm writes to standard output a character string that will invoke the
322 specified terminal capabilities
325 define Package/sfdisk
326 $(call Package/util-linux/Default)
327 TITLE:=partition table manipulator for Linux
331 define Package/sfdisk/description
332 list the size of a partition, list the partitions on a device, check the
333 partitions on a device and repartition a device
336 define Package/swap-utils
337 $(call Package/util-linux/Default)
338 TITLE:=swap space management utilities
343 define Package/swap-utils/description
344 contains: mkswap, swaplabel
348 $(call Package/util-linux/Default)
349 TITLE:=UUID generation daemon
353 define Package/uuidd/description
354 The uuidd daemon is used by the UUID library to generate universally unique
355 identifiers (UUIDs), especially time-based UUIDs, in a secure and
356 guaranteed-unique fashion, even in the face of large numbers of threads
357 running on different CPUs trying to grab UUIDs.
360 define Package/uuidgen
361 $(call Package/util-linux/Default)
362 TITLE:=create a new UUID value
366 define Package/uuidgen/description
367 The uuidgen program creates (and prints) a new universally unique identifier
368 (UUID) using the libuuid library. The new UUID can reasonably be considered
369 unique among all UUIDs created on the local system, and among UUIDs created on
370 other systems in the past and in the future.
374 $(call Package/util-linux/Default)
375 TITLE:=send a message to everybody's terminal
379 define Package/wall/description
380 wall sends a message to everybody logged in with their mesg permission
384 define Package/whereis
385 $(call Package/util-linux/Default)
386 TITLE:=locate the binary, source, and manual page files for a command
389 define Package/whereis/description
390 whereis locates source/binary and manuals sections for specified files
393 define Package/wipefs
394 $(call Package/util-linux/Default)
395 TITLE:=wipe a signature from a device
400 define Package/wipefs/description
401 wipefs can erase filesystem, raid or partition table signatures (magic
402 strings) from the specified device to make the signature invisible for
406 define Package/libblkid/install
407 $(INSTALL_DIR) $(1)/usr/lib
408 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
411 define Package/libmount/install
412 $(INSTALL_DIR) $(1)/usr/lib
413 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
416 define Package/libuuid/install
417 $(INSTALL_DIR) $(1)/usr/lib
418 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
421 define Package/agetty/install
422 $(INSTALL_DIR) $(1)/usr/sbin
423 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
426 define Package/blkid/install
427 $(INSTALL_DIR) $(1)/usr/sbin
428 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
431 define Package/cal/install
432 $(INSTALL_DIR) $(1)/usr/bin
433 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
436 define Package/cfdisk/install
437 $(INSTALL_DIR) $(1)/usr/sbin
438 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
441 define Package/fdisk/install
442 $(INSTALL_DIR) $(1)/usr/sbin
443 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
446 define Package/findfs/install
447 $(INSTALL_DIR) $(1)/usr/sbin
448 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
451 define Package/flock/install
452 $(INSTALL_DIR) $(1)/usr/bin
453 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
456 define Package/getopt/install
457 $(INSTALL_DIR) $(1)/usr/bin
458 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
461 define Package/hwclock/install
462 $(INSTALL_DIR) $(1)/usr/sbin
463 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
466 define Package/logger/install
467 $(INSTALL_DIR) $(1)/usr/bin
468 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
471 define Package/look/install
472 $(INSTALL_DIR) $(1)/usr/bin
473 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
476 define Package/losetup/install
477 $(INSTALL_DIR) $(1)/usr/sbin
478 $(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
481 define Package/lsblk/install
482 $(INSTALL_DIR) $(1)/usr/bin
483 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
486 define Package/mcookie/install
487 $(INSTALL_DIR) $(1)/usr/bin
488 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
491 define Package/mount-utils/install
492 $(INSTALL_DIR) $(1)/usr/bin
493 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
494 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
495 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
498 define Package/namei/install
499 $(INSTALL_DIR) $(1)/usr/bin
500 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
503 define Package/rename/install
504 $(INSTALL_DIR) $(1)/usr/bin
505 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
508 define Package/partx-utils/install
509 $(INSTALL_DIR) $(1)/usr/sbin
510 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
512 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
515 define Package/script-utils/install
516 $(INSTALL_DIR) $(1)/usr/bin
517 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
518 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
521 define Package/setterm/install
522 $(INSTALL_DIR) $(1)/usr/bin
523 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
526 define Package/sfdisk/install
527 $(INSTALL_DIR) $(1)/usr/sbin
528 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
531 define Package/swap-utils/install
532 $(INSTALL_DIR) $(1)/usr/sbin
533 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
534 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
537 define Package/uuidd/install
538 $(INSTALL_DIR) $(1)/usr/sbin
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
542 define Package/uuidgen/install
543 $(INSTALL_DIR) $(1)/usr/bin
544 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
547 define Package/wall/install
548 $(INSTALL_DIR) $(1)/usr/bin
549 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
552 define Package/whereis/install
553 $(INSTALL_DIR) $(1)/usr/bin
554 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
557 define Package/wipefs/install
558 $(INSTALL_DIR) $(1)/usr/sbin
559 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
562 $(eval $(call BuildPackage,libblkid))
563 $(eval $(call BuildPackage,libmount))
564 $(eval $(call BuildPackage,libuuid))
565 $(eval $(call BuildPackage,agetty))
566 $(eval $(call BuildPackage,blkid))
567 $(eval $(call BuildPackage,cal))
568 $(eval $(call BuildPackage,cfdisk))
569 $(eval $(call BuildPackage,dmesg))
570 $(eval $(call BuildPackage,fdisk))
571 $(eval $(call BuildPackage,findfs))
572 $(eval $(call BuildPackage,flock))
573 $(eval $(call BuildPackage,getopt))
574 $(eval $(call BuildPackage,hwclock))
575 $(eval $(call BuildPackage,logger))
576 $(eval $(call BuildPackage,look))
577 $(eval $(call BuildPackage,losetup))
578 $(eval $(call BuildPackage,lsblk))
579 $(eval $(call BuildPackage,mcookie))
580 $(eval $(call BuildPackage,mount-utils))
581 $(eval $(call BuildPackage,namei))
582 $(eval $(call BuildPackage,rename))
583 $(eval $(call BuildPackage,partx-utils))
584 $(eval $(call BuildPackage,script-utils))
585 $(eval $(call BuildPackage,setterm))
586 $(eval $(call BuildPackage,sfdisk))
587 $(eval $(call BuildPackage,swap-utils))
588 $(eval $(call BuildPackage,uuidd))
589 $(eval $(call BuildPackage,uuidgen))
590 $(eval $(call BuildPackage,wall))
591 $(eval $(call BuildPackage,whereis))
592 $(eval $(call BuildPackage,wipefs))