mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 03:14:37 +08:00
80 lines
2.3 KiB
Bash
80 lines
2.3 KiB
Bash
pkgname=util-linux
|
|
pkgver=2.27
|
|
pkgrel=2
|
|
pkgdesc="Miscellaneous system utilities for Linux"
|
|
url="https://www.kernel.org/pub/linux/utils/util-linux/"
|
|
arch=('x86_64')
|
|
groups=('base')
|
|
depends=('pam' 'shadow' 'coreutils' 'glibc' 'python3')
|
|
makedepends=('systemd')
|
|
conflicts=('util-linux-ng' 'eject')
|
|
provides=("util-linux-ng=${pkgver}" 'eject')
|
|
license=('GPL2')
|
|
options=('strip' 'debug')
|
|
validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak
|
|
source=("https://www.kernel.org/pub/linux/utils/util-linux/v2.27/$pkgname-$pkgver.tar.xz"
|
|
"0001-libmount-monitor-don-t-check-for-regular-mtab.patch"
|
|
pam-{login,common,su})
|
|
backup=(etc/pam.d/chfn
|
|
etc/pam.d/chsh
|
|
etc/pam.d/login
|
|
etc/pam.d/su
|
|
etc/pam.d/su-l)
|
|
md5sums=('5b06bbda9309624ee7add15bc8d8ca22'
|
|
'f9e06605db9107b9c4bb1c48059fe18e'
|
|
'4368b3f98abd8a32662e094c54e7f9b1'
|
|
'a31374fef2cba0ca34dfc7078e2969e4'
|
|
'fa85e5cce5d723275b14365ba71a8aad')
|
|
|
|
prepare() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
patch -Np1 <../0001-libmount-monitor-don-t-check-for-regular-mtab.patch
|
|
}
|
|
|
|
build() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
./configure --prefix=/usr \
|
|
--libdir=/usr/lib \
|
|
--bindir=/usr/bin \
|
|
--sbindir=/usr/sbin \
|
|
--localstatedir=/run \
|
|
--enable-fs-paths-extra=/usr/bin:/usr/sbin \
|
|
--enable-raw \
|
|
--enable-vipw \
|
|
--enable-newgrp \
|
|
--enable-chfn-chsh \
|
|
--enable-write \
|
|
--enable-mesg \
|
|
--enable-libmount-force-mountinfo \
|
|
--with-python=3
|
|
|
|
make
|
|
}
|
|
|
|
# only bc test fails, leaving dep to test the rest
|
|
#check() {
|
|
# make -C "${pkgname}-${pkgver}" check
|
|
#}
|
|
|
|
package() {
|
|
cd "$pkgname-$pkgver"
|
|
|
|
make DESTDIR="${pkgdir}" install
|
|
|
|
cd "${pkgdir}"
|
|
|
|
chmod 4755 "$pkgdir"/usr/bin/{newgrp,ch{sh,fn}}
|
|
|
|
# install PAM files for login-utils
|
|
install -Dm644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chfn"
|
|
install -m644 "$srcdir/pam-common" "$pkgdir/etc/pam.d/chsh"
|
|
install -m644 "$srcdir/pam-login" "$pkgdir/etc/pam.d/login"
|
|
install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su"
|
|
install -m644 "$srcdir/pam-su" "${pkgdir}/etc/pam.d/su-l"
|
|
|
|
# TODO(dreisner): offer this upstream?
|
|
sed -i '/ListenStream/ aRuntimeDirectory=uuidd' "$pkgdir/usr/lib/systemd/system/uuidd.socket"
|
|
}
|