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