source: trunk/package/util-linux/Makefile @ 31701

Last change on this file since 31701 was 31701, checked in by juhosg, 5 years ago

package/util-linux: install development files

Also remove trailing whitespaces from the Makefile.

Based on a patch by M. Braun.

File size: 15.7 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=util-linux
11PKG_VERSION:=2.21.1
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
15PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.21
16PKG_MD5SUM:=ad602dcd528f340b1329cfa6200d8f80
17
18PKG_BUILD_PARALLEL:=1
19PKG_BUILD_DEPENDS:=libncurses
20PKG_FIXUP:=autoreconf
21
22include $(INCLUDE_DIR)/package.mk
23
24define Package/util-linux/Default
25  SECTION:=utils
26  CATEGORY:=Utilities
27  URL:=http://www.kernel.org/pub/linux/utils/util-linux/
28endef
29
30CONFIGURE_VARS += \
31        scanf_cv_alloc_modifier="ms"
32
33CONFIGURE_ARGS += \
34        --enable-new-mount      \
35        --with-ncurses          \
36        --disable-nls           \
37        --disable-tls
38
39define 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
61endef
62
63define Package/libblkid
64$(call Package/util-linux/Default)
65  TITLE:=block device id library
66  SECTION:=libs
67  CATEGORY:=Libraries
68endef
69
70define 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...
75endef
76
77define Package/libmount
78$(call Package/util-linux/Default)
79  TITLE:=mount library
80  SECTION:=libs
81  CATEGORY:=Libraries
82endef
83
84define 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...
87endef
88
89define Package/libuuid
90$(call Package/util-linux/Default)
91  TITLE:=DCE compatible Universally Unique Identifier library
92  SECTION:=libs
93  CATEGORY:=Libraries
94endef
95
96define 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.
101endef
102
103define Package/agetty
104$(call Package/util-linux/Default)
105  TITLE:=alternative Linux getty
106  SUBMENU=Terminal
107endef
108
109define Package/agetty/description
110 agetty opens a tty port, prompts for a login name and invokes the
111 /bin/login command
112endef
113
114define Package/blkid
115$(call Package/util-linux/Default)
116  TITLE:=locate/print block device attributes
117  DEPENDS:= +libblkid +libuuid
118  SUBMENU=disc
119endef
120
121define Package/blkid/description
122 The blkid program is the command-line interface to working with the libblkid
123 library.
124endef
125
126define Package/cal
127$(call Package/util-linux/Default)
128  TITLE:=display a calendar
129  DEPENDS:= +libncurses
130endef
131
132define Package/cal/description
133 cal displays a simple calendar
134endef
135
136define Package/cfdisk
137$(call Package/util-linux/Default)
138  TITLE:=display or manipulate disk partition table
139  DEPENDS:= +libblkid +libncurses +libuuid
140  SUBMENU:=disc
141endef
142
143define Package/cfdisk/description
144 cfdisk is a curses-based program for partitioning any hard disk drive
145endef
146
147define Package/dmesg
148$(call Package/util-linux/Default)
149  TITLE:=print or control the kernel ring buffer
150endef
151
152define Package/dmesg/description
153 dmesg  is used to examine or control the kernel ring buffer
154endef
155
156define Package/fdisk
157$(call Package/util-linux/Default)
158  TITLE:=manipulate disk partition table
159  DEPENDS:= +libblkid +libuuid
160  SUBMENU=disc
161endef
162
163define Package/fdisk/description
164 a menu-driven program for creation and manipulation of partition tables
165endef
166
167define Package/findfs
168$(call Package/util-linux/Default)
169  TITLE:=find a filesystem by label or UUID
170  DEPENDS:= +libblkid +libuuid
171  SUBMENU=disc
172endef
173
174define 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
177endef
178
179define Package/flock
180$(call Package/util-linux/Default)
181  TITLE:=manage locks from shell scripts
182endef
183
184define Package/flock/description
185  manages flock locks from within shell scripts or the command line
186endef
187
188define Package/getopt
189$(call Package/util-linux/Default)
190  TITLE:=parse command options (enhanced)
191endef
192
193define 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
196endef
197
198define Package/hwclock
199$(call Package/util-linux/Default)
200  TITLE:=query or set the hardware clock
201endef
202
203define Package/hwclock/description
204 hwclock is a tool for accessing the Hardware Clock
205endef
206
207define Package/logger
208$(call Package/util-linux/Default)
209  TITLE:=a shell command interface to the syslog system log module
210endef
211
212define Package/logger/description
213 logger makes entries in the system log, it provides a shell command interface to the syslog system log module
214endef
215
216define Package/look
217$(call Package/util-linux/Default)
218  TITLE:=display lines beginning with a given string
219endef
220
221define Package/look/description
222 look utility displays any lines in file which contain string
223endef
224
225define Package/losetup
226$(call Package/util-linux/Default)
227  TITLE:=set up and control loop devices
228endef
229
230define 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
233endef
234
235define Package/lsblk
236$(call Package/util-linux/Default)
237  TITLE:=list block devices
238  DEPENDS:= +libblkid +libuuid
239  SUBMENU=disc
240endef
241
242define Package/lsblk/description
243 lsblk lists information about all or the specified block devices
244endef
245
246define Package/mcookie
247$(call Package/util-linux/Default)
248  TITLE:=generate magic cookies for xauth
249endef
250
251define Package/mcookie/description
252 mcookie generates a 128-bit random hexadecimal number for use with the X
253 authority system
254endef
255
256define Package/mount-utils
257$(call Package/util-linux/Default)
258  TITLE:=related (u)mount utilities
259  DEPENDS+= +libblkid +libmount +libuuid
260endef
261
262define Package/mount-utils/description
263 contains: mount, umount, findmnt
264endef
265
266define Package/namei
267$(call Package/util-linux/Default)
268  TITLE:=follow a pathname until a terminal point is found
269endef
270
271define Package/namei/description
272 namei uses its arguments as pathnames to any type of Unix file (symlinks,
273 files, directories, and so forth)
274endef
275
276define Package/rename
277$(call Package/util-linux/Default)
278  TITLE:=rename files
279endef
280
281define Package/rename/description
282 rename will rename the specified files by replacing the first occurrence of
283 expression in their name by replacement
284endef
285
286define 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
291endef
292
293define Package/partx-utils/description
294 contains partx, addpart, delpart
295endef
296
297define Package/script-utils
298$(call Package/util-linux/Default)
299  TITLE:=make and replay typescript of terminal session
300  SUBMENU=Terminal
301endef
302
303define Package/script-utils/description
304 contains: script, scriptreplay
305endef
306
307define Package/setterm
308$(call Package/util-linux/Default)
309  TITLE:=set terminal attributes
310  SUBMENU:=Terminal
311endef
312
313define Package/setterm/description
314 setterm writes to standard output a character string that will invoke the
315 specified terminal capabilities
316endef
317
318define Package/sfdisk
319$(call Package/util-linux/Default)
320  TITLE:=partition table manipulator for Linux
321  SUBMENU=disc
322endef
323
324define 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
327endef
328
329define Package/swap-utils
330$(call Package/util-linux/Default)
331  TITLE:=swap space management utilities
332  DEPENDS+= +libblkid +libuuid
333  SUBMENU:=disc
334endef
335
336define Package/swap-utils/description
337 contains: mkswap, swaplabel, swapon, swapoff
338endef
339
340define Package/uuidd
341$(call Package/util-linux/Default)
342  TITLE:=UUID generation daemon
343  DEPENDS:= +libuuid
344endef
345
346define 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.
351endef
352
353define Package/uuidgen
354$(call Package/util-linux/Default)
355  TITLE:=create a new UUID value
356  DEPENDS:= +libuuid
357endef
358
359define 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.
364endef
365
366define Package/wall
367$(call Package/util-linux/Default)
368  TITLE:=send a message to everybody's terminal
369  SUBMENU=Terminal
370endef
371
372define Package/wall/description
373 Wall sends a message to everybody logged in with their mesg permission
374 set to yes
375endef
376
377define Package/whereis
378$(call Package/util-linux/Default)
379  TITLE:=locate the binary, source, and manual page files for a command
380endef
381
382define Package/wipefs/description
383 whereis locates source/binary and manuals sections for specified files
384endef
385
386define Package/wipefs
387$(call Package/util-linux/Default)
388  TITLE:=wipe a signature from a device
389  DEPENDS:= +libblkid +libuuid
390  SUBMENU:=disc
391endef
392
393define 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.
397endef
398
399define Package/libblkid/install
400        $(INSTALL_DIR) $(1)/usr/lib
401        $(CP) $(PKG_BUILD_DIR)/libblkid/src/.libs/libblkid.so.* $(1)/usr/lib/
402endef
403
404define Package/libmount/install
405        $(INSTALL_DIR) $(1)/usr/lib
406        $(CP) $(PKG_BUILD_DIR)/libmount/src/.libs/libmount.so.* $(1)/usr/lib/
407endef
408
409define Package/libuuid/install
410        $(INSTALL_DIR) $(1)/usr/lib
411        $(CP) $(PKG_BUILD_DIR)/libuuid/src/.libs/libuuid.so.* $(1)/usr/lib/
412endef
413
414define Package/agetty/install
415        $(INSTALL_DIR) $(1)/sbin
416        $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/agetty $(1)/sbin/
417endef
418
419define Package/blkid/install
420        $(INSTALL_DIR) $(1)/sbin
421        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/blkid $(1)/sbin/
422endef
423
424define Package/cal/install
425        $(INSTALL_DIR) $(1)/usr/bin
426        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/cal $(1)/usr/bin/
427endef
428
429define Package/cfdisk/install
430        $(INSTALL_DIR) $(1)/sbin
431        $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/cfdisk $(1)/sbin/
432endef
433
434define Package/fdisk/install
435        $(INSTALL_DIR) $(1)/sbin
436        $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/.libs/fdisk $(1)/sbin/
437endef
438
439define Package/findfs/install
440        $(INSTALL_DIR) $(1)/sbin
441        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/findfs $(1)/sbin/
442endef
443
444define Package/flock/install
445        $(INSTALL_DIR) $(1)/usr/bin
446        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/flock $(1)/usr/bin/
447endef
448
449define Package/getopt/install
450        $(INSTALL_DIR) $(1)/usr/bin
451        $(INSTALL_BIN) $(PKG_BUILD_DIR)/getopt/getopt $(1)/usr/bin/
452endef
453
454define Package/hwclock/install
455        $(INSTALL_DIR) $(1)/sbin
456        $(INSTALL_BIN) $(PKG_BUILD_DIR)/hwclock/hwclock $(1)/sbin/
457endef
458
459define Package/logger/install
460        $(INSTALL_DIR) $(1)/usr/bin
461        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/logger $(1)/usr/bin/
462endef
463
464define Package/look/install
465        $(INSTALL_DIR) $(1)/usr/bin
466        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/look $(1)/usr/bin/
467endef
468
469define Package/losetup/install
470        $(INSTALL_DIR) $(1)/sbin
471        $(INSTALL_BIN) $(PKG_BUILD_DIR)/sys-utils/losetup $(1)/sbin/
472endef
473
474define Package/lsblk/install
475        $(INSTALL_DIR) $(1)/bin
476        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/lsblk $(1)/bin/
477endef
478
479define Package/mcookie/install
480        $(INSTALL_DIR) $(1)/usr/bin
481        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/mcookie $(1)/usr/bin/
482endef
483
484define 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/
489endef
490
491define Package/namei/install
492        $(INSTALL_DIR) $(1)/usr/bin/
493        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/namei $(1)/usr/bin/
494endef
495
496define Package/rename/install
497        $(INSTALL_DIR) $(1)/usr/bin/
498        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/rename $(1)/usr/bin/
499endef
500
501define 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/
506endef
507
508define 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/
512endef
513
514define Package/setterm/install
515        $(INSTALL_DIR) $(1)/usr/bin
516        $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/setterm $(1)/usr/bin/
517endef
518
519define Package/sfdisk/install
520        $(INSTALL_DIR) $(1)/sbin
521        $(INSTALL_BIN) $(PKG_BUILD_DIR)/fdisk/sfdisk $(1)/sbin/
522endef
523
524define 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
530endef
531
532define Package/uuidd/install
533        $(INSTALL_DIR) $(1)/usr/sbin
534        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidd $(1)/usr/sbin/
535endef
536
537define Package/uuidgen/install
538        $(INSTALL_DIR) $(1)/usr/bin
539        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/uuidgen $(1)/usr/bin/
540endef
541
542define Package/wall/install
543        $(INSTALL_DIR) $(1)/usr/bin
544        $(INSTALL_BIN) $(PKG_BUILD_DIR)/term-utils/wall $(1)/usr/bin/
545endef
546
547define Package/whereis/install
548        $(INSTALL_DIR) $(1)/usr/bin
549        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/whereis $(1)/usr/bin/
550endef
551
552define Package/wipefs/install
553        $(INSTALL_DIR) $(1)/sbin
554        $(INSTALL_BIN) $(PKG_BUILD_DIR)/misc-utils/.libs/wipefs $(1)/sbin/
555endef
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))
Note: See TracBrowser for help on using the repository browser.