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