summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authornfnty2017-03-10 06:34:16 +0100
committernfnty2017-03-10 06:34:16 +0100
commit5a8a254445b47a4bacbf7495d7f6601d384b31da (patch)
treeea61ab1de090a01c2620e4edec470ab52505ead8
downloadaur-5a8a254445b47a4bacbf7495d7f6601d384b31da.tar.gz
Init
-rw-r--r--.SRCINFO69
-rw-r--r--PKGBUILD89
2 files changed, 158 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ada0f25f73b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,69 @@
+pkgbase = rdma-core-git
+ pkgdesc = RDMA core userspace libraries and daemons
+ pkgver = r1
+ pkgrel = 1
+ url = https://github.com/linux-rdma/rdma-core
+ arch = x86_64
+ license = GPL2
+ license = custom:OpenIB.org BSD (MIT variant)
+ makedepends = git
+ makedepends = cmake
+ makedepends = gcc
+ makedepends = libnl
+ makedepends = libsystemd
+ makedepends = pkg-config
+ makedepends = ninja
+ makedepends = bash
+ depends = systemd
+ provides = rdma-core
+ provides = rdma
+ provides = ibacm
+ provides = iwpmd
+ provides = libibcm
+ provides = libibumad
+ provides = libibverbs
+ provides = librdmacm
+ provides = libcxgb3
+ provides = libcxgb4
+ provides = libmlx4
+ provides = libmlx5
+ provides = libmthca
+ provides = libnes
+ provides = libocrdma
+ provides = srptools
+ conflicts = rdma-core
+ conflicts = rdma
+ conflicts = ibacm
+ conflicts = iwpmd
+ conflicts = libibcm
+ conflicts = libibumad
+ conflicts = libibverbs
+ conflicts = librdmacm
+ conflicts = libcxgb3
+ conflicts = libcxgb4
+ conflicts = libmlx4
+ conflicts = libmlx5
+ conflicts = libmthca
+ conflicts = libnes
+ conflicts = libocrdma
+ conflicts = srptools
+ replaces = rdma
+ replaces = ibacm
+ replaces = iwpmd
+ replaces = libibcm
+ replaces = libibumad
+ replaces = libibverbs
+ replaces = librdmacm
+ replaces = libcxgb3
+ replaces = libcxgb4
+ replaces = libmlx4
+ replaces = libmlx5
+ replaces = libmthca
+ replaces = libnes
+ replaces = libocrdma
+ replaces = srptools
+ source = rdma-core::git+https://github.com/linux-rdma/rdma-core.git
+ sha512sums = SKIP
+
+pkgname = rdma-core-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..3b3955fe297
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,89 @@
+#!/usr/bin/bash
+# shellcheck disable=SC2034,SC2154,SC2164
+pkgname=('rdma-core-git')
+_srcname='rdma-core'
+pkgdesc='RDMA core userspace libraries and daemons'
+pkgver='r1'
+pkgrel='1'
+arch=('x86_64')
+url="https://github.com/linux-rdma/${_srcname}"
+license=('GPL2' 'custom:OpenIB.org BSD (MIT variant)')
+
+depends=('systemd')
+makedepends=('git' 'cmake' 'gcc' 'libnl' 'libsystemd' 'pkg-config' 'ninja' 'bash')
+_provides=("${pkgname[0]%-git}" 'rdma' 'ibacm' 'iwpmd' 'libibcm' 'libibumad' 'libibverbs'
+ 'librdmacm' 'libcxgb3' 'libcxgb4' 'libmlx4' 'libmlx5' 'libmthca' 'libnes' 'libocrdma'
+ 'srptools')
+provides=("${_provides[@]}")
+conflicts=("${_provides[@]}")
+replaces=("${_provides[@]:1}")
+
+source=("${_srcname}::git+${url}.git")
+sha512sums=('SKIP')
+
+pkgver() {
+ cd "${srcdir}/${_srcname}"
+
+ printf 'r%s.%s.%s\n' \
+ "$( git rev-list --count 'HEAD' )" \
+ "$( git log --max-count='1' --pretty='format:%ct' )" \
+ "$( git rev-parse --short 'HEAD' )"
+}
+
+prepare() {
+ cd "${srcdir}/${_srcname}"
+
+ 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 "${srcdir}/${_srcname}"
+
+ mkdir build
+ cd build
+ cmake \
+ -GNinja \
+ -DENABLE_VALGRIND=0 \
+ -DCMAKE_BUILD_TYPE='Release' \
+ -DCMAKE_INSTALL_PREFIX='/usr' \
+ -DCMAKE_INSTALL_SBINDIR='bin' \
+ -DCMAKE_INSTALL_LIBDIR='lib' \
+ -DCMAKE_INSTALL_LIBEXECDIR='lib/rdma' \
+ -DCMAKE_INSTALL_SYSCONFDIR='/etc' \
+ ..
+ ninja
+}
+
+package() {
+ cd "${srcdir}/${_srcname}/build"
+ export DESTDIR="${pkgdir}"
+ ninja install
+
+ rm --recursive "${pkgdir}/etc/init.d"
+
+ cd "${srcdir}/${_srcname}/redhat"
+ install -D --mode=0644 rdma.conf "${pkgdir}/etc/rdma/rdma.conf"
+ install -D --mode=0644 rdma.sriov-vfs "${pkgdir}/etc/rdma/sriov-vfs"
+ install -D --mode=0644 rdma.mlx4.conf "${pkgdir}/etc/rdma/mlx4.conf"
+ install -D --mode=0644 rdma.service "${pkgdir}/usr/lib/systemd/system/rdma.service"
+ install -D --mode=0644 rdma.udev-ipoib-naming.rules "${pkgdir}/etc/udev/rules.d/70-persistent-ipoib.rules"
+ install -D --mode=0644 rdma.mlx4.user.modprobe "${pkgdir}/etc/modprobe.d/mlx4.conf"
+ install -D --mode=0755 rdma.modules-setup.sh "${pkgdir}/usr/lib/dracut/modules.d/05rdma/module-setup.sh"
+ install -D --mode=0644 rdma.udev-rules "${pkgdir}/usr/lib/udev/rules.d/98-rdma.rules"
+ install -D --mode=0644 rdma.mlx4.sys.modprobe "${pkgdir}/usr/lib/modprobe.d/libmlx4.conf"
+ install -D --mode=0644 rdma.cxgb3.sys.modprobe "${pkgdir}/usr/lib/modprobe.d/cxgb3.conf"
+ install -D --mode=0644 rdma.cxgb4.sys.modprobe "${pkgdir}/usr/lib/modprobe.d/cxgb4.conf"
+ install -D --mode=0755 rdma.kernel-init "${pkgdir}/usr/lib/rdma/rdma-init-kernel"
+ install -D --mode=0755 rdma.sriov-init "${pkgdir}/usr/lib/rdma/rdma-set-sriov-vf"
+ install -D --mode=0644 rdma.fixup-mtrr.awk "${pkgdir}/usr/lib/rdma/rdma-fixup-mtrr.awk"
+ install -D --mode=0755 rdma.mlx4-setup.sh "${pkgdir}/usr/lib/rdma/mlx4-setup.sh"
+ install -D --mode=0644 ibacm.service "${pkgdir}/usr/lib/systemd/system/ibacm.service"
+ install -D --mode=0644 srp_daemon.service "${pkgdir}/usr/lib/systemd/system/srp_daemon.service"
+
+ cd "${srcdir}/${_srcname}"
+ install -D --mode=0644 COPYING.BSD_MIT "${pkgdir}/usr/share/licenses/${pkgname[0]%-git}/COPYING.BSD_MIT"
+}