diff options
author | Alexandre `Zopieux` Macabies | 2015-06-20 21:05:51 +0200 |
---|---|---|
committer | Alexandre `Zopieux` Macabies | 2015-06-20 21:05:51 +0200 |
commit | ef661a6d52b169d4f66167d8e6f2ce867eb0d9d2 (patch) | |
tree | bb32e006b4b2242cf909700282d4c1947d9ac725 | |
download | aur-ef661a6d52b169d4f66167d8e6f2ce867eb0d9d2.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 15 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0310a5a31262 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,15 @@ +pkgbase = lua52-cjson + pkgdesc = A fast JSON parsing and encoding support for Lua. + pkgver = 2.1.0 + pkgrel = 1 + url = http://www.kyne.com.au/~mark/software/lua-cjson.php + arch = i686 + arch = x86_64 + license = custom:MIT + depends = lua52 + optdepends = perl: UTF8 implementation test + source = http://www.kyne.com.au/~mark/software/download/lua-cjson-2.1.0.tar.gz + md5sums = 24f270663e9f6ca8ba2a02cef19f7963 + +pkgname = lua52-cjson + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5ebaf9b029e7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: zopieux <web+oss at zopieux dot com> + +_pkgname=lua-cjson +_lua_version=5.2 +_lua_version_nodot=${_lua_version//./} + +pkgname=lua${_lua_version_nodot}-cjson +pkgver=2.1.0 +pkgrel=1 +pkgdesc="A fast JSON parsing and encoding support for Lua." +arch=(i686 x86_64) +url="http://www.kyne.com.au/~mark/software/lua-cjson.php" +license=('custom:MIT') +depends=("lua${_lua_version_nodot}") +optdepends=('perl: UTF8 implementation test') +source=("http://www.kyne.com.au/~mark/software/download/$_pkgname-$pkgver.tar.gz") +md5sums=('24f270663e9f6ca8ba2a02cef19f7963') + +build() { + cd "$srcdir/$_pkgname-$pkgver" + make PREFIX=/usr LUA_INCLUDE_DIR=/usr/include/lua${_lua_version} LUA_VERSION=${_lua_version} +} + +package() { + cd "$srcdir/$_pkgname-$pkgver" + make PREFIX=/usr DESTDIR="$pkgdir/" LUA_INCLUDE_DIR=/usr/include/lua${_lua_version} LUA_VERSION=${_lua_version} install{,-extra} + + # license + install -Dm644 LICENSE \ + "$pkgdir/usr/share/licenses/$pkgname/LICENSE" + + # use lua5.2 + sed -i "1s|env lua|&${_lua_version}|" $(grep -rl "env lua" "$pkgdir") + + # do not conflict with lua-cjson + cd "$pkgdir/usr/bin" + mv lua2json lua${_lua_version_nodot}2json + mv json2lua json2lua${_lua_version_nodot} +} + +# vim:set ts=2 sw=2 et: |