summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuka Perkov2015-09-22 01:13:20 +0200
committerLuka Perkov2015-09-22 01:14:37 +0200
commit4fbec53da2c8c0210af7dc2140ea7810ac6f2092 (patch)
treecca963236518d1b66c9250c0eac3b0f71c50f971
downloadaur-4fbec53da2c8c0210af7dc2140ea7810ac6f2092.tar.gz
initial commit
Signed-off-by: Luka Perkov <luka.perkov@sartura.hr>
-rw-r--r--.SRCINFO24
-rw-r--r--.gitignore5
-rw-r--r--001-lua-version.patch11
-rw-r--r--002-ubusd-location.patch11
-rw-r--r--PKGBUILD46
5 files changed, 97 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..16db652d9c1e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = ubus-lua-git
+ pkgdesc = An embedded bus system developed for OpenWrt. It is like dbus but simple and small.
+ pkgver = r210.f361bfa
+ pkgrel = 1
+ url = http://git.openwrt.org/?p=project/ubus.git
+ arch = i686
+ arch = x86_64
+ arch = armv7h
+ license = LGPLv2.1
+ depends = libubox-lua-git
+ depends = json-c
+ depends = lua51
+ makedepends = git
+ makedepends = cmake
+ makedepends = gcc
+ makedepends = make
+ makedepends = patch
+ makedepends = pkg-config
+ provides = ubus
+ conflicts = ubus
+ conflicts = ubus-git
+ replaces = ubus
+
+pkgname = ubus-lua-git
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..5e3c1a6301fb
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,5 @@
+ubus
+*.tar.gz
+*.tar.xz
+pkg
+src
diff --git a/001-lua-version.patch b/001-lua-version.patch
new file mode 100644
index 000000000000..edc5263ea7c6
--- /dev/null
+++ b/001-lua-version.patch
@@ -0,0 +1,11 @@
+--- a/lua/CMakeLists.txt
++++ b/lua/CMakeLists.txt
+@@ -25,7 +25,7 @@
+
+ IF(NOT LUAPATH)
+ EXECUTE_PROCESS(
+- COMMAND lua -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end"
++ COMMAND lua5.1 -e "for k in string.gmatch(package.cpath .. \";\", \"([^;]+)/..so;\") do if k:sub(1,1) == \"/\" then print(k) break end end"
+ OUTPUT_VARIABLE LUAPATH
+ RESULT_VARIABLE LUA_CHECK_RES
+ OUTPUT_STRIP_TRAILING_WHITESPACE
diff --git a/002-ubusd-location.patch b/002-ubusd-location.patch
new file mode 100644
index 000000000000..27bf08ff1173
--- /dev/null
+++ b/002-ubusd-location.patch
@@ -0,0 +1,11 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -38,7 +38,7 @@
+ RUNTIME DESTINATION bin
+ )
+ INSTALL(TARGETS ubusd
+- RUNTIME DESTINATION sbin
++ RUNTIME DESTINATION bin
+ )
+
+ INSTALL(FILES ubusmsg.h ubus_common.h libubus.h DESTINATION include)
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..34610de6df01
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,46 @@
+# Maintainer: Luka Perkov <luka.perkov@sartura.hr>
+
+pkgname=ubus-lua-git
+_gitname=ubus
+pkgver=r210.f361bfa
+pkgrel=1
+pkgdesc='An embedded bus system developed for OpenWrt. It is like dbus but simple and small.'
+url='http://nbd.name/gitweb.cgi?p=luci2/ubus.git'
+arch=('i686' 'x86_64' 'armv7h')
+license=('LGPLv2.1')
+depends=('libubox-lua-git' 'json-c' 'lua51')
+makedepends=('git' 'cmake' 'gcc' 'make' 'patch' 'pkg-config')
+conflicts=('ubus' 'ubus-git')
+provides=('ubus')
+source=('git://nbd.name/luci2/ubus.git' '001-lua-version.patch' '002-ubusd-location.patch')
+md5sums=('SKIP' '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/001-lua-version.patch"
+ patch -p1 -i "$srcdir/002-ubusd-location.patch"
+}
+
+build() {
+ cd "$srcdir/$_gitname"
+
+ cmake CMakeLists.txt \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_EXAMPLES=OFF \
+ -DBUILD_LUA=ON
+
+ make
+}
+
+package() {
+ cd "$srcdir/$_gitname"
+
+ make DESTDIR="$pkgdir" install
+}