core/util-linux/PKGBUILD

83 lines
2.3 KiB
Bash
Raw Normal View History

#
pkgname=util-linux
pkgver=2.27
2015-05-26 06:14:26 +08:00
pkgrel=1
2010-03-13 23:25:19 +08:00
pkgdesc="Miscellaneous system utilities for Linux"
url="https://www.kernel.org/pub/linux/utils/util-linux/"
arch=('x86_64')
2010-03-13 23:25:19 +08:00
groups=('base')
depends=('pam' 'shadow' 'coreutils' 'glibc')
2014-08-27 05:18:33 +08:00
makedepends=('systemd' 'python3')
conflicts=('util-linux-ng' 'eject')
provides=("util-linux-ng=${pkgver}" 'eject')
2010-03-13 23:25:19 +08:00
license=('GPL2')
2014-08-27 05:18:33 +08:00
options=('strip' 'debug')
validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak
source=("https://www.kernel.org/pub/linux/utils/util-linux/v2.27/$pkgname-$pkgver.tar."{xz,sign}
"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'
2015-05-26 06:14:26 +08:00
'SKIP'
'f9e06605db9107b9c4bb1c48059fe18e'
'4368b3f98abd8a32662e094c54e7f9b1'
'a31374fef2cba0ca34dfc7078e2969e4'
'fa85e5cce5d723275b14365ba71a8aad')
2010-03-13 23:25:19 +08:00
2014-08-27 05:18:33 +08:00
prepare() {
cd "$pkgname-$pkgver"
patch -Np1 <../0001-libmount-monitor-don-t-check-for-regular-mtab.patch
2014-08-27 05:18:33 +08:00
}
2014-02-26 07:39:59 +08:00
2010-03-13 23:25:19 +08:00
build() {
2014-08-27 05:18:33 +08:00
cd "$pkgname-$pkgver"
2011-12-25 07:26:57 +08:00
./configure --prefix=/usr \
--libdir=/usr/lib \
2014-09-27 12:12:32 +08:00
--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 \
2014-09-15 23:20:03 +08:00
--enable-write \
--enable-mesg \
2015-05-26 06:14:26 +08:00
--enable-libmount-force-mountinfo \
2014-08-27 05:18:33 +08:00
--with-python=3
2011-12-25 07:26:57 +08:00
make
}
# only bc test fails, leaving dep to test the rest
#check() {
# make -C "${pkgname}-${pkgver}" check
#}
package() {
2014-08-27 05:18:33 +08:00
cd "$pkgname-$pkgver"
2011-12-25 07:26:57 +08:00
make DESTDIR="${pkgdir}" install
cd "${pkgdir}"
chmod 4755 "$pkgdir"/usr/bin/{newgrp,ch{sh,fn}}
2014-09-15 23:20:03 +08:00
# 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"
2010-03-13 23:25:19 +08:00
}