blob: 93050d60196d83cd25d395d549aebacd984a2820 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
_cfgdir=/opt/openresty/nginx/conf
_tmpdir=/var/lib/openresty
pkgname=openresty-lua-libcjson
pkgver=20150928.64.87ff5da
url=("https://github.com/bungle/lua-resty-libcjson")
license=('BSD')
arch=(any)
sha512sums=( SKIP )
depends=( openresty cjson-git )
source=( "$pkgname::git+https://github.com/bungle/lua-resty-libcjson" )
pkgrel=1
pkgver() {
local -a log_args=( -n 1 --date-order --format='%at' )
[[ $release ]] || release=$(date -d "@$(cd "$srcdir/$pkgname" && exec git log "${log_args[@]}")" +%Y%m%d)
# Use the tag of the last commit
local cnt="$(cd "$srcdir/$pkgname" && exec git rev-list --count HEAD)"
local ver="$(cd "$srcdir/$pkgname" && exec git rev-parse --short HEAD)"
printf "%s.%s.%s" "$release" "$cnt" "${ver//-/.}"
}
build() { :; }
package() {
mkdir -p "$pkgdir/opt/openresty/lualib/resty"
cp -a "$srcdir/$pkgname/lib/." "$pkgdir/opt/openresty/lualib/"
}
# vim:set ts=2 sw=2 et:
|