diff options
author | Goran Nushkov | 2019-04-06 05:22:18 +0200 |
---|---|---|
committer | Goran Nushkov | 2019-04-06 05:22:18 +0200 |
commit | 6c9e32190349b6b5a41eb673851dcb832909da37 (patch) | |
tree | 00745ec230a4891794bd30a3770e21de66390c9f | |
parent | caadc3481e4345ff0a40465d2c0a0fe0c2363ef7 (diff) | |
download | aur-6c9e32190349b6b5a41eb673851dcb832909da37.tar.gz |
Fixed openresty location
-rw-r--r-- | .SRCINFO | 3 | ||||
-rw-r--r-- | PKGBUILD | 44 | ||||
-rw-r--r-- | kong-community-edition.install | 19 |
3 files changed, 38 insertions, 28 deletions
@@ -14,8 +14,11 @@ pkgbase = kong-community-edition depends = pcre depends = zlib depends = rsync + depends = wget options = !strip options = !emptydirs + source = https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-1.1.0.stretch.all.deb + sha512sums = 755e7b1b2cfae427c1dc49ef5bd0dff72b06fda690438f2b831762268313ce53aa14d3f42d2b8f13f6c3cb3643ef1aa74ffde7ccac14b80dd3fc527d3be5204b pkgname = kong-community-edition @@ -8,35 +8,35 @@ arch=('any') url="https://getkong.org" license=('Apache') groups=('') -depends=('libyaml' 'lua51' 'luajit' 'openresty' 'openssl' 'pcre' 'zlib' 'rsync') +depends=('libyaml' 'lua51' 'luajit' 'openresty' 'openssl' 'pcre' 'zlib' 'rsync' 'wget') options=('!strip' '!emptydirs') install=${pkgname}.install -# source=("https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-1.1.0.stretch.all.deb") -# sha512sums=('755e7b1b2cfae427c1dc49ef5bd0dff72b06fda690438f2b831762268313ce53aa14d3f42d2b8f13f6c3cb3643ef1aa74ffde7ccac14b80dd3fc527d3be5204b') +source=("https://bintray.com/kong/kong-community-edition-deb/download_file?file_path=dists/kong-community-edition-1.1.0.stretch.all.deb") +sha512sums=('755e7b1b2cfae427c1dc49ef5bd0dff72b06fda690438f2b831762268313ce53aa14d3f42d2b8f13f6c3cb3643ef1aa74ffde7ccac14b80dd3fc527d3be5204b') -# package(){ +package(){ -# # Extract package data -# tar xzf data.tar.gz -C "${pkgdir}" + # Extract package data + tar xzf data.tar.gz -C "${pkgdir}" -# # Fix directories structure differences -# cd "${pkgdir}" -# install -D -m644 "/opt/openresty/pod/nginx/license_copyright.pod" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" -# install -D -m644 "/opt/openresty/pod/nginx/license_copyright.pod" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT" + # Fix directories structure differences + cd "${pkgdir}" + install -D -m644 "/opt/openresty/pod/nginx/license_copyright.pod" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -D -m644 "/opt/openresty/pod/nginx/license_copyright.pod" "${pkgdir}/usr/share/licenses/${pkgname}/COPYRIGHT" -# # # Fix openresty location -# cd usr/local/bin/ -# sed -i "s+usr/local/openresty+opt/openresty+g" kong -# sed -i "s+usr/local/openresty+opt/openresty+g" json2lua -# sed -i "s+usr/local/openresty+opt/openresty+g" lapis -# sed -i "s+usr/local/openresty+opt/openresty+g" lua2json -# rm luarocks luarocks-5.1 luarocks-admin luarocks-admin-5.1 -# cd "${pkgdir}" + # # Fix openresty location + cd usr/local/bin/ + sed -i "s+usr/local/openresty+opt/openresty+g" kong + sed -i "s+usr/local/openresty+opt/openresty+g" json2lua + sed -i "s+usr/local/openresty+opt/openresty+g" lapis + sed -i "s+usr/local/openresty+opt/openresty+g" lua2json + rm luarocks luarocks-5.1 luarocks-admin luarocks-admin-5.1 + cd "${pkgdir}" -# mkdir usr/bin 2> /dev/null; mv usr/local/bin/* usr/bin; rm -rf usr/local/bin + mkdir usr/bin 2> /dev/null; mv usr/local/bin/* usr/bin; rm -rf usr/local/bin -# rsync -a usr/local/* usr; rm -rf usr/local + rsync -a usr/local/* usr; rm -rf usr/local -# cd .. + cd .. -# } +} diff --git a/kong-community-edition.install b/kong-community-edition.install index 7eaef3bb6f49..cf652fd9b1b9 100644 --- a/kong-community-edition.install +++ b/kong-community-edition.install @@ -1,13 +1,20 @@ -post_install() { - pacman -U https://archive.archlinux.org/packages/ ... luarocks-2.4.3-1-any.pkg.tar.xz +pre_install() { echo 'export PATH=/opt/openresty/bin:$PATH' >> ~/.bashrc echo 'export PATH=/uopt/openresty/bin:/opt/openresty/nginx/sbin:$PATH' >> ~/.bashrc - echo 'export LUA_VERSION= ./configure \ - --lua-suffix=jit \ - --with-lua=/opt/openresty/luajit \ - --with-lua-include=/opt/openresty/luajit/include/luajit-2.1' >> ~/.bashrc source ~/.bashrc + wget https://luarocks.org/releases/luarocks-2.4.3.tar.gz + tar zxpf luarocks-2.4.3.tar.gz && cd luarocks-2.4.3 + ./configure \ + --lua-suffix=jit \ + --with-lua=/opt/openresty/luajit \ + --with-lua-include=/opt/openresty/luajit/include/luajit-2.1 + make build + make install + cd ../ && rm -rf luarocks-2.4.3/ && rm luarocks-2.4.3.tar.gz luarocks install kong 1.1.0-0 +} + +post_install() { mkdir -p /etc/kong mv /usr/lib/luarocks/rocks/kong/1.1.0-0/kong.conf.default /etc/kong/kong.conf.default } |