diff options
author | edward-p | 2018-09-10 15:10:08 +0800 |
---|---|---|
committer | edward-p | 2018-09-10 15:10:08 +0800 |
commit | f65015d7350979b690380ec883e2a4f26b908c5a (patch) | |
tree | c703f2402dd50a5a6653245de74d842a09083341 | |
download | aur-f65015d7350979b690380ec883e2a4f26b908c5a.tar.gz |
init commit
-rw-r--r-- | .SRCINFO | 34 | ||||
-rw-r--r-- | 001-lua-version.patch | 11 | ||||
-rw-r--r-- | 002-uci.c.patch | 12 | ||||
-rw-r--r-- | 003-uci.h.patch | 12 | ||||
-rw-r--r-- | 004-cli.c.patch | 11 | ||||
-rw-r--r-- | PKGBUILD | 57 |
6 files changed, 137 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..34760e5c4214 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,34 @@ +pkgbase = uci-lua-archwrt + pkgdesc = C library for the Unified Configuration Interface (UCI) + pkgver = r509.4c8b4d6 + pkgrel = 1 + url = http://git.openwrt.org/?p=project/uci.git + arch = i686 + arch = x86_64 + arch = armv7h + license = LGPLv2.1 GPLv2 + makedepends = git + makedepends = cmake + makedepends = gcc + makedepends = make + makedepends = patch + makedepends = pkg-config + depends = libubox-lua-archwrt + depends = lua51 + provides = uci + conflicts = uci + conflicts = uci-git + conflicts = uci-lua-git + source = git://git.openwrt.org/project/uci.git + source = 001-lua-version.patch + source = 002-uci.c.patch + source = 003-uci.h.patch + source = 004-cli.c.patch + md5sums = SKIP + md5sums = 34e0767e6d1df56d188b1e18d91ef46f + md5sums = 3349bdf9478ce8659775c801e1c72d4b + md5sums = b07dbead8c9c88de0cd7de9c1bd6941e + md5sums = ed844618ae971ca78ebdc91a4c8f36a1 + +pkgname = uci-lua-archwrt + 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-uci.c.patch b/002-uci.c.patch new file mode 100644 index 000000000000..0c76d7ab9b78 --- /dev/null +++ b/002-uci.c.patch @@ -0,0 +1,12 @@ +--- a/lua/uci.c ++++ b/lua/uci.c +@@ -21,7 +21,7 @@ + #include <stdio.h> + #include <errno.h> + +-#include <lauxlib.h> ++#include <lua5.1/lauxlib.h> + #include <uci.h> + + #define MODNAME "uci" + diff --git a/003-uci.h.patch b/003-uci.h.patch new file mode 100644 index 000000000000..a5bf29168279 --- /dev/null +++ b/003-uci.h.patch @@ -0,0 +1,12 @@ +--- a/uci.h ++++ b/uci.h +@@ -35,7 +35,7 @@ extern "C" { + #include <stdio.h> + #include <stdint.h> + +-#define UCI_CONFDIR "/etc/config" ++#define UCI_CONFDIR "/opt/archwrt/etc/config" + #define UCI_SAVEDIR "/tmp/.uci" + #define UCI_DIRMODE 0700 + #define UCI_FILEMODE 0600 + diff --git a/004-cli.c.patch b/004-cli.c.patch new file mode 100644 index 000000000000..c9b669f7b764 --- /dev/null +++ b/004-cli.c.patch @@ -0,0 +1,11 @@ +--- a/cli.c ++++ b/cli.c +@@ -152,7 +152,7 @@ static void uci_usage(void) + "\treorder <config>.<section>=<position>\n" + "\n" + "Options:\n" +- "\t-c <path> set the search path for config files (default: /etc/config)\n" ++ "\t-c <path> set the search path for config files (default: /opt/archwrt/etc/config)\n" + "\t-d <str> set the delimiter for list values in uci show\n" + "\t-f <file> use <file> as input instead of stdin\n" + "\t-m when importing, merge data into an existing package\n" diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a9a1262ad696 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,57 @@ +# Maintainer: Edward Pacman <micro<doT>fedora(aT)gmail<doT>com> + +pkgname=uci-lua-archwrt +_gitname=uci +pkgver=r509.4c8b4d6 +pkgrel=1 +pkgdesc='C library for the Unified Configuration Interface (UCI)' +url='http://git.openwrt.org/?p=project/uci.git' +arch=('i686' 'x86_64' 'armv7h') +license=('LGPLv2.1 GPLv2') +depends=('libubox-lua-archwrt' 'lua51') +makedepends=('git' 'cmake' 'gcc' 'make' 'patch' 'pkg-config') +conflicts=('uci' 'uci-git' 'uci-lua-git') +provides=('uci') +source=('git://git.openwrt.org/project/uci.git' + '001-lua-version.patch' + '002-uci.c.patch' + '003-uci.h.patch' + '004-cli.c.patch') + +md5sums=('SKIP' + '34e0767e6d1df56d188b1e18d91ef46f' + '3349bdf9478ce8659775c801e1c72d4b' + 'b07dbead8c9c88de0cd7de9c1bd6941e' + 'ed844618ae971ca78ebdc91a4c8f36a1') + +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-uci.c.patch" + patch -p1 -i "$srcdir/003-uci.h.patch" + patch -p1 -i "$srcdir/004-cli.c.patch" +} + +build() { + cd "$srcdir/$_gitname" + + cmake CMakeLists.txt \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_LUA=ON + + make +} + +package() { + cd "$srcdir/$_gitname" + + make DESTDIR="$pkgdir" install + mkdir -p "$pkgdir/opt/archwrt/etc/config" +} |