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