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