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
:= 6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734
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
/v
$(PKG_VERSION
)/
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 libblkid libuuid libncurses
30 PKGSD_AGETTY
:= getty utility
31 PKGSC_AGETTY
:= sys
/utils
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
+= --exec-prefix
=/usr \
78 --disable-makeinstall-chown \
79 --disable-makeinstall-setuid \
81 --disable-use-tty-group \
86 --disable-schedutils \
92 --disable-switch_root \
105 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
),)
106 CONFIGURE_ARGS
+= --disable-all-programs
109 TARGET_CFLAGS
+= -fPIC
110 FAKE_FLAGS
+= INSTALLSUID
="install -m 4755"
111 HOST_CONFIGURE_ARGS
+= --enable-libuuid \
114 --disable-all-programs \
115 --disable-use-tty-group
118 $(INSTALL_DIR
) $(IDIR_FDISK
)/usr
/sbin
119 $(CP
) $(WRKINST
)/sbin
/fdisk
$(IDIR_FDISK
)/usr
/sbin
122 $(INSTALL_DIR
) $(IDIR_AGETTY
)/sbin
123 $(CP
) $(WRKINST
)/sbin
/agetty
$(IDIR_AGETTY
)/sbin
126 $(INSTALL_DIR
) $(IDIR_CFDISK
)/usr
/sbin
127 $(CP
) $(WRKINST
)/sbin
/cfdisk
$(IDIR_CFDISK
)/usr
/sbin
130 $(INSTALL_DIR
) $(IDIR_SFDISK
)/usr
/sbin
131 $(CP
) $(WRKINST
)/sbin
/sfdisk
$(IDIR_SFDISK
)/usr
/sbin
134 $(INSTALL_DIR
) $(IDIR_LOSETUP
)/usr
/sbin
135 $(CP
) $(WRKINST
)/sbin
/losetup
$(IDIR_LOSETUP
)/usr
/sbin
138 $(INSTALL_DIR
) $(IDIR_SWAP_UTILS
)/usr
/sbin
139 $(CP
) $(WRKINST
)/sbin
/mkswap
$(IDIR_SWAP_UTILS
)/usr
/sbin
140 $(CP
) $(WRKINST
)/sbin
/swap
{on
,off
} $(IDIR_SWAP_UTILS
)/usr
/sbin
143 $(INSTALL_DIR
) $(IDIR_MKFS
)/usr
/sbin
144 $(INSTALL_BIN
) $(WRKBUILD
)/mkfs
$(IDIR_MKFS
)/usr
/sbin
147 $(INSTALL_DIR
) $(IDIR_MOUNT
)/bin
148 $(INSTALL_BIN
) $(WRKINST
)/usr
/bin
/{u
,}mount
$(IDIR_MOUNT
)/bin
151 $(INSTALL_DIR
) $(IDIR_MCOOKIE
)/usr
/bin
152 $(INSTALL_BIN
) $(WRKINST
)/usr
/bin
/mcookie
$(IDIR_MCOOKIE
)/usr
/bin
155 $(INSTALL_DIR
) $(IDIR_LIBUUID
)/usr
/lib
156 $(CP
) $(WRKINST
)/usr
/lib
/libuuid.so
* $(IDIR_LIBUUID
)/usr
/lib
159 $(INSTALL_DIR
) $(IDIR_LIBBLKID
)/usr
/lib
160 $(CP
) $(WRKINST
)/usr
/lib
/libblkid.so
* $(IDIR_LIBBLKID
)/usr
/lib
163 $(INSTALL_DIR
) $(IDIR_LIBFDISK
)/usr
/lib
164 $(CP
) $(WRKINST
)/usr
/lib
/libfdisk.so
* $(IDIR_LIBFDISK
)/usr
/lib
165 $(CP
) $(WRKINST
)/usr
/lib
/libsmartcols.so
* $(IDIR_LIBFDISK
)/usr
/lib
168 $(INSTALL_DIR
) $(IDIR_LIBMOUNT
)/usr
/lib
169 $(CP
) $(WRKINST
)/usr
/lib
/libmount.so
* $(IDIR_LIBMOUNT
)/usr
/lib
171 include $(ADK_TOPDIR
)/mk
/host-bottom.mk
172 include $(ADK_TOPDIR
)/mk
/pkg-bottom.mk