PKGBUILDs/extra/rdma-core/PKGBUILD

118 lines
3.4 KiB
Bash
Raw Normal View History

2024-04-27 16:06:13 +00:00
# Maintainer: Jakub Klinkovský <lahwaacz at archlinux dot org>
# Contributor: Felix Yan <felixonmars@archlinux.org>
2022-09-18 20:13:57 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - removed makedepend on pandoc
# - cmake with -DNO_MAN_PAGES=1
pkgname=rdma-core
2024-04-27 16:06:13 +00:00
pkgdesc="RDMA core userspace libraries and daemons"
pkgver=51.0
2024-01-06 23:10:17 +00:00
pkgrel=1
2024-04-27 16:06:13 +00:00
arch=(x86_64)
2022-09-18 20:13:57 +00:00
url="https://github.com/linux-rdma/rdma-core"
2024-04-27 16:06:13 +00:00
license=(
'GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-MIT'
'GPL-2.0-or-later OR LicenseRef-OpenIB.org-BSD-FreeBSD'
'GPL-2.0-or-later OR LicenseRef-Intel-BSD-3-Clause'
'GPL-2.0-or-later OR LicenseRef-PathScale-BSD-Patent-License'
CC0-1.0
MIT
BSD-2-Clause
'CPL-1.0 OR BSD-2-Clause OR GPL-2.0-or-later'
)
depends=(
ethtool
glibc
libnl
perl
systemd-libs
)
makedepends=(
cmake
cython0
git
libdrm
ninja
python
python-docutils
systemd
valgrind
)
_provides=(
ibacm
infiniband-diags
libcxgb3
libcxgb4
libibcm
libibmad
libibumad
libibverbs
libiwpm
libmlx4
libmlx5
libmthca
libnes
libocrdma
librdmacm
rdma
srptools
)
2022-09-18 20:13:57 +00:00
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-04-27 16:06:13 +00:00
sha512sums=('28b01671c5878608e55780a701fc6de07c5369e3c1a64cacbc9ca4681c4e420e9df44bda410adbddda15e92dfde572917b720ea35599b0e97b43703ff5d1ae19')
2022-09-18 20:13:57 +00:00
prepare() {
2024-04-27 16:06:13 +00:00
cd $pkgname-$pkgver
2022-09-18 20:13:57 +00:00
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() {
2024-04-27 16:06:13 +00:00
cmake -B build -S $pkgname-$pkgver -G Ninja \
2022-09-18 20:13:57 +00:00
-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 \
2024-04-27 16:06:13 +00:00
-DNO_MAN_PAGES=1
cmake --build build
2022-09-18 20:13:57 +00:00
}
check() {
2024-04-27 16:06:13 +00:00
cd $pkgname-$pkgver
2022-09-18 20:13:57 +00:00
PYTHONPATH="$srcdir/build/python" tests/run_tests.py
}
package() {
2024-04-27 16:06:13 +00:00
DESTDIR="$pkgdir" cmake --install build
2022-09-18 20:13:57 +00:00
rm -vr "$pkgdir"/etc/init.d
2024-04-27 16:06:13 +00:00
rm -vr "$pkgdir"/usr/share/doc/$pkgname/tests
2022-09-18 20:13:57 +00:00
2024-04-27 16:06:13 +00:00
cd "$srcdir"/$pkgname-$pkgver/redhat
2022-09-18 20:13:57 +00:00
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
2024-04-27 16:06:13 +00:00
cd "$srcdir"/$pkgname-$pkgver
install -vDm 644 COPYING.md -t "$pkgdir"/usr/share/licenses/$pkgname/
install -vDm 644 COPYING.BSD_MIT -t "$pkgdir"/usr/share/licenses/$pkgname/
install -vDm 644 COPYING.BSD_FB -t "$pkgdir"/usr/share/licenses/$pkgname/
install -vDm 644 COPYING.GPL2 -t "$pkgdir"/usr/share/licenses/$pkgname/
install -vDm 644 providers/ipathverbs/COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/providers/ipathverbs/
install -vDm 644 ccan/LICENSE.CCO -t "$pkgdir"/usr/share/licenses/$pkgname/ccan/
install -vDm 644 ccan/LICENSE.MIT -t "$pkgdir"/usr/share/licenses/$pkgname/ccan/
2022-09-18 20:13:57 +00:00
}