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
9 PKG_HASH
:= b89d37146f20bede93a42c847bce881a17e6dbd8066ff2db2bee733fa409f0cd
10 PKG_DESCR
:= basic utilities
11 PKG_SECTION
:= base
/apps
12 PKG_BUILDDEP
:= ncurses
14 PKG_SITES
:= http
://www.kernel.org
/pub
/linux
/utils
/util-linux
/v2.28
/
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
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
35 PKGSS_SFDISK
:= libfdisk libreadline
36 PKGSD_CFDISK
:= partition table manipulation utility
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
46 PKGSD_MOUNT
:= mount
/umount utilities
47 PKGSS_MOUNT
:= libblkid libmount libuuid libncurses
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 \
79 --disable-schedutils \
85 --disable-switch_root \
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
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
109 $(INSTALL_DIR
) $(IDIR_FDISK
)/usr
/sbin
110 $(CP
) $(WRKINST
)/sbin
/fdisk
$(IDIR_FDISK
)/usr
/sbin
113 $(INSTALL_DIR
) $(IDIR_AGETTY
)/sbin
114 $(CP
) $(WRKINST
)/sbin
/agetty
$(IDIR_AGETTY
)/sbin
117 $(INSTALL_DIR
) $(IDIR_CFDISK
)/usr
/sbin
118 $(CP
) $(WRKINST
)/sbin
/cfdisk
$(IDIR_FDISK
)/usr
/sbin
121 $(INSTALL_DIR
) $(IDIR_SFDISK
)/usr
/sbin
122 $(CP
) $(WRKINST
)/sbin
/sfdisk
$(IDIR_SFDISK
)/usr
/sbin
125 $(INSTALL_DIR
) $(IDIR_LOSETUP
)/usr
/sbin
126 $(CP
) $(WRKINST
)/sbin
/losetup
$(IDIR_LOSETUP
)/usr
/sbin
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
134 $(INSTALL_DIR
) $(IDIR_MKFS
)/usr
/sbin
135 $(INSTALL_BIN
) $(WRKBUILD
)/mkfs
$(IDIR_MKFS
)/usr
/sbin
138 $(INSTALL_DIR
) $(IDIR_MOUNT
)/bin
139 $(INSTALL_BIN
) $(WRKINST
)/usr
/bin
/{u
,}mount
$(IDIR_MOUNT
)/bin
142 $(INSTALL_DIR
) $(IDIR_MCOOKIE
)/usr
/bin
143 $(INSTALL_BIN
) $(WRKINST
)/usr
/bin
/mcookie
$(IDIR_MCOOKIE
)/usr
/bin
146 $(INSTALL_DIR
) $(IDIR_LIBUUID
)/usr
/lib
147 $(CP
) $(WRKINST
)/lib
/libuuid.so
* $(IDIR_LIBUUID
)/usr
/lib
150 $(INSTALL_DIR
) $(IDIR_LIBBLKID
)/usr
/lib
151 $(CP
) $(WRKINST
)/lib
/libblkid.so
* $(IDIR_LIBBLKID
)/usr
/lib
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
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