pkgname=(lvm2 device-mapper) pkgver=2.03.28 pkgrel=1 arch=('x86_64') url="https://sourceware.org/lvm2/" license=('GPL-3.0-or-later') makedepends=('systemd' 'libaio') source=(https://sourceware.org/ftp/lvm2/LVM2.${pkgver}.tgz) sha256sums=(b822baff6b62df36382c717ceba98a2688ebb31bf2b768f3ffa2b6d5e2557242) build() { cd LVM2.${pkgver} local configure_args=( --enable-cmdlib --enable-pkgconfig --enable-udev_sync --with-usrlibdir=/usr/lib64 ${configure_options} ) PATH+=:/usr/sbin ./configure ${configure_args[@]} make } package_device-mapper() { pkgdesc="Device mapper userspace library and tools" url="http://sourceware.org/dm/" depends=('glibc' 'systemd') cd LVM2.${pkgver} make DESTDIR=${pkgdir} install_device-mapper make DESTDIR=${pkgdir} install_systemd_units rm -f ${pkgdir}/usr/lib/systemd/system/{blk-availability.service,lvm*} } package_lvm2() { pkgdesc="Logical Volume Manager 2 utilities" depends=('bash' "device-mapper>=${pkgver}" 'systemd' 'util-linux' 'readline' 'libaio') backup=(etc/lvm/lvm.conf etc/lvm/lvmlocal.conf) options=('!makeflags') cd LVM2.${pkgver} make DESTDIR=${pkgdir} install_lvm2 install -d ${pkgdir}/etc/lvm/{archive,backup} make DESTDIR=${pkgdir} install_systemd_units rm -f ${pkgdir}/usr/lib/systemd/system/dm-* make DESTDIR=${pkgdir} install_systemd_generators sed -e '/locking_dir =/{s/#//;s/var/run/}' \ -i ${pkgdir}/etc/lvm/lvm.conf }