summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Harvey2015-07-17 21:48:57 +0000
committerJames Harvey2015-07-17 21:48:57 +0000
commitd306cec6a3dd17f49259370cdbc40c32d629bcb4 (patch)
treeb9100377afcbe59353826841af6ffdee8d861b97
downloadaur-d306cec6a3dd17f49259370cdbc40c32d629bcb4.tar.gz
Initial import
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD42
-rw-r--r--srptools.service20
3 files changed, 81 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5404145cc1fa
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = srptools
+ pkgdesc = OpenFabrics Alliance InfiniBand SCSI RDMA discovery tools
+ pkgver = 1.0.3
+ pkgrel = 1
+ url = https://www.openfabrics.org/index.php/overview.html
+ arch = x86_64
+ arch = i686
+ license = GPL2
+ license = custom:"Open Fabrics Alliance BSD"
+ depends = libibumad
+ depends = libibverbs
+ depends = bash
+ source = https://www.openfabrics.org/downloads/srptools/srptools-1.0.3.tar.gz
+ source = srptools.service
+ md5sums = f3a463673dcf52c726eb7df2f7c391de
+ md5sums = 82a077aa4c1aa3a243bcccb03042df77
+
+pkgname = srptools
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d93971173b37
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+# Maintainer: James Harvey <jamespharvey20@gmail.com>
+# * No namcap warnings or errors
+
+pkgname=srptools
+pkgver=1.0.3
+pkgrel=1
+pkgdesc='OpenFabrics Alliance InfiniBand SCSI RDMA discovery tools'
+arch=('x86_64' 'i686')
+url=('https://www.openfabrics.org/index.php/overview.html')
+license=('GPL2' 'custom:"Open Fabrics Alliance BSD"')
+depends=('libibumad' 'libibverbs' 'bash')
+source=("https://www.openfabrics.org/downloads/${pkgname}/${pkgname}-${pkgver}.tar.gz"
+ 'srptools.service')
+md5sums=('f3a463673dcf52c726eb7df2f7c391de'
+ '82a077aa4c1aa3a243bcccb03042df77')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ # srp_daemon.sh isn't updated with the sbindir configure option
+ sed -i "s|prog=/usr/sbin/srp_daemon|prog=/usr/bin/srp_daemon|" srp_daemon/srp_daemon.sh
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/share/man
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
+
+ # Convert from init.d to systemd
+ rm -rf ${pkgdir}/etc/init.d
+ install -Dm644 "${srcdir}/srptools.service" "${pkgdir}/etc/systemd/system/srptools.service"
+}
diff --git a/srptools.service b/srptools.service
new file mode 100644
index 000000000000..7e2c4a27a5ca
--- /dev/null
+++ b/srptools.service
@@ -0,0 +1,20 @@
+# Copied from Fedora's srptools-1.0.2-3.fc22.src.rpm
+# Modified to follow Arch layout
+
+[Unit]
+Description=Start or stop the daemon that attaches to SRP devices
+Documentation=file:///etc/rdma.conf file:///etc/srp_daemon.conf
+DefaultDependencies=false
+Conflicts=emergency.target emergency.service
+Requires=rdma.service
+Wants=opensm.service
+After=rdma.service opensm.service
+After=network.target remote-fs-pre.target
+Before=remote-fs.target
+
+[Service]
+Type=simple
+ExecStart=/usr/bin/srp_daemon.sh
+
+[Install]
+WantedBy=remote-fs.target