# Contributor: Pedro Filipe <xpecex@outlook.com> # Contributor: Natanael Copa <ncopa@alpinelinux.org> # Maintainer: Max Rees <maxcrees@me.com> pkgname=mosquitto pkgver=1.6.9 pkgrel=0 pkgdesc="An Open Source MQTT Broker" url="https://mosquitto.org/" arch="all" options="!check" # "Connection refused" during testing. license="EPL-1.0 AND EDL-1.0 AND MIT AND BSD-3-Clause" depends="" checkdepends="python3" makedepends="c-ares-dev openssl-dev util-linux-dev" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs $pkgname-openrc $pkgname-clients" install="$pkgname.pre-install" source="http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz mosquitto.initd disable-flaky-test.patch openrc-conf.patch " # secfixes: # 1.6.6-r0: # - CVE-2019-11779 # 1.5.6-r0: # - CVE-2018-12546 # - CVE-2018-12550 # - CVE-2018-12551 # 1.5.3-r0: # - CVE-2018-12543 # 1.4.15-r0: # - CVE-2017-7652 # - CVE-2017-7651 # 1.4.13-r0: # - CVE-2017-9868 # 1.4.12-r0: # - CVE-2017-7650 build() { make \ WITH_ADNS=no \ WITH_MEMORY_TRACKING=no \ WITH_SRV=yes \ prefix=/usr } check() { # Unit tests require cunit, so skip them. make -j1 -C test/broker test make -j1 -C test/lib test } package() { make prefix=/usr DESTDIR="$pkgdir" install # C++ bindings are deprecated, so don't install them. make -C lib/cpp prefix=/usr DESTDIR="$pkgdir" uninstall rm "$pkgdir"/usr/lib/pkgconfig/libmosquittopp.pc mv "$pkgdir"/usr/sbin/mosquitto "$pkgdir"/usr/bin mv "$pkgdir"/etc/mosquitto/mosquitto.conf.example \ "$pkgdir"/etc/mosquitto/mosquitto.conf install -Dm755 "$srcdir"/mosquitto.initd \ "$pkgdir"/etc/init.d/mosquitto } clients() { pkgdesc="Mosquitto command line MQTT clients" mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/mosquitto_[ps]ub "$subpkgdir"/usr/bin/ } sha512sums="f78228a1e8305e4d89b34250981ed2c5fe5317636003636dc90f6fa2b1e3ca3c8fadb705ee7301f5252456cb093a6547bd46a255ca3d9fb5cdced697738d6eb7 mosquitto-1.6.9.tar.gz 681fddc737b3ef3e6c052f0c854a730df290352640a18a63e23ef83d14c425558aff87805d1eb95e44de101b5df48872173af9f5414464ffa8cf727ea2c0491e mosquitto.initd 3886171e36f759a717aa6626d5b8dbd392963c737d5de28b4d52b81359008927b99ff7a0ca82f56a0e5deaed4585571759ba9216336a664fd346845837c2bc18 disable-flaky-test.patch b07f9bec2751ab32c43f53e74d8fca18dbf2d7ce7f8fab562dbcf75de19609ba6219d735ac504697404e0ed36613a14074e3a19e735297195877798f778d337a openrc-conf.patch"