summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuka Perkov2016-07-20 23:55:16 +0200
committerLuka Perkov2016-07-20 23:55:16 +0200
commit3f83646632baa90077b67a4ca1a354fa1562456c (patch)
tree997a866407baf7080e085704fc28dc3811460c56
downloadaur-3f83646632baa90077b67a4ca1a354fa1562456c.tar.gz
initial commit
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
-rw-r--r--.SRCINFO27
-rw-r--r--.gitignore5
-rw-r--r--002-json-c-include.patch31
-rw-r--r--PKGBUILD44
4 files changed, 107 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ec158817f701
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = libubox-git
+ pkgdesc = A small utility library developed for OpenWrt containing a event loop, linked lists, blobmsg, stream buffer management, [...]
+ pkgver = r377.d3fa561
+ pkgrel = 1
+ url = http://git.openwrt.org/?p=project/libubox.git
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = ISC BSD-3c
+ makedepends = git
+ makedepends = cmake
+ makedepends = gcc
+ makedepends = make
+ makedepends = patch
+ makedepends = pkg-config
+ depends = json-c
+ depends = lua51
+ provides = libubox
+ conflicts = libubox
+ conflicts = libubox-lua-git
+ source = git://git.openwrt.org/project/libubox.git
+ source = 002-json-c-include.patch
+ md5sums = SKIP
+ md5sums = SKIP
+
+pkgname = libubox-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..56f0c94544a8
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+libubox
+*.tar.gz
+*.tar.xz
+pkg
+src
diff --git a/002-json-c-include.patch b/002-json-c-include.patch
new file mode 100644
index 000000000000..72b50816f0cc
--- /dev/null
+++ b/002-json-c-include.patch
@@ -0,0 +1,31 @@
+--- a/blobmsg_json.c
++++ b/blobmsg_json.c
+@@ -17,11 +17,7 @@
+ #include "blobmsg.h"
+ #include "blobmsg_json.h"
+
+-#ifdef JSONC
+- #include <json.h>
+-#else
+- #include <json/json.h>
+-#endif
++#include <json-c/json.h>
+
+ bool blobmsg_add_object(struct blob_buf *b, json_object *obj)
+ {
+--- a/jshn.c
++++ b/jshn.c
+@@ -13,11 +13,8 @@
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+-#ifdef JSONC
+- #include <json.h>
+-#else
+- #include <json/json.h>
+-#endif
++
++#include <json-c/json.h>
+
+ #include <string.h>
+ #include <stdlib.h>
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..94ad83e92582
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Luka Perkov <luka.perkov@sartura.hr>
+
+pkgname=libubox-git
+_gitname=libubox
+pkgver=r377.d3fa561
+pkgrel=1
+pkgdesc='A small utility library developed for OpenWrt containing a event loop, linked lists, blobmsg, stream buffer management, [...]'
+url='http://git.openwrt.org/?p=project/libubox.git'
+arch=('i686' 'x86_64' 'armv7h')
+license=('ISC BSD-3c')
+depends=('json-c' 'lua51')
+makedepends=('git' 'cmake' 'gcc' 'make' 'patch' 'pkg-config')
+conflicts=('libubox' 'libubox-lua-git')
+provides=('libubox')
+source=('git://git.openwrt.org/project/libubox.git' '002-json-c-include.patch')
+md5sums=('SKIP' 'SKIP')
+
+pkgver() {
+ cd "$srcdir/$_gitname"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd "$srcdir/$_gitname"
+
+ patch -p1 -i "$srcdir/002-json-c-include.patch"
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+
+ cmake CMakeLists.txt \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_LUA=OFF
+
+ make
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+
+ make DESTDIR="$pkgdir" install
+}