Files
LFS-PKGBUILDs/lfs/coreutils-9.6.PKGBUILD

50 lines
1.3 KiB
Plaintext

pkgname=coreutils
pkgver=9.6
pkgdesc='The basic file, shell and text manipulation utilities of the GNU operating system'
arch=('x86_64')
license=(
GPL-3.0-or-later
GFDL-1.3-or-later
)
homepage='https://www.gnu.org/software/coreutils/'
sources=("${pkgname}-${pkgver}.tar.xz"
"${pkgname}-${pkgver}-i18n-1.patch"
)
urls=("https://ftp.gnu.org/gnu/${pkgname}/${sources[0]}"
"https://www.linuxfromscratch.org/patches/lfs/12.3/coreutils-9.6-i18n-1.patch"
)
md5sums=("0ed6cc983fe02973bc98803155cc1733"
"6aee45dd3e05b7658971c321d92f44b7"
)
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
patch -Np1 -i ${distdir}/${sources[1]}
}
src_build() {
autoreconf -fv
automake -af
FORCE_UNSAFE_CONFIGURE=1 ./configure \
--prefix=/usr \
--enable-no-install-program=kill,uptime
make
}
src_check() {
make NON_ROOT_USERNAME=leaf check-root
# non-root test
chown -R leaf .
su leaf -c "PATH=$PATH make -k RUN_EXPENSIVE_TESTS=yes check" \
< /dev/null
}
src_install() {
make DESTDIR=${pkgdir} install
install -d -m 755 ${pkgdir}/usr/sbin/
mv -v ${pkgdir}/usr/bin/chroot ${pkgdir}/usr/sbin
install -d -m 755 ${pkgdir}/usr/share/man/man8/
mv -v ${pkgdir}/usr/share/man/man1/chroot.1 ${pkgdir}/usr/share/man/man8/chroot.8
sed -i 's/"1"/"8"/' ${pkgdir}/usr/share/man/man8/chroot.8
}