-
Notifications
You must be signed in to change notification settings - Fork 297
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
# Maintainer: taotieren <[email protected]> | ||
|
||
pkgbase=nanomq-git | ||
pkgname=(nanomq{,-sqlite,-msquic,-full}-git) | ||
pkgver=0.17.8.r86.g3886c036 | ||
pkgrel=1 | ||
pkgdesc="Nano MQTT Broker - An Ultra-light and Blazing-fast MQTT Broker for IoT Edge" | ||
arch=('x86_64') | ||
url="https://github.com/nanomq/nanomq" | ||
license=('MIT') | ||
provides=(${pkgbase%-git} | ||
nanonng | ||
nng) | ||
conflicts=(${pkgbase%-git}) | ||
depends=(mbedtls) | ||
makedepends=(asciidoctor | ||
boost | ||
cmake | ||
gcc | ||
git | ||
ninja | ||
openssl | ||
sqlite | ||
zeromq) | ||
backup=() | ||
options=('!strip') | ||
source=("${pkgname%-git}::git+${url}.git") | ||
sha256sums=('SKIP') | ||
|
||
pkgver() { | ||
cd "${srcdir}/${pkgbase%-git}/" | ||
git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' | ||
} | ||
|
||
prepare() { | ||
cd "${srcdir}/${pkgbase%-git}/" | ||
git submodule update --init --recursive | ||
} | ||
|
||
package_nanomq-git() { | ||
pkgdesc+=" (base Broker)" | ||
provides+=(${pkgname%-git}) | ||
|
||
cd "${srcdir}/${pkgbase%-git}/" | ||
cmake -DCMAKE_BUILD_TYPE=None \ | ||
-DNNG_ENABLE_TLS=ON \ | ||
-DCFG_METHOD=CMAKE_CONFIG -DMQ=1 \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-B build_nanomq \ | ||
-G Ninja | ||
|
||
ninja -C build_nanomq | ||
|
||
DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgbase%-git}/build_nanomq install | ||
} | ||
|
||
package_nanomq-sqlite-git() { | ||
pkgdesc+=" (sqlite Broker)" | ||
provides+=(${pkgname%-git}) | ||
|
||
cd "${srcdir}/${pkgbase%-git}/" | ||
cmake -DCMAKE_BUILD_TYPE=None \ | ||
-DNNG_ENABLE_TLS=ON \ | ||
-DNNG_ENABLE_SQLITE=ON \ | ||
-DCFG_METHOD=CMAKE_CONFIG -DMQ=1 \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-B build_nanomq-sqlite \ | ||
-G Ninja | ||
|
||
ninja -C build_nanomq-sqlite | ||
|
||
DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgbase%-git}/build_nanomq-sqlite install | ||
} | ||
|
||
package_nanomq-msquic-git() { | ||
pkgdesc+=" (msquic Broker)" | ||
provides+=(${pkgname%-git} | ||
msquic) | ||
|
||
cd "${srcdir}/${pkgbase%-git}/" | ||
cmake -DCMAKE_BUILD_TYPE=None \ | ||
-DNNG_ENABLE_TLS=ON \ | ||
-DNNG_ENABLE_QUIC=ON \ | ||
-DNNG_ENABLE_SQLITE=ON \ | ||
-DQUIC_BUILD_SHARED=OFF \ | ||
-DCFG_METHOD=CMAKE_CONFIG -DMQ=1 \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-B build_nanomq-msquic \ | ||
-G Ninja | ||
|
||
ninja -C build_nanomq-msquic | ||
|
||
DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgbase%-git}/build_nanomq-msquic install | ||
} | ||
|
||
package_nanomq-full-git() { | ||
pkgdesc+=" (full Broker)" | ||
provides+=(${pkgname%-git} | ||
msquic) | ||
|
||
cd "${srcdir}/${pkgbase%-git}/" | ||
cmake -DCMAKE_BUILD_TYPE=None \ | ||
-DNNG_ENABLE_TLS=ON \ | ||
-DNNG_ENABLE_SQLITE=ON \ | ||
-DNNG_ENABLE_QUIC=ON \ | ||
-DNNG_ENABLE_SQLITE=ON \ | ||
-DQUIC_BUILD_SHARED=OFF \ | ||
-DENABLE_JWT=ON \ | ||
-DBUILD_ZMQ_GATEWAY=ON \ | ||
-DBUILD_BENCH=ON \ | ||
-DCFG_METHOD=CMAKE_CONFIG -DMQ=1 \ | ||
-DBUILD_SHARED_LIBS=ON \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-B build_nanomq-full \ | ||
-G Ninja | ||
# -DBUILD_DDS_PROXY=ON \ | ||
|
||
ninja -C build_nanomq-full | ||
|
||
DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgbase%-git}/build_nanomq-full install | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
maintainers: | ||
- github: taotieren | ||
|
||
build_prefix: extra-x86_64 | ||
|
||
pre_build: vcs_update | ||
|
||
post_build_script: | | ||
git_pkgbuild_commit() | ||
update_aur_repo() | ||
update_on: | ||
- source: github | ||
github: nanomq/nanomq |