summaryrefslogtreecommitdiff
path: root/user/hiredis
diff options
context:
space:
mode:
authorDan Theisen <djt@hxx.in>2021-09-30 15:22:49 +0000
committerDan Theisen <djt@hxx.in>2021-09-30 15:22:49 +0000
commit0d4358e10dc8c3ed21ec505588fb68ee6d83aa5d (patch)
treea0cee18cde22517f5863fbc89db21f95de02ec09 /user/hiredis
parente30aea657731403dba466648b20479006fb7986b (diff)
downloadpackages-0d4358e10dc8c3ed21ec505588fb68ee6d83aa5d.tar.gz
packages-0d4358e10dc8c3ed21ec505588fb68ee6d83aa5d.tar.bz2
packages-0d4358e10dc8c3ed21ec505588fb68ee6d83aa5d.tar.xz
packages-0d4358e10dc8c3ed21ec505588fb68ee6d83aa5d.zip
user/hiredis: new package
Diffstat (limited to 'user/hiredis')
-rw-r--r--user/hiredis/APKBUILD40
1 files changed, 40 insertions, 0 deletions
diff --git a/user/hiredis/APKBUILD b/user/hiredis/APKBUILD
new file mode 100644
index 000000000..1ce1505c5
--- /dev/null
+++ b/user/hiredis/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Dan Theisen <djt@hxx.in>
+# Maintainer: Dan Theisen <djt@hxx.in>
+pkgname=hiredis
+pkgver=1.0.0
+pkgrel=0
+pkgdesc="A minimalistic C client library for the Redis database"
+url="https://github.com/redis/hiredis"
+arch="all"
+license="BSD-3-Clause"
+options="!check" # tests require a real redis server running
+depends=""
+makedepends="openssl-dev"
+subpackages="$pkgname-dev"
+source="hiredis-$pkgver.tar.gz::https://github.com/redis/hiredis/archive/refs/tags/v$pkgver.tar.gz"
+
+build() {
+ if [ "$CBUILD" != "$CHOST" ]; then
+ CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+ fi
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=RelWithDebugInfo \
+ -DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+ -DCMAKE_C_FLAGS="$CFLAGS" \
+ ${CMAKE_CROSSOPTS} \
+ .
+ make
+}
+
+check() {
+ CTEST_OUTPUT_ON_FAILURE=TRUE ctest
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="eb56201121eecdbfc8d42e8c2c141ae77bea248eeb36687ac6835c9b2404f5475beb351c4d8539d552db4d88e933bb2bd5b73f165e62b130bb11aeff39928e69 hiredis-1.0.0.tar.gz"