PKGBUILDs/extra/rdma-core/PKGBUILD

121 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"
2024-10-10 17:01:08 +00:00
pkgver=54.0
2024-06-09 01:16:59 +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=(
2024-05-24 22:41:47 +00:00
bash
2024-04-27 16:06:13 +00:00
glibc
libnl
perl
systemd-libs
)
makedepends=(
cmake
2024-05-24 22:41:47 +00:00
cython
2024-04-27 16:06:13 +00:00
git
libdrm
ninja
python
python-docutils
systemd
valgrind
)
2024-05-24 22:41:47 +00:00
optdepends=(
'python: for the Python API (pyverbs)'
)
2024-04-27 16:06:13 +00:00
_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-10-10 17:01:08 +00:00
sha512sums=('00683439388ff393826c5afd49fd80b49a5d6d830d1736eceddf47b5f6faf8162bb82bbe5de05a37bf5358da794615a6fd14410a2bc14aa501c92124be25007f')
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
}