mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-10 12:24:37 +08:00
91 lines
2.6 KiB
Bash
91 lines
2.6 KiB
Bash
pkgname=util-linux
|
|
pkgver=2.31
|
|
pkgrel=4
|
|
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' 'ncurses')
|
|
makedepends=('systemd' 'python3')
|
|
optdepends=('python3: python bindings to libmount')
|
|
conflicts=('util-linux-ng' 'eject' 'rfkill')
|
|
provides=("util-linux-ng=${pkgver}" 'eject' 'rfkill')
|
|
replaces=('rfkill')
|
|
license=('GPL2')
|
|
options=('strip' 'debug')
|
|
validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak
|
|
source=("https://www.kernel.org/pub/linux/utils/util-linux/v$pkgver/$pkgname-$pkgver.tar."{xz,sign}
|
|
pam-{login,common,su}
|
|
'util-linux.sysusers')
|
|
backup=(etc/pam.d/chfn
|
|
etc/pam.d/chsh
|
|
etc/pam.d/login
|
|
etc/pam.d/su
|
|
etc/pam.d/su-l)
|
|
md5sums=('5b6821c403c3cc6e7775f74df1882a20'
|
|
'SKIP'
|
|
'4368b3f98abd8a32662e094c54e7f9b1'
|
|
'a31374fef2cba0ca34dfc7078e2969e4'
|
|
'fa85e5cce5d723275b14365ba71a8aad'
|
|
'dfc9904f67ebc54bb347ca3cc430ef2b')
|
|
|
|
validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak
|
|
|
|
#prepare() {
|
|
# cd "$pkgname-$pkgver"
|
|
# for patch in $(ls $srcdir/*.patch); do
|
|
# patch -Np1 -i $patch
|
|
# done
|
|
#}
|
|
|
|
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 \
|
|
--disable-tailf \
|
|
--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"
|
|
|
|
### install systemd-sysusers
|
|
install -Dm644 "$srcdir/util-linux.sysusers" \
|
|
"$pkgdir/usr/lib/sysusers.d/util-linux.conf"
|
|
}
|