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)/libsmartcols/smartcols.pc $(1)/usr/lib/pkgconfig
53 $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
55 $(INSTALL_DIR) $(1)/usr/include/blkid
56 $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
57 $(INSTALL_DIR) $(1)/usr/include/libmount
58 $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
59 $(INSTALL_DIR) $(1)/usr/include/uuid
60 $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
61 $(INSTALL_DIR) $(1)/usr/include/smartcols
62 $(CP) $(PKG_BUILD_DIR)/libsmartcols/src/libsmartcols.h $(1)/usr/include/smartcols
64 $(INSTALL_DIR) $(1)/usr/lib
65 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.{a,so*} $(1)/usr/lib
66 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.{a,so*} $(1)/usr/lib
67 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.{a,so*} $(1)/usr/lib
68 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.{a,so*} $(1)/usr/lib
71 define Package/libblkid
72 $(call Package/util-linux/Default)
74 TITLE:=block device id library
79 define Package/libblkid/description
80 The libblkid library is used to identify block devices (disks) as to their
81 content (e.g. filesystem type, partitions) as well as extracting additional
82 information such as filesystem labels/volume names, partitions, unique
83 identifiers/serial numbers...
86 define Package/libmount
87 $(call Package/util-linux/Default)
94 define Package/libmount/description
95 The libmount library is used to parse /etc/fstab, /etc/mtab and
96 /proc/self/mountinfo files, manage the mtab file, evaluate mount options...
99 define Package/libuuid
100 $(call Package/util-linux/Default)
101 TITLE:=DCE compatible Universally Unique Identifier library
106 define Package/libuuid/description
107 The UUID library is used to generate unique identifiers for objects
108 that may be accessible beyond the local system. This library
109 generates UUIDs compatible with those created by the Open Software
110 Foundation (OSF) Distributed Computing Environment (DCE) utility.
113 define Package/libsmartcols
114 $(call Package/util-linux/Default)
115 TITLE:=table or tree library
120 define Package/libsmartcols/description
121 The smartcols library is used to print tables and trees in a pretty way.
124 define Package/agetty
125 $(call Package/util-linux/Default)
126 TITLE:=alternative Linux getty
130 define Package/agetty/description
131 agetty opens a tty port, prompts for a login name and invokes the
136 $(call Package/util-linux/Default)
137 TITLE:=locate/print block device attributes
138 DEPENDS:= +libblkid +libuuid
142 define Package/blkid/description
143 The blkid program is the command-line interface to working with the libblkid
148 $(call Package/util-linux/Default)
149 TITLE:=display a calendar
150 DEPENDS:= +libncurses
153 define Package/cal/description
154 cal displays a simple calendar
157 define Package/cfdisk
158 $(call Package/util-linux/Default)
159 TITLE:=display or manipulate disk partition table
160 DEPENDS:= +libblkid +libncurses +libsmartcols
164 define Package/cfdisk/description
165 cfdisk is a curses-based program for partitioning any hard disk drive
169 $(call Package/util-linux/Default)
170 TITLE:=print or control the kernel ring buffer
174 define Package/dmesg/description
175 dmesg is used to examine or control the kernel ring buffer
179 $(call Package/util-linux/Default)
180 TITLE:=manipulate disk partition table
181 DEPENDS:= +libblkid +libsmartcols
185 define Package/fdisk/description
186 a menu-driven program for creation and manipulation of partition tables
189 define Package/findfs
190 $(call Package/util-linux/Default)
191 TITLE:=find a filesystem by label or UUID
196 define Package/findfs/description
197 findfs will search the disks in the system looking for a filesystem which has
198 a label matching label or a UUID equal to uuid
202 $(call Package/util-linux/Default)
203 TITLE:=manage locks from shell scripts
206 define Package/flock/description
207 manages flock locks from within shell scripts or the command line
210 define Package/getopt
211 $(call Package/util-linux/Default)
212 TITLE:=parse command options (enhanced)
215 define Package/getopt/description
216 getopt is used to break up (parse) options in command lines for easy parsing
217 by shell procedures, and to check for legal options
220 define Package/hwclock
221 $(call Package/util-linux/Default)
222 TITLE:=query or set the hardware clock
225 define Package/hwclock/description
226 hwclock is a tool for accessing the Hardware Clock
229 define Package/logger
230 $(call Package/util-linux/Default)
231 TITLE:=a shell command interface to the syslog system log module
234 define Package/logger/description
235 logger makes entries in the system log, it provides a shell command interface
236 to the syslog system log module
240 $(call Package/util-linux/Default)
241 TITLE:=display lines beginning with a given string
244 define Package/look/description
245 look utility displays any lines in file which contain string
248 define Package/losetup
249 $(call Package/util-linux/Default)
250 TITLE:=set up and control loop devices
253 define Package/losetup/description
254 losetup is used to associate loop devices with regular files or block devices,
255 to detach loop devices and to query the status of a loop device
259 $(call Package/util-linux/Default)
260 TITLE:=list block devices
261 DEPENDS:= +libblkid +libmount +libsmartcols
265 define Package/lsblk/description
266 lsblk lists information about all or the specified block devices
269 define Package/mcookie
270 $(call Package/util-linux/Default)
271 TITLE:=generate magic cookies for xauth
274 define Package/mcookie/description
275 mcookie generates a 128-bit random hexadecimal number for use with the X
279 define Package/mount-utils
280 $(call Package/util-linux/Default)
281 TITLE:=related (u)mount utilities
282 DEPENDS+= +libmount +libsmartcols
285 define Package/mount-utils/description
286 contains: mount, umount, findmnt
290 $(call Package/util-linux/Default)
291 TITLE:=follow a pathname until a terminal point is found
294 define Package/namei/description
295 namei uses its arguments as pathnames to any type of Unix file (symlinks,
296 files, directories, and so forth)
299 define Package/rename
300 $(call Package/util-linux/Default)
304 define Package/rename/description
305 rename will rename the specified files by replacing the first occurrence of
306 expression in their name by replacement
309 define Package/partx-utils
310 $(call Package/util-linux/Default)
311 TITLE:=inform kernel about the presence and numbering of on-disk partitions
312 DEPENDS:= +libblkid +libsmartcols
316 define Package/partx-utils/description
317 contains partx, addpart, delpart
320 define Package/script-utils
321 $(call Package/util-linux/Default)
322 TITLE:=make and replay typescript of terminal session
326 define Package/script-utils/description
327 contains: script, scriptreplay
330 define Package/setterm
331 $(call Package/util-linux/Default)
332 TITLE:=set terminal attributes
333 DEPENDS:= +libncurses
337 define Package/setterm/description
338 setterm writes to standard output a character string that will invoke the
339 specified terminal capabilities
342 define Package/sfdisk
343 $(call Package/util-linux/Default)
344 TITLE:=partition table manipulator for Linux
348 define Package/sfdisk/description
349 list the size of a partition, list the partitions on a device, check the
350 partitions on a device and repartition a device
353 define Package/swap-utils
354 $(call Package/util-linux/Default)
355 TITLE:=swap space management utilities
360 define Package/swap-utils/description
361 contains: mkswap, swaplabel
365 $(call Package/util-linux/Default)
366 TITLE:=UUID generation daemon
370 define Package/uuidd/description
371 The uuidd daemon is used by the UUID library to generate universally unique
372 identifiers (UUIDs), especially time-based UUIDs, in a secure and
373 guaranteed-unique fashion, even in the face of large numbers of threads
374 running on different CPUs trying to grab UUIDs.
377 define Package/uuidgen
378 $(call Package/util-linux/Default)
379 TITLE:=create a new UUID value
383 define Package/uuidgen/description
384 The uuidgen program creates (and prints) a new universally unique identifier
385 (UUID) using the libuuid library. The new UUID can reasonably be considered
386 unique among all UUIDs created on the local system, and among UUIDs created on
387 other systems in the past and in the future.
391 $(call Package/util-linux/Default)
392 TITLE:=send a message to everybody's terminal
396 define Package/wall/description
397 wall sends a message to everybody logged in with their mesg permission
401 define Package/whereis
402 $(call Package/util-linux/Default)
403 TITLE:=locate the binary, source, and manual page files for a command
406 define Package/whereis/description
407 whereis locates source/binary and manuals sections for specified files
410 define Package/wipefs
411 $(call Package/util-linux/Default)
412 TITLE:=wipe a signature from a device
417 define Package/wipefs/description
418 wipefs can erase filesystem, raid or partition table signatures (magic
419 strings) from the specified device to make the signature invisible for
423 define Package/libblkid/install
424 $(INSTALL_DIR) $(1)/usr/lib
425 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
428 define Package/libmount/install
429 $(INSTALL_DIR) $(1)/usr/lib
430 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
433 define Package/libsmartcols/install
434 $(INSTALL_DIR) $(1)/usr/lib
435 $(CP) $(PKG_BUILD_DIR)/.libs/libsmartcols.so.* $(1)/usr/lib/
438 define Package/libuuid/install
439 $(INSTALL_DIR) $(1)/usr/lib
440 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
443 define Package/agetty/install
444 $(INSTALL_DIR) $(1)/usr/sbin
445 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
448 define Package/blkid/install
449 $(INSTALL_DIR) $(1)/usr/sbin
450 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
453 define Package/cal/install
454 $(INSTALL_DIR) $(1)/usr/bin
455 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
458 define Package/cfdisk/install
459 $(INSTALL_DIR) $(1)/usr/sbin
460 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
463 define Package/dmesg/install
464 $(INSTALL_DIR) $(1)/usr/sbin
465 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
468 define Package/fdisk/install
469 $(INSTALL_DIR) $(1)/usr/sbin
470 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
473 define Package/findfs/install
474 $(INSTALL_DIR) $(1)/usr/sbin
475 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
478 define Package/flock/install
479 $(INSTALL_DIR) $(1)/usr/bin
480 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
483 define Package/getopt/install
484 $(INSTALL_DIR) $(1)/usr/bin
485 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
488 define Package/hwclock/install
489 $(INSTALL_DIR) $(1)/usr/sbin
490 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
493 define Package/logger/install
494 $(INSTALL_DIR) $(1)/usr/bin
495 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
498 define Package/look/install
499 $(INSTALL_DIR) $(1)/usr/bin
500 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
503 define Package/losetup/install
504 $(INSTALL_DIR) $(1)/usr/sbin
505 $(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
508 define Package/lsblk/install
509 $(INSTALL_DIR) $(1)/usr/bin
510 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
513 define Package/mcookie/install
514 $(INSTALL_DIR) $(1)/usr/bin
515 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
518 define Package/mount-utils/install
519 $(INSTALL_DIR) $(1)/usr/bin
520 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
521 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
522 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
525 define Package/namei/install
526 $(INSTALL_DIR) $(1)/usr/bin
527 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
530 define Package/rename/install
531 $(INSTALL_DIR) $(1)/usr/bin
532 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
535 define Package/partx-utils/install
536 $(INSTALL_DIR) $(1)/usr/sbin
537 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
538 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
542 define Package/script-utils/install
543 $(INSTALL_DIR) $(1)/usr/bin
544 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
545 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
548 define Package/setterm/install
549 $(INSTALL_DIR) $(1)/usr/bin
550 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
553 define Package/sfdisk/install
554 $(INSTALL_DIR) $(1)/usr/sbin
555 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
558 define Package/swap-utils/install
559 $(INSTALL_DIR) $(1)/usr/sbin
560 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
561 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
564 define Package/uuidd/install
565 $(INSTALL_DIR) $(1)/usr/sbin
566 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
569 define Package/uuidgen/install
570 $(INSTALL_DIR) $(1)/usr/bin
571 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
574 define Package/wall/install
575 $(INSTALL_DIR) $(1)/usr/bin
576 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
579 define Package/whereis/install
580 $(INSTALL_DIR) $(1)/usr/bin
581 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
584 define Package/wipefs/install
585 $(INSTALL_DIR) $(1)/usr/sbin
586 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
589 $(eval $(call BuildPackage,libblkid))
590 $(eval $(call BuildPackage,libmount))
591 $(eval $(call BuildPackage,libsmartcols))
592 $(eval $(call BuildPackage,libuuid))
593 $(eval $(call BuildPackage,agetty))
594 $(eval $(call BuildPackage,blkid))
595 $(eval $(call BuildPackage,cal))
596 $(eval $(call BuildPackage,cfdisk))
597 $(eval $(call BuildPackage,dmesg))
598 $(eval $(call BuildPackage,fdisk))
599 $(eval $(call BuildPackage,findfs))
600 $(eval $(call BuildPackage,flock))
601 $(eval $(call BuildPackage,getopt))
602 $(eval $(call BuildPackage,hwclock))
603 $(eval $(call BuildPackage,logger))
604 $(eval $(call BuildPackage,look))
605 $(eval $(call BuildPackage,losetup))
606 $(eval $(call BuildPackage,lsblk))
607 $(eval $(call BuildPackage,mcookie))
608 $(eval $(call BuildPackage,mount-utils))
609 $(eval $(call BuildPackage,namei))
610 $(eval $(call BuildPackage,rename))
611 $(eval $(call BuildPackage,partx-utils))
612 $(eval $(call BuildPackage,script-utils))
613 $(eval $(call BuildPackage,setterm))
614 $(eval $(call BuildPackage,sfdisk))
615 $(eval $(call BuildPackage,swap-utils))
616 $(eval $(call BuildPackage,uuidd))
617 $(eval $(call BuildPackage,uuidgen))
618 $(eval $(call BuildPackage,wall))
619 $(eval $(call BuildPackage,whereis))
620 $(eval $(call BuildPackage,wipefs))