summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6dfc986bf985e328d0429b4ac75dcf8ca8e9ba20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Maintainer: Tong Chunli <tty2099@gmail.com>

pkgname=mqtt_cpp
pkgver=11.1.0
pkgrel=1
pkgdesc='mqtt_cpp is a header only library.It supports MQTT v5'
arch=('x86_64')
url='https://github.com/redboltz/mqtt_cpp'
license=('BOOST')
depends=('doxygen')
makedepends=('cmake')
source=(
    "$pkgname-$pkgver.tar.gz::https://github.com/redboltz/mqtt_cpp/archive/refs/tags/v${pkgver}.tar.gz"
)
sha256sums=('5a44149dd90f6e0f62a45a4ed9dfa8d4171185a6047d5735186837bf264aabce')

build() {
    cmake -B build -S "$pkgname-$pkgver" \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DMQTT_BUILD_EXAMPLES=OFF \
        -DMQTT_BUILD_TESTS=OFF \
        -DMQTT_USE_TLS=ON \
        -DMQTT_USE_WS=ON \
        -DMQTT_USE_LOG=ON \
        -DMQTT_STD_VARIANT=ON \
        -DMQTT_STD_OPTIONAL=ON \
        -DMQTT_STD_STRING_VIEW=ON \
        -DMQTT_STD_ANY=ON \
        -DMQTT_STD_SHARED_PTR_ARRAY=ON
    make -C build
}


package() {
    make -C build DESTDIR="$pkgdir" install
}