Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nanomq-git #3304

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions archlinuxcn/nanomq-git/PKGBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# Maintainer: taotieren <admin@taotieren.com>

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
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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nanomq-git W: ELF file ('usr/bin/nanomq') is unstripped.
nanomq-git W: ELF file ('usr/bin/nanomq_cli') is unstripped.
nanomq-git W: ELF file ('usr/bin/nngcat') is unstripped.
nanomq-git W: Directory (usr/src/debug/nanomq-git/nanomq/build_nanomq/nng/src/supplemental/nanolib) is empty
nanomq-git W: Directory (usr/src/debug/nanomq-git/nanomq/build_nanomq/nanomq/nng/src/supplemental/nanolib/build) is empty
nanomq-git E: Uncommon license identifiers such as 'MIT' require license files below /usr/share/licenses/nanomq-git/ or switching to common license identifiers. Found 0/1 required license files.
nanomq-git W: Dependency glibc detected and implicitly satisfied (libraries ['usr/lib/libc.so.6'] needed in files ['usr/bin/nanomq_cli', 'usr/bin/nngcat', 'usr/bin/nanomq'])

pkgdesc+=" (base Broker)"
provides+=(${pkgname%-git})

cd "${srcdir}/${pkgbase%-git}/"
cmake -DCMAKE_BUILD_TYPE=None \
-DNNG_ENABLE_TLS=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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nanomq-sqlite-git W: ELF file ('usr/bin/nanomq') is unstripped.
nanomq-sqlite-git W: ELF file ('usr/bin/nanomq_cli') is unstripped.
nanomq-sqlite-git W: ELF file ('usr/bin/nngcat') is unstripped.
nanomq-sqlite-git E: Uncommon license identifiers such as 'MIT' require license files below /usr/share/licenses/nanomq-sqlite-git/ or switching to common license identifiers. Found 0/1 required license files.
nanomq-sqlite-git W: Dependency glibc detected and implicitly satisfied (libraries ['usr/lib/libc.so.6'] needed in files ['usr/bin/nanomq', 'usr/bin/nngcat', 'usr/bin/nanomq_cli'])

pkgdesc+=" (sqlite Broker)"
provides+=(${pkgname%-git})

cd "${srcdir}/${pkgbase%-git}/"
cmake -DCMAKE_BUILD_TYPE=None \
-DNNG_ENABLE_TLS=ON \
-DNNG_ENABLE_SQLITE=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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nanomq-msquic-git W: ELF file ('usr/bin/nanomq') is unstripped.
nanomq-msquic-git W: ELF file ('usr/bin/nanomq_cli') is unstripped.
nanomq-msquic-git W: ELF file ('usr/bin/nngcat') is unstripped.
nanomq-msquic-git W: ELF file ('usr/bin/nanomq') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
nanomq-msquic-git W: ELF file ('usr/bin/nanomq_cli') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
nanomq-msquic-git W: ELF file ('usr/bin/nngcat') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
nanomq-msquic-git E: Uncommon license identifiers such as 'MIT' require license files below /usr/share/licenses/nanomq-msquic-git/ or switching to common license identifiers. Found 0/1 required license files.
nanomq-msquic-git W: Dependency glibc detected and implicitly satisfied (libraries ['usr/lib/libc.so.6'] needed in files ['usr/bin/nanomq', 'usr/bin/nngcat', 'usr/bin/nanomq_cli'])

pkgdesc+=" (msquic Broker)"
provides+=(${pkgname%-git}
msquic)

cd "${srcdir}/${pkgbase%-git}/"
cmake -DCMAKE_BUILD_TYPE=None \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CMake Deprecation Warning at CMakeLists.txt:8 (cmake_minimum_required):
  Compatibility with CMake < 3.5 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.

-DNNG_ENABLE_TLS=ON \
-DNNG_ENABLE_QUIC=ON \
-DNNG_ENABLE_SQLITE=ON \
-DQUIC_BUILD_SHARED=OFF \
-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() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nanomq-full-git W: ELF file ('usr/bin/nanomq') is unstripped.
nanomq-full-git W: ELF file ('usr/bin/nanomq_cli') is unstripped.
nanomq-full-git W: ELF file ('usr/bin/nngcat') is unstripped.
nanomq-full-git W: ELF file ('usr/bin/nanomq') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
nanomq-full-git W: ELF file ('usr/bin/nanomq_cli') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
nanomq-full-git W: ELF file ('usr/bin/nngcat') lacks GNU_PROPERTY_X86_FEATURE_1_SHSTK.
nanomq-full-git W: File (usr/cmake/) exists in a non-standard directory.
nanomq-full-git W: File (usr/cmake/MbedTLSConfig.cmake) exists in a non-standard directory.
nanomq-full-git W: File (usr/cmake/MbedTLSConfigVersion.cmake) exists in a non-standard directory.
nanomq-full-git W: File (usr/cmake/MbedTLSTargets-none.cmake) exists in a non-standard directory.
nanomq-full-git W: File (usr/cmake/MbedTLSTargets.cmake) exists in a non-standard directory.
nanomq-full-git E: Uncommon license identifiers such as 'MIT' require license files below /usr/share/licenses/nanomq-full-git/ or switching to common license identifiers. Found 0/1 required license files.
nanomq-full-git E: Dependency zeromq detected and not included (libraries ['usr/lib/libzmq.so.5'] needed in files ['usr/bin/nanomq_cli'])
nanomq-full-git W: Dependency glibc detected and implicitly satisfied (libraries ['usr/lib/libc.so.6'] needed in files ['usr/bin/nanomq', 'usr/bin/nngcat', 'usr/bin/nanomq_cli'])
nanomq-full-git W: Dependency included, but may not be needed ('mbedtls')

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 \
-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
}
14 changes: 14 additions & 0 deletions archlinuxcn/nanomq-git/lilac.yaml
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