Root/package/util-linux/Makefile

1#
2# Copyright (C) 2007-2012 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=util-linux
11PKG_VERSION:=2.21.2
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
16PKG_MD5SUM:=54ba880f1d66782c2287ee2c898520e9
17
18PKG_BUILD_PARALLEL:=1
19PKG_BUILD_DEPENDS:=libncurses
20PKG_FIXUP:=autoreconf
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/util-linux/Default
25  SECTION:=utils
26  CATEGORY:=Utilities
27  URL:=http://www.kernel.org/pub/linux/utils/util-linux/
28endef
29
30CONFIGURE_ARGS += \
31    --enable-new-mount \
32    --with-ncurses \
33    --disable-nls \
34    --disable-tls \
35    --without-udev
36
37TARGET_CFLAGS += $(FPIC)
38
39define Build/InstallDev
40    $(MAKE) -C $(PKG_BUILD_DIR) \
41        BUILDCC="$(HOSTCC)" \
42        DESTDIR="$(1)" \
43        installdirs install-data
44
45    $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
46    $(CP) $(PKG_BUILD_DIR)/libblkid/blkid.pc $(1)/usr/lib/pkgconfig
47    $(CP) $(PKG_BUILD_DIR)/libmount/mount.pc $(1)/usr/lib/pkgconfig
48    $(CP) $(PKG_BUILD_DIR)/libuuid/uuid.pc $(1)/usr/lib/pkgconfig
49
50    $(INSTALL_DIR) $(1)/usr/include/blkid
51    $(CP) $(PKG_BUILD_DIR)/libblkid/src/blkid.h $(1)/usr/include/blkid
52    $(INSTALL_DIR) $(1)/usr/include/libmount
53    $(CP) $(PKG_BUILD_DIR)/libmount/src/libmount.h $(1)/usr/include/libmount
54    $(INSTALL_DIR) $(1)/usr/include/uuid
55    $(CP) $(PKG_BUILD_DIR)/libuuid/src/uuid.h $(1)/usr/include/uuid
56
57    $(INSTALL_DIR) $(1)/usr/lib
58    $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.{a,so.*} $(1)/usr/lib
59    $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.{a,so.*} $(1)/usr/lib
60    $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.{a,so.*} $(1)/usr/lib
61endef
62
63define Package/libblkid
64$(call Package/util-linux/Default)
65  DEPENDS:=+libuuid
66  TITLE:=block device id library
67  SECTION:=libs
68  CATEGORY:=Libraries
69endef
70
71define Package/libblkid/description
72 The libblkid library is used to identify block devices (disks) as to their
73 content (e.g. filesystem type, partitions) as well as extracting additional
74 information such as filesystem labels/volume names, partitions, unique
75 identifiers/serial numbers...
76endef
77
78define Package/libmount
79$(call Package/util-linux/Default)
80  DEPENDS:=+libblkid
81  TITLE:=mount library
82  SECTION:=libs
83  CATEGORY:=Libraries
84endef
85
86define 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...
89endef
90
91define Package/libuuid
92$(call Package/util-linux/Default)
93  TITLE:=DCE compatible Universally Unique Identifier library
94  SECTION:=libs
95  CATEGORY:=Libraries
96endef
97
98define 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.
103endef
104
105define Package/agetty
106$(call Package/util-linux/Default)
107  TITLE:=alternative Linux getty
108  SUBMENU=Terminal
109endef
110
111define Package/agetty/description
112 agetty opens a tty port, prompts for a login name and invokes the
113 /bin/login command
114endef
115
116define Package/blkid
117$(call Package/util-linux/Default)
118  TITLE:=locate/print block device attributes
119  DEPENDS:= +libblkid
120  SUBMENU=disc
121endef
122
123define Package/blkid/description
124 The blkid program is the command-line interface to working with the libblkid
125 library.
126endef
127
128define Package/cal
129$(call Package/util-linux/Default)
130  TITLE:=display a calendar
131  DEPENDS:= +libncurses
132endef
133
134define Package/cal/description
135 cal displays a simple calendar
136endef
137
138define Package/cfdisk
139$(call Package/util-linux/Default)
140  TITLE:=display or manipulate disk partition table
141  DEPENDS:= +libblkid +libncurses
142  SUBMENU:=disc
143endef
144
145define Package/cfdisk/description
146 cfdisk is a curses-based program for partitioning any hard disk drive
147endef
148
149define Package/dmesg
150$(call Package/util-linux/Default)
151  TITLE:=print or control the kernel ring buffer
152endef
153
154define Package/dmesg/description
155 dmesg is used to examine or control the kernel ring buffer
156endef
157
158define Package/fdisk
159$(call Package/util-linux/Default)
160  TITLE:=manipulate disk partition table
161  DEPENDS:= +libblkid
162  SUBMENU=disc
163endef
164
165define Package/fdisk/description
166 a menu-driven program for creation and manipulation of partition tables
167endef
168
169define Package/findfs
170$(call Package/util-linux/Default)
171  TITLE:=find a filesystem by label or UUID
172  DEPENDS:= +libblkid
173  SUBMENU=disc
174endef
175
176define 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
179endef
180
181define Package/flock
182$(call Package/util-linux/Default)
183  TITLE:=manage locks from shell scripts
184endef
185
186define Package/flock/description
187  manages flock locks from within shell scripts or the command line
188endef
189
190define Package/getopt
191$(call Package/util-linux/Default)
192  TITLE:=parse command options (enhanced)
193endef
194
195define 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
198endef
199
200define Package/hwclock
201$(call Package/util-linux/Default)
202  TITLE:=query or set the hardware clock
203endef
204
205define Package/hwclock/description
206 hwclock is a tool for accessing the Hardware Clock
207endef
208
209define Package/logger
210$(call Package/util-linux/Default)
211  TITLE:=a shell command interface to the syslog system log module
212endef
213
214define Package/logger/description
215 logger makes entries in the system log, it provides a shell command interface
216 to the syslog system log module
217endef
218
219define Package/look
220$(call Package/util-linux/Default)
221  TITLE:=display lines beginning with a given string
222endef
223
224define Package/look/description
225 look utility displays any lines in file which contain string
226endef
227
228define Package/losetup
229$(call Package/util-linux/Default)
230  TITLE:=set up and control loop devices
231endef
232
233define Package/losetup/description
234 losetup is used to associate loop devices with regular files or block devices,
235 to detach loop devices and to query the status of a loop device
236endef
237
238define Package/lsblk
239$(call Package/util-linux/Default)
240  TITLE:=list block devices
241  DEPENDS:= +libblkid
242  SUBMENU=disc
243endef
244
245define Package/lsblk/description
246 lsblk lists information about all or the specified block devices
247endef
248
249define Package/mcookie
250$(call Package/util-linux/Default)
251  TITLE:=generate magic cookies for xauth
252endef
253
254define Package/mcookie/description
255 mcookie generates a 128-bit random hexadecimal number for use with the X
256 authority system
257endef
258
259define Package/mount-utils
260$(call Package/util-linux/Default)
261  TITLE:=related (u)mount utilities
262  DEPENDS+= +libmount
263endef
264
265define Package/mount-utils/description
266 contains: mount, umount, findmnt
267endef
268
269define Package/namei
270$(call Package/util-linux/Default)
271  TITLE:=follow a pathname until a terminal point is found
272endef
273
274define Package/namei/description
275 namei uses its arguments as pathnames to any type of Unix file (symlinks,
276 files, directories, and so forth)
277endef
278
279define Package/rename
280$(call Package/util-linux/Default)
281  TITLE:=rename files
282endef
283
284define Package/rename/description
285 rename will rename the specified files by replacing the first occurrence of
286 expression in their name by replacement
287endef
288
289define Package/partx-utils
290$(call Package/util-linux/Default)
291  TITLE:=inform kernel about the presence and numbering of on-disk partitions
292  DEPENDS:= +libblkid
293  SUBMENU=disc
294endef
295
296define Package/partx-utils/description
297 contains partx, addpart, delpart
298endef
299
300define Package/script-utils
301$(call Package/util-linux/Default)
302  TITLE:=make and replay typescript of terminal session
303  SUBMENU=Terminal
304endef
305
306define Package/script-utils/description
307 contains: script, scriptreplay
308endef
309
310define Package/setterm
311$(call Package/util-linux/Default)
312  TITLE:=set terminal attributes
313  DEPENDS:= +libncurses
314  SUBMENU:=Terminal
315endef
316
317define Package/setterm/description
318 setterm writes to standard output a character string that will invoke the
319 specified terminal capabilities
320endef
321
322define Package/sfdisk
323$(call Package/util-linux/Default)
324  TITLE:=partition table manipulator for Linux
325  SUBMENU=disc
326endef
327
328define Package/sfdisk/description
329 list the size of a partition, list the partitions on a device, check the
330 partitions on a device and repartition a device
331endef
332
333define Package/swap-utils
334$(call Package/util-linux/Default)
335  TITLE:=swap space management utilities
336  DEPENDS+= +libblkid
337  SUBMENU:=disc
338endef
339
340define Package/swap-utils/description
341 contains: mkswap, swaplabel, swapon, swapoff
342endef
343
344define Package/uuidd
345$(call Package/util-linux/Default)
346  TITLE:=UUID generation daemon
347  DEPENDS:= +libuuid
348endef
349
350define Package/uuidd/description
351 The uuidd daemon is used by the UUID library to generate universally unique
352 identifiers (UUIDs), especially time-based UUIDs, in a secure and
353 guaranteed-unique fashion, even in the face of large numbers of threads
354 running on different CPUs trying to grab UUIDs.
355endef
356
357define Package/uuidgen
358$(call Package/util-linux/Default)
359  TITLE:=create a new UUID value
360  DEPENDS:= +libuuid
361endef
362
363define Package/uuidgen/description
364 The uuidgen program creates (and prints) a new universally unique identifier
365 (UUID) using the libuuid library. The new UUID can reasonably be considered
366 unique among all UUIDs created on the local system, and among UUIDs created on
367 other systems in the past and in the future.
368endef
369
370define Package/wall
371$(call Package/util-linux/Default)
372  TITLE:=send a message to everybody's terminal
373  SUBMENU=Terminal
374endef
375
376define Package/wall/description
377 wall sends a message to everybody logged in with their mesg permission
378 set to yes
379endef
380
381define Package/whereis
382$(call Package/util-linux/Default)
383  TITLE:=locate the binary, source, and manual page files for a command
384endef
385
386define Package/whereis/description
387 whereis locates source/binary and manuals sections for specified files
388endef
389
390define Package/wipefs
391$(call Package/util-linux/Default)
392  TITLE:=wipe a signature from a device
393  DEPENDS:= +libblkid
394  SUBMENU:=disc
395endef
396
397define Package/wipefs/description
398 wipefs can erase filesystem, raid or partition table signatures (magic
399 strings) from the specified device to make the signature invisible for
400 libblkid.
401endef
402
403define Package/libblkid/install
404        $(INSTALL_DIR) $(1)/usr/lib
405    $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
406endef
407
408define Package/libmount/install
409        $(INSTALL_DIR) $(1)/usr/lib
410    $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
411endef
412
413define Package/libuuid/install
414        $(INSTALL_DIR) $(1)/usr/lib
415    $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
416endef
417
418define Package/agetty/install
419    $(INSTALL_DIR) $(1)/sbin
420    $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
421endef
422
423define Package/blkid/install
424    $(INSTALL_DIR) $(1)/sbin
425    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
426endef
427
428define Package/cal/install
429    $(INSTALL_DIR) $(1)/usr/bin
430    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
431endef
432
433define Package/cfdisk/install
434    $(INSTALL_DIR) $(1)/sbin
435    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
436endef
437
438define Package/fdisk/install
439    $(INSTALL_DIR) $(1)/sbin
440    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
441endef
442
443define Package/findfs/install
444    $(INSTALL_DIR) $(1)/sbin
445    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
446endef
447
448define Package/flock/install
449    $(INSTALL_DIR) $(1)/usr/bin
450    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
451endef
452
453define Package/getopt/install
454    $(INSTALL_DIR) $(1)/usr/bin
455    $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
456endef
457
458define Package/hwclock/install
459    $(INSTALL_DIR) $(1)/sbin
460    $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
461endef
462
463define Package/logger/install
464    $(INSTALL_DIR) $(1)/usr/bin
465    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
466endef
467
468define Package/look/install
469    $(INSTALL_DIR) $(1)/usr/bin
470    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
471endef
472
473define Package/losetup/install
474    $(INSTALL_DIR) $(1)/sbin
475    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
476endef
477
478define Package/lsblk/install
479    $(INSTALL_DIR) $(1)/bin
480    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
481endef
482
483define Package/mcookie/install
484    $(INSTALL_DIR) $(1)/usr/bin
485    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
486endef
487
488define Package/mount-utils/install
489    $(INSTALL_DIR) $(1)/bin
490    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/{u,}mount $(1)/bin/
491    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/mountpoint $(1)/bin/
492    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findmnt $(1)/bin/
493endef
494
495define Package/namei/install
496    $(INSTALL_DIR) $(1)/usr/bin/
497    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
498endef
499
500define Package/rename/install
501    $(INSTALL_DIR) $(1)/usr/bin/
502    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
503endef
504
505define Package/partx-utils/install
506    $(INSTALL_DIR) $(1)/usr/sbin
507    $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/.libs/partx $(1)/usr/sbin/
508    $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/addpart $(1)/usr/sbin/
509    $(INSTALL_BIN) $(PKG_BUILD_DIR)/partx/delpart $(1)/usr/sbin/
510endef
511
512define Package/script-utils/install
513    $(INSTALL_DIR) $(1)/usr/bin
514    $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/script $(1)/usr/bin/
515    $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/scriptreplay $(1)/usr/bin/
516endef
517
518define Package/setterm/install
519    $(INSTALL_DIR) $(1)/usr/bin
520    $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
521endef
522
523define Package/sfdisk/install
524    $(INSTALL_DIR) $(1)/sbin
525    $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
526endef
527
528define Package/swap-utils/install
529    $(INSTALL_DIR) $(1)/sbin
530    $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/mkswap $(1)/sbin/
531    $(INSTALL_BIN) $(PKG_BUILD_DIR)/disk-utils/.libs/swaplabel $(1)/sbin/
532    $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/.libs/swapon $(1)/sbin/
533    ln -sf swapon $(1)/sbin/swapoff
534endef
535
536define Package/uuidd/install
537    $(INSTALL_DIR) $(1)/usr/sbin
538    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
539endef
540
541define Package/uuidgen/install
542    $(INSTALL_DIR) $(1)/usr/bin
543    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
544endef
545
546define Package/wall/install
547    $(INSTALL_DIR) $(1)/usr/bin
548    $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
549endef
550
551define Package/whereis/install
552    $(INSTALL_DIR) $(1)/usr/bin
553    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
554endef
555
556define Package/wipefs/install
557    $(INSTALL_DIR) $(1)/sbin
558    $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
559endef
560
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))
592

Archive Download this file



interactive