summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorGoran Nushkov2019-04-06 05:44:28 +0200
committerGoran Nushkov2019-04-06 05:44:28 +0200
commit777d3267aebb19d1422ae2738506827c9959fed9 (patch)
tree20be4fcc302cdc13b65f7b6235a4246d29dc7a80
parent6c9e32190349b6b5a41eb673851dcb832909da37 (diff)
downloadaur-777d3267aebb19d1422ae2738506827c9959fed9.tar.gz
Fixed openresty location
-rw-r--r--.SRCINFO3
-rw-r--r--PKGBUILD56
-rw-r--r--kong-community-edition.install16
3 files changed, 46 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b45fec90b8f7..4f64e6508755 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -7,9 +7,7 @@ pkgbase = kong-community-edition
arch = any
license = Apache
depends = libyaml
- depends = lua51
depends = luajit
- depends = openresty
depends = openssl
depends = pcre
depends = zlib
@@ -17,6 +15,7 @@ pkgbase = kong-community-edition
depends = wget
options = !strip
options = !emptydirs
+ options = !makeflags
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
diff --git a/PKGBUILD b/PKGBUILD
index 92ece07a2882..531f876859f3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -8,12 +8,43 @@ arch=('any')
url="https://getkong.org"
license=('Apache')
groups=('')
-depends=('libyaml' 'lua51' 'luajit' 'openresty' 'openssl' 'pcre' 'zlib' 'rsync' 'wget')
-options=('!strip' '!emptydirs')
+depends=('libyaml' 'luajit' 'openssl' 'pcre' 'zlib' 'rsync' 'wget')
+options=('!strip' '!emptydirs' '!makeflags')
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')
+prepare() {
+
+ # Prepare openresty
+ wget https://openresty.org/download/openresty-1.13.6.1.tar.gz
+ tar -xvf openresty-1.13.6.1.tar.gz && cd openresty-1.13.6.1
+ ./configure \
+ --with-pcre-jit \
+ --with-http_ssl_module \
+ --with-http_realip_module \
+ --with-http_stub_status_module \
+ --with-http_v2_module
+ make
+ make install
+ echo 'export PATH=/usr/local/openresty/bin:$PATH' >> ~/.bashrc
+ echo 'export PATH=/uusr/local/openresty/bin:/usr/local/openresty/nginx/sbin:$PATH' >> ~/.bashrc
+ source ~/.bashrc
+
+ # Prepare luarocks
+ wget https://luarocks.org/releases/luarocks-2.4.3.tar.gz
+ tar -xvf luarocks-2.4.3.tar.gz && cd luarocks-2.4.3
+ ./configure \
+ --lua-suffix=jit \
+ --with-lua=/usr/local/openresty/luajit \
+ --with-lua-include=/usr/local/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
+
+}
+
package(){
# Extract package data
@@ -21,17 +52,20 @@ package(){
# 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"
+ install -D -m644 "/usr/local/openresty/pod/nginx/license_copyright.pod" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -D -m644 "/usr/local/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}"
+ # 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
+ # sed -i "s+usr/local/openresty+opt/openresty+g" luarocks
+ # sed -i "s+usr/local/openresty+opt/openresty+g" luarocks-5.1
+ # sed -i "s+usr/local/openresty+opt/openresty+g" luarocks-admin
+ # sed -i "s+usr/local/openresty+opt/openresty+g" luarocks-admin-5.1
+ # cd "${pkgdir}"
mkdir usr/bin 2> /dev/null; mv usr/local/bin/* usr/bin; rm -rf usr/local/bin
diff --git a/kong-community-edition.install b/kong-community-edition.install
index cf652fd9b1b9..f3529697c84f 100644
--- a/kong-community-edition.install
+++ b/kong-community-edition.install
@@ -1,19 +1,3 @@
-pre_install() {
- echo 'export PATH=/opt/openresty/bin:$PATH' >> ~/.bashrc
- echo 'export PATH=/uopt/openresty/bin:/opt/openresty/nginx/sbin:$PATH' >> ~/.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