PKGBUILDs/extra/rdma-core/PKGBUILD

76 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'
2024-01-06 23:10:17 +00:00
pkgver=49.0
pkgrel=1
2022-09-18 20:13:57 +00:00
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')
2024-01-06 23:10:17 +00:00
makedepends=('git' 'cmake' 'systemd' 'ninja' 'libdrm' 'cython0' 'python' 'python-docutils' 'valgrind')
2022-09-18 20:13:57 +00:00
_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")
2024-01-06 23:10:17 +00:00
sha512sums=('2da35b489d6a82776dceac4b067a7a9f931b6c4737a205f522616fa028c74c10c098195d6843970ffeb22c8b416975bcfcd11d53a60ff855653624673f1d498a')
2022-09-18 20:13:57 +00:00
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' \
'{}' '+'
2024-01-06 23:10:17 +00:00
sed -e 's|"drm"|"libdrm"|' -i CMakeLists.txt # Fix drm include dir
2022-09-18 20:13:57 +00:00
}
build() {
cd build
cmake \
-GNinja \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_RUNDIR=/run \
-DCMAKE_INSTALL_SBINDIR=/usr/bin \
-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
}