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