pkgname=util-linux pkgver=2.40.2 _pkgver=2.40 _commit=205e88e51c11d039cd80c9f1104bee5555a4ddaa pkgrel=1 pkgdesc="Miscellaneous system utilities for Linux" url="http://www.kernel.org/pub/linux/utils/util-linux/" arch=('x86_64') groups=('base') depends=('pam' 'shadow' 'coreutils' 'glibc' 'libxcrypt') makedepends=('asciidoctor' 'bc' 'systemd' 'python3' 'sqlite') conflicts=('util-linux-ng' 'eject' 'rfkill') provides=("util-linux-ng=${pkgver}" 'eject' 'rfkill') license=('GPL2') options=('!libtool') source=("https://www.kernel.org/pub/linux/utils/util-linux/v${_pkgver}/${pkgname}-${pkgver}.tar.xz" #source=("https://github.com/util-linux/util-linux/archive/${_commit}.zip" 'uuidd.tmpfiles' 'pam-login' 'pam-common' 'pam-su' 'system-auth' 'system-local-login' 'system-login' 'system-remote-login' 'system-services' "https://github.com/karelzak/util-linux/commit/fa3fface0f83dbf186f046210700473da7a4800b.diff" "https://github.com/karelzak/util-linux/commit/ac762ed71f982468f4c83291158e97cf86281beb.diff") backup=(etc/pam.d/chfn etc/pam.d/chsh etc/pam.d/login etc/pam.d/su etc/pam.d/su-l) install=util-linux.install sha256sums=('d78b37a66f5922d70edf3bdfb01a6b33d34ed3c3cafd6628203b2a2b67c8e8b3' '5de0aadbbeb1ebb0776f3c550111fe045dfdf3571c574f415c62ca1966c49616' '993a3096c2b113e6800f2abbd5d4233ebf1a97eef423990d3187d665d3490b92' 'fc6807842f92e9d3f792d6b64a0d5aad87995a279153ab228b1b2a64d9f32f20' '51eac9c2a2f51ad3982bba35de9aac5510f1eeff432d2d63c6362e45d620afc0' '1c80c37fc063c703fadf3a8e5a6fb3ef7ddc24a5869cd7fe519708d082e414cf' '005736b9bd650ff5e5d82a7e288853776d5bb8c90185d5774c07231c1e1c64a9' '803ebb0e37763d2653ead76db115d76dcc30b050fce069be195a05b3ca53d304' '005736b9bd650ff5e5d82a7e288853776d5bb8c90185d5774c07231c1e1c64a9' '6eb1acdd3fa9f71a7f93fbd529be57ea65bcafc6e3a98a06af4d88013fc6a567' '941b2d892aabaa54435af6de6ea905e89d93d2a1004b2ffc8e4f135fda60ed5b' '54e66afaea0bf13a7a622bf9f3dbb8409a5a4171b3869a108acc5dccdea58d91') build() { cd ${pkgname}-${pkgver} #fix sfdisk failures with extended partitions #patch -p1 -i ${srcdir}/fa3fface0f83dbf186f046210700473da7a4800b.diff #patch -p1 -i ${srcdir}/ac762ed71f982468f4c83291158e97cf86281beb.diff ./autogen.sh ./configure --prefix=/usr \ --libdir=/usr/lib \ --localstatedir=/run \ --enable-fs-paths-extra=/usr/bin:/usr/sbin \ --enable-write \ --disable-raw \ --enable-vipw \ --enable-newgrp \ --enable-chfn-chsh \ --enable-mesg \ --with-python=3 #--enable-poman new feature with 2.38, po4a is needed #--enable-libmount-force-mountinfo systemd 230 need? make } check() { # 1 fail column: column/invalid-multibyte leaving dep to test the rest 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 -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 # Pam helper files install -m644 ${srcdir}/system-auth ${pkgdir}/etc/pam.d/system-auth install -m644 ${srcdir}/system-local-login ${pkgdir}/etc/pam.d/system-local-login install -m644 ${srcdir}/system-login ${pkgdir}/etc/pam.d/system-login install -m644 ${srcdir}/system-remote-login ${pkgdir}/etc/pam.d/system-remote-login install -m644 ${srcdir}/system-services ${pkgdir}/etc/pam.d/system-services install -Dm644 ${srcdir}/uuidd.tmpfiles ${pkgdir}/usr/lib/tmpfiles.d/uuidd.conf # fdisk fix for live-mode, until all moves to /usr ln -s /sbin/fdisk ${pkgdir}/usr/bin/fdisk # udisks2 fixes until all moves to /usr ln -s /bin/mount ${pkgdir}/usr/bin/mount ln -s /bin/umount ${pkgdir}/usr/bin/umount }