67 lines
2.0 KiB
Plaintext
67 lines
2.0 KiB
Plaintext
# Description: Miscellaneous system utilities
|
|
# URL: https://github.com/karelzak/util-linux
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
|
# Depends on: bzip2 eudev file linux-pam readline sqlite3 xz
|
|
|
|
name=util-linux
|
|
version=2.40.1
|
|
release=1
|
|
#source=(https://github.com/util-linux/util-linux/archive/refs/tags/v$version/$name-$version.tar.gz)
|
|
source=(https://www.kernel.org/pub/linux/utils/$name/v${version:0:4}/$name-$version.tar.xz)
|
|
|
|
build() {
|
|
|
|
meson setup $name-$version build \
|
|
--prefix=/usr \
|
|
--bindir=/usr/bin \
|
|
--sbindir=/sbin \
|
|
--libdir=/lib \
|
|
--buildtype=plain \
|
|
--wrap-mode=nodownload \
|
|
-D b_lto=false \
|
|
-D b_pie=true \
|
|
-D nls=disabled \
|
|
-D pamlibdir=/lib/security \
|
|
-D cryptsetup=disabled \
|
|
-D build-chfn-chsh=disabled \
|
|
-D build-login=disabled \
|
|
-D build-su=disabled \
|
|
-D build-sulogin=disabled \
|
|
-D build-nologin=disabled \
|
|
-D build-runuser=disabled \
|
|
-D build-vipw=disabled \
|
|
-D build-raw=disabled \
|
|
-D build-newgrp=disabled \
|
|
-D build-bfs=disabled \
|
|
-D build-minix=disabled
|
|
|
|
|
|
meson compile -C build -j ${JOBS:-1}
|
|
DESTDIR=$PKG meson install -C build
|
|
|
|
rm -r $PKG/usr/share/{doc,locale}
|
|
|
|
install -d $PKG/{bin,usr/sbin,usr/lib,var/lib/lastlog}
|
|
|
|
mv $PKG/usr/bin/{dmesg,findmnt,kill,lsblk,lsfd,more} $PKG/bin
|
|
mv $PKG/usr/bin/{mount,mountpoint,pipesz,umount,wdctl} $PKG/bin
|
|
mv $PKG/sbin/{addpart,delpart,ldattach,partx,readprofile} $PKG/usr/sbin
|
|
mv $PKG/sbin/{resizepart,rfkill,rtcwake,uuidd} $PKG/usr/sbin
|
|
|
|
mv $PKG/lib/pkgconfig $PKG/usr/lib
|
|
|
|
install -d $PKG/usr/share/man/{man1,man5,man8}
|
|
find $name-$version -type f -name '*.1' -exec cp -t $PKG/usr/share/man/man1 '{}' + ;
|
|
find $name-$version -type f -name '*.5' -exec cp -t $PKG/usr/share/man/man5 '{}' + ;
|
|
find $name-$version -type f -name '*.8' -exec cp -t $PKG/usr/share/man/man8 '{}' + ;
|
|
rm $PKG/usr/share/man/man1/{chfn,chsh,login,newgrp,su}.1
|
|
rm $PKG/usr/share/man/man8/{nologin,sulogin,vigr,vipw}.8
|
|
|
|
mv $PKG/lib/*.a $PKG/usr/lib
|
|
cd $PKG/lib
|
|
local LIB
|
|
for LIB in lib*.so; do
|
|
ln -s ../../lib/$(readlink $LIB) $PKG/usr/lib/$LIB && rm $LIB
|
|
done
|
|
}
|