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