summaryrefslogtreecommitdiff
path: root/user/mosquitto/APKBUILD
diff options
context:
space:
mode:
authorMax Rees <maxcrees@me.com>2019-08-27 19:05:42 -0500
committerMax Rees <maxcrees@me.com>2019-08-27 19:14:37 -0500
commita1ee5f0e6ac73ea9cc57706114ed0b43d6c691fe (patch)
treea3758e4fc94124eef2119ace9c4ac80881ac52a3 /user/mosquitto/APKBUILD
parent4a3fb555bd3f8141225a2b5e40f2a5fd7d9484ec (diff)
downloadpackages-a1ee5f0e6ac73ea9cc57706114ed0b43d6c691fe.tar.gz
packages-a1ee5f0e6ac73ea9cc57706114ed0b43d6c691fe.tar.bz2
packages-a1ee5f0e6ac73ea9cc57706114ed0b43d6c691fe.tar.xz
packages-a1ee5f0e6ac73ea9cc57706114ed0b43d6c691fe.zip
user/mosquitto: new package
In the future: * cunit may be added to run unit tests. * libwebsockets may be added for websocket support.
Diffstat (limited to 'user/mosquitto/APKBUILD')
-rw-r--r--user/mosquitto/APKBUILD78
1 files changed, 78 insertions, 0 deletions
diff --git a/user/mosquitto/APKBUILD b/user/mosquitto/APKBUILD
new file mode 100644
index 000000000..a94142ca6
--- /dev/null
+++ b/user/mosquitto/APKBUILD
@@ -0,0 +1,78 @@
+# Contributor: Pedro Filipe <xpecex@outlook.com>
+# Contributor: Natanael Copa <ncopa@alpinelinux.org>
+# Maintainer: Max Rees <maxcrees@me.com>
+pkgname=mosquitto
+pkgver=1.6.4
+pkgrel=0
+pkgdesc="An Open Source MQTT Broker"
+url="https://mosquitto.org/"
+arch="all"
+license="EPL-1.0 AND EDL-1.0 AND MIT AND BSD-3-Clause"
+depends=""
+makedepends="c-ares-dev openssl-dev util-linux-dev"
+checkdepends="python3"
+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
+ python3.patch"
+
+# secfixes:
+# 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="9faf035660965769f687eb85f9672f891d6ecf1069f665c039b3c25f0e1cc64653909b16d94101d31f81d016a2b3ff85585d66dad1f48afb8003cffbf67c52b6 mosquitto-1.6.4.tar.gz
+681fddc737b3ef3e6c052f0c854a730df290352640a18a63e23ef83d14c425558aff87805d1eb95e44de101b5df48872173af9f5414464ffa8cf727ea2c0491e mosquitto.initd
+3886171e36f759a717aa6626d5b8dbd392963c737d5de28b4d52b81359008927b99ff7a0ca82f56a0e5deaed4585571759ba9216336a664fd346845837c2bc18 disable-flaky-test.patch
+b07f9bec2751ab32c43f53e74d8fca18dbf2d7ce7f8fab562dbcf75de19609ba6219d735ac504697404e0ed36613a14074e3a19e735297195877798f778d337a openrc-conf.patch
+078197e6c3e59b664f5fdd1e4a4f669c9a76ab84fe4a5d8602ac80406b85c4e1cce29d9372e76d995155b74abb438d0dc0cdcdb98251fb904122073c4088d76a python3.patch"