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
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
158 define Package/dmesg/description
159 dmesg is used to examine or control the kernel ring buffer
163 $(call Package/util-linux/Default)
164 TITLE:=manipulate disk partition table
169 define Package/fdisk/description
170 a menu-driven program for creation and manipulation of partition tables
173 define Package/findfs
174 $(call Package/util-linux/Default)
175 TITLE:=find a filesystem by label or UUID
180 define Package/findfs/description
181 findfs will search the disks in the system looking for a filesystem which has
182 a label matching label or a UUID equal to uuid
186 $(call Package/util-linux/Default)
187 TITLE:=manage locks from shell scripts
190 define Package/flock/description
191 manages flock locks from within shell scripts or the command line
194 define Package/getopt
195 $(call Package/util-linux/Default)
196 TITLE:=parse command options (enhanced)
199 define Package/getopt/description
200 getopt is used to break up (parse) options in command lines for easy parsing
201 by shell procedures, and to check for legal options
204 define Package/hwclock
205 $(call Package/util-linux/Default)
206 TITLE:=query or set the hardware clock
209 define Package/hwclock/description
210 hwclock is a tool for accessing the Hardware Clock
213 define Package/logger
214 $(call Package/util-linux/Default)
215 TITLE:=a shell command interface to the syslog system log module
218 define Package/logger/description
219 logger makes entries in the system log, it provides a shell command interface
220 to the syslog system log module
224 $(call Package/util-linux/Default)
225 TITLE:=display lines beginning with a given string
228 define Package/look/description
229 look utility displays any lines in file which contain string
232 define Package/losetup
233 $(call Package/util-linux/Default)
234 TITLE:=set up and control loop devices
237 define Package/losetup/description
238 losetup is used to associate loop devices with regular files or block devices,
239 to detach loop devices and to query the status of a loop device
243 $(call Package/util-linux/Default)
244 TITLE:=list block devices
245 DEPENDS:= +libblkid +libmount
249 define Package/lsblk/description
250 lsblk lists information about all or the specified block devices
253 define Package/mcookie
254 $(call Package/util-linux/Default)
255 TITLE:=generate magic cookies for xauth
258 define Package/mcookie/description
259 mcookie generates a 128-bit random hexadecimal number for use with the X
263 define Package/mount-utils
264 $(call Package/util-linux/Default)
265 TITLE:=related (u)mount utilities
269 define Package/mount-utils/description
270 contains: mount, umount, findmnt
274 $(call Package/util-linux/Default)
275 TITLE:=follow a pathname until a terminal point is found
278 define Package/namei/description
279 namei uses its arguments as pathnames to any type of Unix file (symlinks,
280 files, directories, and so forth)
283 define Package/rename
284 $(call Package/util-linux/Default)
288 define Package/rename/description
289 rename will rename the specified files by replacing the first occurrence of
290 expression in their name by replacement
293 define Package/partx-utils
294 $(call Package/util-linux/Default)
295 TITLE:=inform kernel about the presence and numbering of on-disk partitions
300 define Package/partx-utils/description
301 contains partx, addpart, delpart
304 define Package/script-utils
305 $(call Package/util-linux/Default)
306 TITLE:=make and replay typescript of terminal session
310 define Package/script-utils/description
311 contains: script, scriptreplay
314 define Package/setterm
315 $(call Package/util-linux/Default)
316 TITLE:=set terminal attributes
317 DEPENDS:= +libncurses
321 define Package/setterm/description
322 setterm writes to standard output a character string that will invoke the
323 specified terminal capabilities
326 define Package/sfdisk
327 $(call Package/util-linux/Default)
328 TITLE:=partition table manipulator for Linux
332 define Package/sfdisk/description
333 list the size of a partition, list the partitions on a device, check the
334 partitions on a device and repartition a device
337 define Package/swap-utils
338 $(call Package/util-linux/Default)
339 TITLE:=swap space management utilities
344 define Package/swap-utils/description
345 contains: mkswap, swaplabel
349 $(call Package/util-linux/Default)
350 TITLE:=UUID generation daemon
354 define Package/uuidd/description
355 The uuidd daemon is used by the UUID library to generate universally unique
356 identifiers (UUIDs), especially time-based UUIDs, in a secure and
357 guaranteed-unique fashion, even in the face of large numbers of threads
358 running on different CPUs trying to grab UUIDs.
361 define Package/uuidgen
362 $(call Package/util-linux/Default)
363 TITLE:=create a new UUID value
367 define Package/uuidgen/description
368 The uuidgen program creates (and prints) a new universally unique identifier
369 (UUID) using the libuuid library. The new UUID can reasonably be considered
370 unique among all UUIDs created on the local system, and among UUIDs created on
371 other systems in the past and in the future.
375 $(call Package/util-linux/Default)
376 TITLE:=send a message to everybody's terminal
380 define Package/wall/description
381 wall sends a message to everybody logged in with their mesg permission
385 define Package/whereis
386 $(call Package/util-linux/Default)
387 TITLE:=locate the binary, source, and manual page files for a command
390 define Package/whereis/description
391 whereis locates source/binary and manuals sections for specified files
394 define Package/wipefs
395 $(call Package/util-linux/Default)
396 TITLE:=wipe a signature from a device
401 define Package/wipefs/description
402 wipefs can erase filesystem, raid or partition table signatures (magic
403 strings) from the specified device to make the signature invisible for
407 define Package/libblkid/install
408 $(INSTALL_DIR) $(1)/usr/lib
409 $(CP) $(PKG_BUILD_DIR)/.libs/libblkid.so.* $(1)/usr/lib/
412 define Package/libmount/install
413 $(INSTALL_DIR) $(1)/usr/lib
414 $(CP) $(PKG_BUILD_DIR)/.libs/libmount.so.* $(1)/usr/lib/
417 define Package/libuuid/install
418 $(INSTALL_DIR) $(1)/usr/lib
419 $(CP) $(PKG_BUILD_DIR)/.libs/libuuid.so.* $(1)/usr/lib/
422 define Package/agetty/install
423 $(INSTALL_DIR) $(1)/usr/sbin
424 $(INSTALL_BIN) $(PKG_BUILD_DIR)/agetty $(1)/usr/sbin/
427 define Package/blkid/install
428 $(INSTALL_DIR) $(1)/usr/sbin
429 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/blkid $(1)/usr/sbin/
432 define Package/cal/install
433 $(INSTALL_DIR) $(1)/usr/bin
434 $(INSTALL_BIN) $(PKG_BUILD_DIR)/cal $(1)/usr/bin/
437 define Package/cfdisk/install
438 $(INSTALL_DIR) $(1)/usr/sbin
439 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/cfdisk $(1)/usr/sbin/
442 define Package/dmesg/install
443 $(INSTALL_DIR) $(1)/usr/sbin
444 $(INSTALL_BIN) $(PKG_BUILD_DIR)/dmesg $(1)/usr/sbin/
447 define Package/fdisk/install
448 $(INSTALL_DIR) $(1)/usr/sbin
449 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/fdisk $(1)/usr/sbin/
452 define Package/findfs/install
453 $(INSTALL_DIR) $(1)/usr/sbin
454 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findfs $(1)/usr/sbin/
457 define Package/flock/install
458 $(INSTALL_DIR) $(1)/usr/bin
459 $(INSTALL_BIN) $(PKG_BUILD_DIR)/flock $(1)/usr/bin/
462 define Package/getopt/install
463 $(INSTALL_DIR) $(1)/usr/bin
464 $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt $(1)/usr/bin/
467 define Package/hwclock/install
468 $(INSTALL_DIR) $(1)/usr/sbin
469 $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock $(1)/usr/sbin/
472 define Package/logger/install
473 $(INSTALL_DIR) $(1)/usr/bin
474 $(INSTALL_BIN) $(PKG_BUILD_DIR)/logger $(1)/usr/bin/
477 define Package/look/install
478 $(INSTALL_DIR) $(1)/usr/bin
479 $(INSTALL_BIN) $(PKG_BUILD_DIR)/look $(1)/usr/bin/
482 define Package/losetup/install
483 $(INSTALL_DIR) $(1)/usr/sbin
484 $(INSTALL_BIN) $(PKG_BUILD_DIR)/losetup $(1)/usr/sbin/
487 define Package/lsblk/install
488 $(INSTALL_DIR) $(1)/usr/bin
489 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/lsblk $(1)/usr/bin/
492 define Package/mcookie/install
493 $(INSTALL_DIR) $(1)/usr/bin
494 $(INSTALL_BIN) $(PKG_BUILD_DIR)/mcookie $(1)/usr/bin/
497 define Package/mount-utils/install
498 $(INSTALL_DIR) $(1)/usr/bin
499 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/{u,}mount $(1)/usr/bin/
500 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mountpoint $(1)/usr/bin/
501 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/findmnt $(1)/usr/bin/
504 define Package/namei/install
505 $(INSTALL_DIR) $(1)/usr/bin
506 $(INSTALL_BIN) $(PKG_BUILD_DIR)/namei $(1)/usr/bin/
509 define Package/rename/install
510 $(INSTALL_DIR) $(1)/usr/bin
511 $(INSTALL_BIN) $(PKG_BUILD_DIR)/rename $(1)/usr/bin/
514 define Package/partx-utils/install
515 $(INSTALL_DIR) $(1)/usr/sbin
516 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/partx $(1)/usr/sbin/
517 $(INSTALL_BIN) $(PKG_BUILD_DIR)/addpart $(1)/usr/sbin/
518 $(INSTALL_BIN) $(PKG_BUILD_DIR)/delpart $(1)/usr/sbin/
521 define Package/script-utils/install
522 $(INSTALL_DIR) $(1)/usr/bin
523 $(INSTALL_BIN) $(PKG_BUILD_DIR)/script $(1)/usr/bin/
524 $(INSTALL_BIN) $(PKG_BUILD_DIR)/scriptreplay $(1)/usr/bin/
527 define Package/setterm/install
528 $(INSTALL_DIR) $(1)/usr/bin
529 $(INSTALL_BIN) $(PKG_BUILD_DIR)/setterm $(1)/usr/bin/
532 define Package/sfdisk/install
533 $(INSTALL_DIR) $(1)/usr/sbin
534 $(INSTALL_BIN) $(PKG_BUILD_DIR)/sfdisk $(1)/usr/sbin/
537 define Package/swap-utils/install
538 $(INSTALL_DIR) $(1)/usr/sbin
539 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/mkswap $(1)/usr/sbin/
540 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/swaplabel $(1)/usr/sbin/
543 define Package/uuidd/install
544 $(INSTALL_DIR) $(1)/usr/sbin
545 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidd $(1)/usr/sbin/
548 define Package/uuidgen/install
549 $(INSTALL_DIR) $(1)/usr/bin
550 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/uuidgen $(1)/usr/bin/
553 define Package/wall/install
554 $(INSTALL_DIR) $(1)/usr/bin
555 $(INSTALL_BIN) $(PKG_BUILD_DIR)/wall $(1)/usr/bin/
558 define Package/whereis/install
559 $(INSTALL_DIR) $(1)/usr/bin
560 $(INSTALL_BIN) $(PKG_BUILD_DIR)/whereis $(1)/usr/bin/
563 define Package/wipefs/install
564 $(INSTALL_DIR) $(1)/usr/sbin
565 $(INSTALL_BIN) $(PKG_BUILD_DIR)/.libs/wipefs $(1)/usr/sbin/
568 $(eval $(call BuildPackage,libblkid))
569 $(eval $(call BuildPackage,libmount))
570 $(eval $(call BuildPackage,libuuid))
571 $(eval $(call BuildPackage,agetty))
572 $(eval $(call BuildPackage,blkid))
573 $(eval $(call BuildPackage,cal))
574 $(eval $(call BuildPackage,cfdisk))
575 $(eval $(call BuildPackage,dmesg))
576 $(eval $(call BuildPackage,fdisk))
577 $(eval $(call BuildPackage,findfs))
578 $(eval $(call BuildPackage,flock))
579 $(eval $(call BuildPackage,getopt))
580 $(eval $(call BuildPackage,hwclock))
581 $(eval $(call BuildPackage,logger))
582 $(eval $(call BuildPackage,look))
583 $(eval $(call BuildPackage,losetup))
584 $(eval $(call BuildPackage,lsblk))
585 $(eval $(call BuildPackage,mcookie))
586 $(eval $(call BuildPackage,mount-utils))
587 $(eval $(call BuildPackage,namei))
588 $(eval $(call BuildPackage,rename))
589 $(eval $(call BuildPackage,partx-utils))
590 $(eval $(call BuildPackage,script-utils))
591 $(eval $(call BuildPackage,setterm))
592 $(eval $(call BuildPackage,sfdisk))
593 $(eval $(call BuildPackage,swap-utils))
594 $(eval $(call BuildPackage,uuidd))
595 $(eval $(call BuildPackage,uuidgen))
596 $(eval $(call BuildPackage,wall))
597 $(eval $(call BuildPackage,whereis))
598 $(eval $(call BuildPackage,wipefs))