summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO19
-rw-r--r--.gitignore9
-rw-r--r--PKGBUILD97
3 files changed, 94 insertions, 31 deletions
diff --git a/.SRCINFO b/.SRCINFO
index feb61b1d3c86..6be128784566 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,20 @@
pkgbase = kore
- pkgdesc = An easy to use web platform for writing scalable web APIs in C.
+ pkgdesc = An easy to use web platform for writing scalable, concurrent APIs in C or Python.
pkgver = 4.1.0
- pkgrel = 1
- url = https://kore.io/
- arch = i686
+ pkgrel = 2
+ url = https://kore.io
arch = x86_64
- license = ISC
+ license = custom:ISC
+ makedepends = minisign
+ depends = openssl>=1.1.0
+ depends = bash-bats
depends = curl
- depends = openssl
depends = postgresql-libs
- provides = kore
+ depends = python3
+ depends = yajl
source = https://kore.io/releases/kore-4.1.0.tar.gz
+ source = https://kore.io/releases/kore-4.1.0.tar.gz.minisig
sha256sums = b7d73b005fde0ea01c356a54e4bbd8a209a4dff9cf315802a127ce7267efbe61
+ sha256sums = d5d85cd1819f0c35db4bbf3fde30ad52fe31f021715eec437e7c2cf44c153760
pkgname = kore
-
diff --git a/.gitignore b/.gitignore
index 924dfb95c209..1b33d53db642 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,6 @@
-pkg/
-src/
-*.tar.*
+*
+
+!/.gitignore
+!/PKGBUILD
+!/.SRCINFO
+!/*.patch
diff --git a/PKGBUILD b/PKGBUILD
index a212b70b5d9d..ef39a4aebc9f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,90 @@
-# Maintainer: Kaizhao Zhang <zhangkaizhao@gmail.com>
+# Maintainer: Darren Ng <$(base64 --decode <<<VW4xR2ZuQGdtYWlsLmNvbQo=)>
+# Contributor: Kaizhao Zhang <zhangkaizhao@gmail.com>
# Contributor: Jefferson Gonzalez <jgmdev@gmail.com>
pkgname=kore
pkgver=4.1.0
-pkgrel=1
-pkgdesc="An easy to use web platform for writing scalable web APIs in C."
-arch=('i686' 'x86_64')
-url="https://kore.io/"
-license=('ISC')
-depends=('curl' 'openssl' 'postgresql-libs')
-provides=('kore')
-source=("https://kore.io/releases/kore-${pkgver}.tar.gz")
-sha256sums=('b7d73b005fde0ea01c356a54e4bbd8a209a4dff9cf315802a127ce7267efbe61')
+pkgrel=2
+pkgdesc="An easy to use web platform for writing scalable, concurrent APIs in C or Python."
+arch=($CARCH)
+url=https://$pkgname.io
+license=(custom:ISC)
+
+# optdepends=(bash-bats)
+makedepends=(minisign)
+depends=(
+ "openssl>=1.1.0"
+ bash-bats # kore W: Referenced library 'bats' is an uninstalled dependency # /usr/share/kore/examples
+ curl
+ postgresql-libs
+ python3
+ yajl # JSONRPC
+)
+
+source=(
+ https://kore.io/releases/$pkgname-$pkgver.tar.gz
+ https://kore.io/releases/$pkgname-$pkgver.tar.gz.minisig
+)
+sha256sums=(
+ b7d73b005fde0ea01c356a54e4bbd8a209a4dff9cf315802a127ce7267efbe61
+ d5d85cd1819f0c35db4bbf3fde30ad52fe31f021715eec437e7c2cf44c153760
+)
+
+prepare() {
+ # https://docs.kore.io/4.1.0/install.html
+ minisign -V -P "RWSxkEDc2y+whfKTmvhqs/YaFmEwblmvar7l6RXMjnu6o9tZW3LC0Hc9" -m $pkgname-$pkgver.tar.gz
+ minisign -V -x $pkgname-$pkgver.tar.gz.minisig -p "$srcdir"/$pkgname-$pkgver/minisign.pub -m $pkgname-$pkgver.tar.gz
+}
build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- # XXX Error while compiling Python support aside of cURL suppport. Disable Python support.
- PREFIX=/usr ACME=1 CURL=1 TASKS=1 PGSQL=1 JSONRPC=1 make
+ cd $pkgname-$pkgver
+
+ # /usr/include/features.h:*:*: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
+ # NOOPT=1 \
+ # NOHTTP=1 \
+
+ # https://stackoverflow.com/q/26025708/warning-visibility-attribute-ignored-symbol-visibility-c-gcc
+ # src/python.c:62:1: warning: ‘visibility’ attribute ignored [-Wattributes]
+ # 62 | static PyMODINIT_FUNC python_module_init(void);
+ # | ^~~~~~
+ # src/python.c:1555:1: warning: ‘visibility’ attribute ignored [-Wattributes]
+ # 1555 | {
+ # | ^
+ export CFLAGS="$CFLAGS -Wno-error=attributes"
+
+ make \
+ "$MAKEFLAGS" \
+ PREFIX=/usr \
+ CURL=1 \
+ ACME=1 \
+ TASKS=1 \
+ PGSQL=1 \
+ DEBUG=1 \
+ JSONRPC=1 \
+ PYTHON=1
+
}
package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
- make PREFIX="${pkgdir}/usr" install
+ cd $pkgname-$pkgver
+
+ make DESTDIR="$pkgdir" PREFIX=/usr install
+
+ # kore W: ELF file ('usr/bin/kodev') lacks FULL RELRO, check LDFLAGS.
+ # kore W: ELF file ('usr/bin/kodev') is unstripped.
+ # kore W: ELF file ('usr/bin/kore') is unstripped.
+
+ # Remove duplicate
+ # pkgdir=/home/darren/.cache/yay/kore/pkg/kore
+ diff -r --no-dereference "$pkgdir"/usr/include "$pkgdir"/usr/share/$pkgname/include
+ rm -r "$pkgdir"/usr/include
+
+ # More resources
+ install -m644 README.md conf/kore.conf.example "$pkgdir"/usr/share/$pkgname
+ # umask
+ cp --no-preserve=mode -r examples "$pkgdir"/usr/share/$pkgname/ # Stupid .gitignore with o+x
+ install -Dm644 {,"$pkgdir/usr/share/licenses/$pkgname/"}LICENSE
- install -dm755 "${pkgdir}/usr/share/doc/kore/"
- install -m644 conf/kore.conf.example "${pkgdir}/usr/share/doc/kore/"
- install -m644 README.md "${pkgdir}/usr/share/doc/kore/"
- cp -r examples "${pkgdir}/usr/share/doc/kore/examples/"
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}