2018-07-16 20:45:36 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
2018-09-12 23:16:56 +01:00
|
|
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
2013-08-01 16:20:16 +02:00
|
|
|
|
|
|
|
|
PKG_NAME="util-linux"
|
2023-12-06 12:55:32 +00:00
|
|
|
PKG_VERSION="2.39.3"
|
|
|
|
|
PKG_SHA256="7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f"
|
2013-08-01 16:20:16 +02:00
|
|
|
PKG_LICENSE="GPL"
|
2021-02-13 12:38:01 +00:00
|
|
|
PKG_URL="https://www.kernel.org/pub/linux/utils/util-linux/v$(get_pkg_version_maj_min)/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
2019-10-28 01:47:47 +00:00
|
|
|
PKG_DEPENDS_HOST="ccache:host autoconf:host automake:host intltool:host libtool:host pkg-config:host"
|
2014-01-30 14:31:10 +01:00
|
|
|
PKG_DEPENDS_TARGET="toolchain"
|
2014-06-07 00:23:49 +02:00
|
|
|
PKG_DEPENDS_INIT="toolchain"
|
2018-10-22 15:06:12 +02:00
|
|
|
PKG_LONGDESC="A large variety of low-level system utilities that are necessary for a Linux system to function."
|
2017-10-24 23:23:02 +02:00
|
|
|
PKG_TOOLCHAIN="autotools"
|
2018-09-12 23:16:56 +01:00
|
|
|
PKG_BUILD_FLAGS="+pic:host"
|
2013-08-01 16:20:16 +02:00
|
|
|
|
2015-09-10 16:45:24 +02:00
|
|
|
UTILLINUX_CONFIG_DEFAULT="--disable-gtk-doc \
|
|
|
|
|
--disable-nls \
|
|
|
|
|
--disable-rpath \
|
|
|
|
|
--enable-tls \
|
|
|
|
|
--enable-chsh-only-listed \
|
|
|
|
|
--disable-bash-completion \
|
|
|
|
|
--disable-colors-default \
|
|
|
|
|
--disable-pylibmount \
|
|
|
|
|
--disable-pg-bell \
|
|
|
|
|
--disable-use-tty-group \
|
|
|
|
|
--disable-makeinstall-chown \
|
|
|
|
|
--disable-makeinstall-setuid \
|
|
|
|
|
--with-gnu-ld \
|
|
|
|
|
--without-selinux \
|
|
|
|
|
--without-audit \
|
|
|
|
|
--without-udev \
|
|
|
|
|
--without-ncurses \
|
2017-11-20 02:50:56 +00:00
|
|
|
--without-ncursesw \
|
2015-09-10 16:45:24 +02:00
|
|
|
--without-readline \
|
|
|
|
|
--without-slang \
|
|
|
|
|
--without-tinfo \
|
|
|
|
|
--without-utempter \
|
|
|
|
|
--without-util \
|
|
|
|
|
--without-libz \
|
|
|
|
|
--without-user \
|
|
|
|
|
--without-systemd \
|
|
|
|
|
--without-smack \
|
|
|
|
|
--without-python \
|
|
|
|
|
--without-systemdsystemunitdir"
|
|
|
|
|
|
2021-01-19 19:34:16 +00:00
|
|
|
PKG_CONFIGURE_OPTS_TARGET="${UTILLINUX_CONFIG_DEFAULT} \
|
2022-05-27 14:24:01 +00:00
|
|
|
--disable-all-programs \
|
2013-08-01 16:20:16 +02:00
|
|
|
--enable-libuuid \
|
|
|
|
|
--enable-libblkid \
|
|
|
|
|
--enable-libmount \
|
2014-12-15 02:44:35 +01:00
|
|
|
--enable-libsmartcols \
|
|
|
|
|
--enable-losetup \
|
2013-08-01 16:20:16 +02:00
|
|
|
--enable-fsck \
|
2018-01-04 19:19:44 +01:00
|
|
|
--enable-fstrim \
|
2019-03-28 10:23:06 +00:00
|
|
|
--enable-blkid \
|
2022-03-19 09:37:01 +00:00
|
|
|
--enable-lscpu \
|
2024-01-08 12:04:17 +01:00
|
|
|
--enable-lsfd \
|
|
|
|
|
--enable-mount"
|
2013-08-01 16:20:16 +02:00
|
|
|
|
2021-01-19 19:34:16 +00:00
|
|
|
if [ "${SWAP_SUPPORT}" = "yes" ]; then
|
|
|
|
|
PKG_CONFIGURE_OPTS_TARGET+=" --enable-swapon"
|
2015-09-10 16:45:24 +02:00
|
|
|
fi
|
2014-07-26 14:56:35 +02:00
|
|
|
|
2015-09-12 10:47:33 +02:00
|
|
|
PKG_CONFIGURE_OPTS_HOST="--enable-static \
|
|
|
|
|
--disable-shared \
|
2022-05-13 14:13:19 +00:00
|
|
|
--enable-all-programs \
|
2021-01-19 19:34:16 +00:00
|
|
|
${UTILLINUX_CONFIG_DEFAULT} \
|
2015-09-12 10:47:33 +02:00
|
|
|
--enable-uuidgen \
|
|
|
|
|
--enable-libuuid"
|
2015-09-10 16:45:24 +02:00
|
|
|
|
2021-01-19 19:34:16 +00:00
|
|
|
PKG_CONFIGURE_OPTS_INIT="${UTILLINUX_CONFIG_DEFAULT} \
|
2022-05-27 14:24:01 +00:00
|
|
|
--disable-all-programs \
|
2015-09-10 16:45:24 +02:00
|
|
|
--enable-libblkid \
|
|
|
|
|
--enable-libmount \
|
|
|
|
|
--enable-fsck"
|
2015-09-12 10:47:33 +02:00
|
|
|
|
2021-01-19 19:34:16 +00:00
|
|
|
if [ "${INITRAMFS_PARTED_SUPPORT}" = "yes" ]; then
|
|
|
|
|
PKG_CONFIGURE_OPTS_INIT+=" --enable-mkfs --enable-libuuid"
|
2015-09-10 16:45:24 +02:00
|
|
|
fi
|
2013-09-16 22:14:55 +03:00
|
|
|
|
2013-08-01 16:20:16 +02:00
|
|
|
post_makeinstall_target() {
|
2021-01-19 19:34:16 +00:00
|
|
|
if [ "${SWAP_SUPPORT}" = "yes" ]; then
|
|
|
|
|
mkdir -p ${INSTALL}/usr/lib/libreelec
|
|
|
|
|
cp -PR ${PKG_DIR}/scripts/mount-swap ${INSTALL}/usr/lib/libreelec
|
2013-08-01 16:20:16 +02:00
|
|
|
|
2021-01-19 19:34:16 +00:00
|
|
|
mkdir -p ${INSTALL}/etc
|
|
|
|
|
cat ${PKG_DIR}/config/swap.conf | \
|
|
|
|
|
sed -e "s,@SWAPFILESIZE@,${SWAPFILESIZE},g" \
|
|
|
|
|
-e "s,@SWAP_ENABLED_DEFAULT@,${SWAP_ENABLED_DEFAULT},g" \
|
|
|
|
|
> ${INSTALL}/etc/swap.conf
|
2013-08-01 16:20:16 +02:00
|
|
|
fi
|
|
|
|
|
}
|
2013-08-16 15:21:59 +02:00
|
|
|
|
|
|
|
|
post_install () {
|
2021-01-19 19:34:16 +00:00
|
|
|
if [ "${SWAP_SUPPORT}" = "yes" ]; then
|
2013-08-16 15:21:59 +02:00
|
|
|
enable_service swap.service
|
|
|
|
|
fi
|
|
|
|
|
}
|