summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrien Prost-Boucle2015-08-12 20:00:57 +0200
committerAdrien Prost-Boucle2015-08-12 20:00:57 +0200
commit64c9361035cb178c40349809451188270a31d0fc (patch)
tree05a4dac29d4101c732a04dc6ea10a588253e82dc
downloadaur-64c9361035cb178c40349809451188270a31d0fc.tar.gz
Initial commit
-rw-r--r--.SRCINFO19
-rw-r--r--99-riffa.rules1
-rw-r--r--PKGBUILD60
-rw-r--r--riffa.install19
4 files changed, 99 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..c676e2119c7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = riffa-git
+ pkgdesc = RIFFA: A Reusable Integration Framework For FPGA Accelerators
+ pkgver = 2.2.0
+ pkgrel = 1
+ url = http://riffa.ucsd.edu/
+ install = riffa.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = linux-headers
+ source = git://github.com/drichmond/riffa.git
+ source = riffa.install
+ source = 99-riffa.rules
+ md5sums = SKIP
+ md5sums = SKIP
+ md5sums = d37355781ef46d1f4aa21cd169964f08
+
+pkgname = riffa-git
+
diff --git a/99-riffa.rules b/99-riffa.rules
new file mode 100644
index 00000000000..81fb507045e
--- /dev/null
+++ b/99-riffa.rules
@@ -0,0 +1 @@
+KERNEL=="riffa", MODE="777", GROUP="root"
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..9c06f8be114
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Adrien Prost-Boucle <adrien.prost-boucle@laposte.net>
+
+pkgname=riffa-git
+pkgver=2.2.0
+pkgrel=1
+arch=('i686' 'x86_64')
+pkgdesc='RIFFA: A Reusable Integration Framework For FPGA Accelerators'
+url='http://riffa.ucsd.edu/'
+license=('custom')
+
+makedepends=('linux-headers')
+install='riffa.install'
+
+source=(
+ "git://github.com/drichmond/riffa.git"
+ 'riffa.install'
+ '99-riffa.rules'
+)
+# Note: No check for riffa.install because it is modified by the package() function.
+md5sums=(
+ 'SKIP'
+ 'SKIP'
+ 'd37355781ef46d1f4aa21cd169964f08'
+)
+
+
+build() {
+ cd "${srcdir}/riffa/driver/linux"
+
+ # Note: Use the debug target to have debug messages in system log at runtime.
+ # Warning from RIFFA 2.2.0 documentation:
+ # However they pollute your system log and incur some overhead.
+ # So you may want to install the non-debug version after you’ve completed development.
+
+ make
+ #make debug
+
+}
+
+package() {
+ # Note: Can't use the riffa provided install commands because all is hardcoded for Red Hat / Debian
+
+ # Important: If the versions of your packages linux and linux-header must match, manualy set this
+ _extramodules=extramodules-`uname -r | sed -e 's/\([[:digit:]]*\).\([[:digit:]]\).*/\1.\2/g'`-ARCH
+ sed --follow-symlinks -i -e 's/^\([[:blank:]]*EXTRAMODULES=\).*$/\1'"$_extramodules"'/g' "${srcdir}/riffa.install"
+
+ install -Dm0755 "${srcdir}/99-riffa.rules" "${pkgdir}/etc/udev/rules.d/99-riffa.rules"
+
+ cd "${srcdir}/riffa/driver/linux"
+
+ install -D riffa.ko "${pkgdir}/usr/lib/modules/$_extramodules/riffa.ko"
+
+ install -Dm0644 riffa.h "${pkgdir}/usr/include/riffa.h"
+ install -Dm0644 riffa_driver.h "${pkgdir}/usr/include/riffa_driver.h"
+
+ install -Dm0755 libriffa.so.1.0 "${pkgdir}/usr/lib/libriffa.so.1.0"
+ ln -sf "/usr/lib/libriffa.so.1.0" "${pkgdir}/usr/lib/libriffa.so.1"
+ ln -sf "/usr/lib/libriffa.so.1.0" "${pkgdir}/usr/lib/libriffa.so"
+
+}
diff --git a/riffa.install b/riffa.install
new file mode 100644
index 00000000000..13fd69c616c
--- /dev/null
+++ b/riffa.install
@@ -0,0 +1,19 @@
+
+_depmod() {
+ EXTRAMODULES=extramodules-4.1-ARCH
+ depmod $(cat /usr/lib/modules/$EXTRAMODULES/version)
+}
+
+post_install() {
+ echo '==> You must load the riffa kernel module before using Riffa: # modprobe riffa'
+ _depmod
+}
+
+post_upgrade() {
+ _depmod
+ echo '==> Manually reload the riffa kernel module to use the new version.'
+}
+
+post_remove() {
+ _depmod
+}