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

Archive Download this file



interactive