PKGBUILDs/community/rdma-core/PKGBUILD

75 lines
2.6 KiB
Bash
Raw Normal View History

2022-09-18 20:13:57 +00:00
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed makedepend on pandoc
# - cmake with -DNO_MAN_PAGES=1
pkgname=rdma-core
pkgdesc='RDMA core userspace libraries and daemons'
pkgver=42.0
pkgrel=1
arch=('x86_64')
url="https://github.com/linux-rdma/rdma-core"
license=('GPL2' 'custom:OpenIB.org BSD (MIT variant)')
depends=('libnl' 'ethtool' 'perl' 'systemd-libs')
makedepends=('git' 'cmake' 'systemd' 'ninja' 'libdrm' 'cython' 'python' 'python-docutils' 'valgrind')
_provides=('rdma' 'ibacm' 'libiwpm' 'libibcm' 'libibumad' 'libibverbs'
'librdmacm' 'libcxgb3' 'libcxgb4' 'libmlx4' 'libmlx5' 'libmthca' 'libnes' 'libocrdma'
'srptools' 'infiniband-diags' 'libibmad')
provides=("${_provides[@]}")
conflicts=("${_provides[@]}")
replaces=("${_provides[@]}")
backup=(etc/rdma/{rdma.conf,mlx4.conf})
source=("https://github.com/linux-rdma/rdma-core/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('d249d17e115243704d3018cd2924e0b16d10c917c4dcf8240a8107026f5c50c7811ab7ce70e52d3f5493dcbbc156ac75d8cfe90a0259025563150d3a9a3bbd83')
validpgpkeys=('42D25385C1A1C02B8B1B1C6F801BDDB825988F64') # nicolas@morey-chaisemartin.com
prepare() {
mkdir -p build
cd rdma-core-$pkgver
find redhat -type f -exec sed --in-place \
--expression='s|/usr/libexec|/usr/lib/rdma|g' \
--expression='s|/usr/sbin|/usr/bin|g' \
--expression='s|/sbin|/usr/bin|g' \
'{}' '+'
}
build() {
cd build
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_RUNDIR=/run \
-DCMAKE_INSTALL_SBINDIR=/usr/bin \
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
-DCMAKE_INSTALL_LIBEXECDIR=/usr/lib/rdma \
-DCMAKE_INSTALL_SYSCONFDIR=/etc \
-DCMAKE_INSTALL_PERLDIR=/usr/share/perl5/vendor_perl \
-DNO_MAN_PAGES=1 \
../rdma-core-$pkgver
ninja
}
check() {
cd rdma-core-$pkgver
PYTHONPATH="$srcdir/build/python" tests/run_tests.py
}
package() {
cd build
DESTDIR="$pkgdir" ninja install
rm -vr "$pkgdir"/etc/init.d
cd "$srcdir"/rdma-core-$pkgver/redhat
install -D --mode=0644 rdma.conf "$pkgdir"/etc/rdma/rdma.conf
install -D --mode=0755 rdma.mlx4-setup.sh "$pkgdir"/usr/lib/rdma/mlx4-setup.sh
install -D --mode=0644 rdma.mlx4.conf "$pkgdir"/etc/rdma/mlx4.conf
install -D --mode=0644 rdma.mlx4.sys.modprobe "$pkgdir"/usr/lib/modprobe.d/libmlx4.conf
install -D --mode=0755 rdma.modules-setup.sh "$pkgdir"/usr/lib/dracut/modules.d/05rdma/module-setup.sh
cd ..
install -D --mode=0644 COPYING.BSD_MIT "$pkgdir"/usr/share/licenses/$pkgname/COPYING.BSD_MIT
}