qemu-or1k: sync needed kernel symbols from or1k-sim
[openadk.git] / package / util-linux / Makefile
blob2c6f60c5216caafac37847317b5e5f67dec4c014
1 # This file is part of the OpenADK project. OpenADK is copyrighted
2 # material, please see the LICENCE file in the top-level directory.
4 include $(ADK_TOPDIR)/rules.mk
6 PKG_NAME:= util-linux
7 PKG_VERSION:= 2.28.2
8 PKG_RELEASE:= 2
9 PKG_HASH:= b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd
10 PKG_DESCR:= basic utilities
11 PKG_SECTION:= base/apps
12 PKG_BUILDDEP:= ncurses
13 PKG_NEEDS:= threads
14 PKG_SITES:= http://www.kernel.org/pub/linux/utils/util-linux/v2.28/
15 PKG_OPTS:= dev
17 PKG_SUBPKGS:= FDISK AGETTY SFDISK SWAP_UTILS LOSETUP MCOOKIE MOUNT
18 PKG_SUBPKGS+= LIBFDISK LIBUUID LIBBLKID LIBMOUNT CFDISK MKFS
19 PKGSD_LIBUUID:= uuid library
20 PKGSC_LIBUUID:= libs/misc
21 PKGSD_LIBBLKID:= blkid library
22 PKGSC_LIBBLKID:= libs/misc
23 PKGSD_LIBFDISK:= fdisk library
24 PKGSC_LIBFDISK:= libs/misc
25 PKGSD_LIBMOUNT:= mount library
26 PKGSC_LIBMOUNT:= libs/misc
27 PKGSD_FDISK:= partition table manipulation utility
28 PKGSC_FDISK:= sys/fs
29 PKGSS_FDISK:= libfdisk
30 PKGSD_AGETTY:= getty utility
31 PKGSC_AGETTY:= base/apps
32 PKGSS_AGETTY:= libncurses
33 PKGSD_SFDISK:= scriptable partition table manipulation utility
34 PKGSC_SFDISK:= sys/fs
35 PKGSS_SFDISK:= libfdisk libreadline
36 PKGSD_CFDISK:= partition table manipulation utility
37 PKGSC_CFDISK:= sys/fs
38 PKGSS_CFDISK:= libfdisk
39 PKGSD_SWAP_UTILS:= swap space management utilities
40 PKGSS_SWAP_UTILS:= libblkid
41 PKGSC_SWAP_UTILS:= sys/fs
42 PKGSD_LOSETUP:= loop devices management utilities
43 PKGSC_LOSETUP:= sys/fs
44 PKGSD_MKFS:= filesystem creation frontend
45 PKGSC_MKFS:= sys/fs
46 PKGSD_MOUNT:= mount/umount utilities
47 PKGSS_MOUNT:= libblkid libmount libuuid libncurses
48 PKGSC_MOUNT:= sys/fs
49 PKGSD_MCOOKIE:= generate magic cookies for xauth
50 PKGSC_MCOOKIE:= x11/utils
52 include $(ADK_TOPDIR)/mk/host.mk
53 include $(ADK_TOPDIR)/mk/package.mk
55 $(eval $(call HOST_template,UTIL_LINUX,util-linux,$(PKG_VERSION)-$(PKG_RELEASE)))
56 $(eval $(call PKG_template,AGETTY,agetty,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_AGETTY),$(PKGSC_AGETTY)))
57 $(eval $(call PKG_template,FDISK,fdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_FDISK),$(PKGSC_FDISK)))
58 $(eval $(call PKG_template,CFDISK,cfdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_CFDISK),$(PKGSC_CFDISK)))
59 $(eval $(call PKG_template,SFDISK,sfdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_SFDISK),$(PKGSC_SFDISK)))
60 $(eval $(call PKG_template,SWAP_UTILS,swap-utils,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_SWAP_UTILS),$(PKGSD_SWAP_UTILS),$(PKGSC_SWAP_UTILS)))
61 $(eval $(call PKG_template,LOSETUP,losetup,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_LOSETUP),$(PKGSD_LOSETUP),$(PKGSC_LOSETUP)))
62 $(eval $(call PKG_template,MKFS,mkfs,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_MKFS),$(PKGSD_MKFS),$(PKGSC_MKFS)))
63 $(eval $(call PKG_template,MOUNT,mount,$(PKG_VERSION)-$(PKG_RELEASE),$(PKGSS_MOUNT),$(PKGSD_MOUNT),$(PKGSC_MOUNT)))
64 $(eval $(call PKG_template,MCOOKIE,mcookie,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_MCOOKIE),$(PKGSC_MCOOKIE)))
65 $(eval $(call PKG_template,LIBUUID,libuuid,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_LIBUUID),$(PKGSC_LIBUUID),$(PKG_OPTS)))
66 $(eval $(call PKG_template,LIBBLKID,libblkid,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_LIBBLKID),$(PKGSC_LIBBLKID),$(PKG_OPTS)))
67 $(eval $(call PKG_template,LIBFDISK,libfdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_LIBFDISK),$(PKGSC_LIBFDISK),$(PKG_OPTS)))
68 $(eval $(call PKG_template,LIBMOUNT,libmount,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKGSD_LIBMOUNT),$(PKGSC_LIBMOUNT),$(PKG_OPTS)))
70 TARGET_CFLAGS+= -DSWAPON_HAS_TWO_ARGS -DHAVE_LLSEEK
71 TARGET_LDFLAGS+= -ltinfo
73 CONFIGURE_ARGS+= --with-pic \
74 --disable-use-tty-group \
75 --disable-chfn-chsh \
76 --disable-more \
77 --disable-su \
78 --disable-runuser \
79 --disable-schedutils \
80 --disable-setpriv \
81 --disable-setterm \
82 --disable-cramfs \
83 --disable-login \
84 --disable-eject \
85 --disable-switch_root \
86 --disable-nsenter \
87 --disable-unshare \
88 --disable-wall \
89 --disable-symvers \
90 --without-python \
91 --without-systemd \
92 --without-user \
93 --enable-libfdisk \
94 --enable-libuuid \
95 --enable-libblkid \
96 --enable-libmount
98 ifeq ($(ADK_PACKAGE_FDISK)$(ADK_PACKAGE_AGETTY)$(ADK_PACKAGE_SFDISK)$(ADK_PACKAGE_CFDISK)$(ADK_PACKAGE_MKFS)$(ADK_PACKAGE_MOUNT)$(ADK_PACKAGE_SWAP_UTILS)$(ADK_PACKAGE_MCOOKIE),)
99 CONFIGURE_ARGS+= --disable-all-programs
100 endif
102 TARGET_CFLAGS+= -fPIC
103 FAKE_FLAGS+= INSTALLSUID="install -m 4755"
104 HOST_CONFIGURE_ARGS+= --enable-libuuid \
105 --disable-all-programs \
106 --disable-use-tty-group
108 fdisk-install:
109 $(INSTALL_DIR) $(IDIR_FDISK)/usr/sbin
110 $(CP) $(WRKINST)/sbin/fdisk $(IDIR_FDISK)/usr/sbin
112 agetty-install:
113 $(INSTALL_DIR) $(IDIR_AGETTY)/sbin
114 $(CP) $(WRKINST)/sbin/agetty $(IDIR_AGETTY)/sbin
116 cfdisk-install:
117 $(INSTALL_DIR) $(IDIR_CFDISK)/usr/sbin
118 $(CP) $(WRKINST)/sbin/cfdisk $(IDIR_FDISK)/usr/sbin
120 sfdisk-install:
121 $(INSTALL_DIR) $(IDIR_SFDISK)/usr/sbin
122 $(CP) $(WRKINST)/sbin/sfdisk $(IDIR_SFDISK)/usr/sbin
124 losetup-install:
125 $(INSTALL_DIR) $(IDIR_LOSETUP)/usr/sbin
126 $(CP) $(WRKINST)/sbin/losetup $(IDIR_LOSETUP)/usr/sbin
128 swap-utils-install:
129 $(INSTALL_DIR) $(IDIR_SWAP_UTILS)/usr/sbin
130 $(CP) $(WRKINST)/sbin/mkswap $(IDIR_SWAP_UTILS)/usr/sbin
131 $(CP) $(WRKINST)/sbin/swap{on,off} $(IDIR_SWAP_UTILS)/usr/sbin
133 mkfs-install:
134 $(INSTALL_DIR) $(IDIR_MKFS)/usr/sbin
135 $(INSTALL_BIN) $(WRKBUILD)/mkfs $(IDIR_MKFS)/usr/sbin
137 mount-install:
138 $(INSTALL_DIR) $(IDIR_MOUNT)/bin
139 $(INSTALL_BIN) $(WRKINST)/usr/bin/{u,}mount $(IDIR_MOUNT)/bin
141 mcookie-install:
142 $(INSTALL_DIR) $(IDIR_MCOOKIE)/usr/bin
143 $(INSTALL_BIN) $(WRKINST)/usr/bin/mcookie $(IDIR_MCOOKIE)/usr/bin
145 libuuid-install:
146 $(INSTALL_DIR) $(IDIR_LIBUUID)/usr/lib
147 $(CP) $(WRKINST)/lib/libuuid.so* $(IDIR_LIBUUID)/usr/lib
149 libblkid-install:
150 $(INSTALL_DIR) $(IDIR_LIBBLKID)/usr/lib
151 $(CP) $(WRKINST)/lib/libblkid.so* $(IDIR_LIBBLKID)/usr/lib
153 libfdisk-install:
154 $(INSTALL_DIR) $(IDIR_LIBFDISK)/usr/lib
155 $(CP) $(WRKINST)/lib/libfdisk.so* $(IDIR_LIBFDISK)/usr/lib
156 $(CP) $(WRKINST)/lib/libsmartcols.so* $(IDIR_LIBFDISK)/usr/lib
158 libmount-install:
159 $(INSTALL_DIR) $(IDIR_LIBMOUNT)/usr/lib
160 $(CP) $(WRKINST)/lib/libmount.so* $(IDIR_LIBMOUNT)/usr/lib
162 include $(ADK_TOPDIR)/mk/host-bottom.mk
163 include $(ADK_TOPDIR)/mk/pkg-bottom.mk