summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Ellison2018-09-25 16:49:19 -0400
committerMatt Ellison2018-09-25 16:49:19 -0400
commit4ba194d4a6ad4914f31f9987ba81c3e5fab759dc (patch)
tree7f9fd0aa7add24646ae7fbbe29f8dbe2e1e833ec
downloadaur-4ba194d4a6ad4914f31f9987ba81c3e5fab759dc.tar.gz
Initial Commit: 18.07.1-1
-rw-r--r--.SRCINFO25
-rw-r--r--PKGBUILD81
-rw-r--r--nasmlib.patch13
-rw-r--r--vpp.sysusers2
4 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..c8aedac41726
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = vpp
+ pkgdesc = FD.io Vector Packet Processing
+ pkgver = 18.07.1
+ pkgrel = 1
+ url = https://fd.io/
+ arch = x86_64
+ license = Apache
+ makedepends = patchelf
+ depends = glibc
+ depends = gcc-libs
+ depends = openssl
+ depends = mbedtls
+ depends = numactl
+ depends = python2
+ depends = python2-ply
+ provides = vpp
+ source = git+https://gerrit.fd.io/r/vpp#tag=v18.07.1
+ source = nasmlib.patch
+ source = vpp.sysusers
+ sha256sums = SKIP
+ sha256sums = 832ce99c89109f800eeec911a6a6a7a695cea140d3fe643ddfb32d8a5834325f
+ sha256sums = 5e8a0d05f715816689479c9050bf0505c7a64252d53d16c5d5df5f4787e4295b
+
+pkgname = vpp
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..e68811c31b0b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,81 @@
+# Maintainer: Matthew Ellison <matt(at)arroyo(dot)io>
+
+pkgname=vpp
+pkgver=18.07.1
+pkgrel=1
+pkgdesc="FD.io Vector Packet Processing"
+arch=('x86_64')
+url="https://fd.io/"
+license=('Apache')
+depends=('glibc' 'gcc-libs' 'openssl' 'mbedtls' 'numactl' 'python2' 'python2-ply')
+makedepends=('patchelf')
+provides=("${pkgname}")
+source=("git+https://gerrit.fd.io/r/vpp#tag=v${pkgver}"
+ "nasmlib.patch"
+ "vpp.sysusers")
+sha256sums=('SKIP'
+ '832ce99c89109f800eeec911a6a6a7a695cea140d3fe643ddfb32d8a5834325f'
+ '5e8a0d05f715816689479c9050bf0505c7a64252d53d16c5d5df5f4787e4295b')
+
+prepare() {
+
+ # (1) Change Python Scripts to Use Python2
+ find ${srcdir} -type f -iname \*.py -exec \
+ sed -i 's|#!/usr/bin/env python$|#!/usr/bin/env python2|g' {} +
+
+ # (2) Run Initial Build (which will fail)
+ # This forces DPDK to download dependencies
+ # A quick pass did not reveal a clean make target for this.
+ cd ${srcdir}/${pkgname}
+ make build-release || \
+ echo "Failure Caught, Patching" && \
+ patch -Np0 -i ${srcdir}/nasmlib.patch
+
+}
+
+build() {
+ # (1) Build Release
+ # Currently install into "fake" directory
+ # since there is no clean install target.
+ cd ${srcdir}/${pkgname}
+ mkdir -p ${srcdir}/build
+ make DESTDIR=${srcdir}/build build-release
+}
+
+package() {
+ # (1) Find the Actual Install Root
+ # Currently DESTDIR installs the ABSOLUTE path.
+ root=$(dirname $(dirname $(find ${srcdir}/build -iname vpp -type f -executable)))
+ cd $root
+
+ # (2) Install VPP
+ #
+ mkdir ${pkgdir}/usr
+ cp -pr bin ${pkgdir}/usr/bin
+ cp -pr include ${pkgdir}/usr/include
+ cp -pr lib64 ${pkgdir}/usr/lib
+ cp -pr share ${pkgdir}/usr/share
+
+ # (3) Fix RPATH
+ #
+ cd ${pkgdir}/usr
+
+ for file in $(find . -type f -executable); do
+ if file $file | grep -qi elf; then
+ patchelf --shrink-rpath $file
+ fi
+ done
+
+ # (4) Install Auxillary Files
+ #
+ mkdir -p ${pkgdir}/usr/lib/systemd/system
+ cp -pr ${srcdir}/${pkgname}/build-root/deb/debian/vpp.service ${pkgdir}/usr/lib/systemd/system
+
+ mkdir -p ${pkgdir}/etc/vpp
+ cp -pr ${srcdir}/${pkgname}/src/vpp/conf/startup.conf ${pkgdir}/etc/vpp
+
+ install -Dm644 "${srcdir}/${pkgname}.sysusers" \
+ "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
+}
+
+
diff --git a/nasmlib.patch b/nasmlib.patch
new file mode 100644
index 000000000000..d8b81c255e7a
--- /dev/null
+++ b/nasmlib.patch
@@ -0,0 +1,13 @@
+--- ./build-root/build-vpp-native/dpdk/nasm-2.13.01/include/nasmlib.h.orig 2018-09-25 12:47:52.806000016 -0400
++++ ./build-root/build-vpp-native/dpdk/nasm-2.13.01/include/nasmlib.h 2018-09-25 12:48:25.503037231 -0400
+@@ -188,10 +188,8 @@
+ int64_t readstrnum(char *str, int length, bool *warn);
+
+ /*
+- * seg_init: Initialise the segment-number allocator.
+ * seg_alloc: allocate a hitherto unused segment number.
+ */
+-void pure_func seg_init(void);
+ int32_t pure_func seg_alloc(void);
+
+ /*
diff --git a/vpp.sysusers b/vpp.sysusers
new file mode 100644
index 000000000000..32f39f7f3f47
--- /dev/null
+++ b/vpp.sysusers
@@ -0,0 +1,2 @@
+# create vpp group
+g vpp - -