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