# Maintainer: Felix Yan # ALARM: Kevin Mihelich # - removed makedepend on pandoc # - cmake with -DNO_MAN_PAGES=1 pkgname=rdma-core pkgdesc='RDMA core userspace libraries and daemons' pkgver=42.1 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=('06dea2b52ff41a4a5775f77a13f49d686220a1c192f083ccadc5ac072a11ab1fcaff7844c0d577d33e0aa8fcf287249668dd07d6a994a3a64840d025bcd70930') 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 }