blob: 72831cbe5aa09dbc32477d580ccf7101a2649a77 (
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mosquitto
pkgver=1.4.15
pkgrel=0
pkgdesc="An Open Source MQTT v3.1 Broker"
url="http://mosquitto.org/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev libressl-dev c-ares-dev util-linux-dev
libwebsockets-dev"
install="$pkgname.pre-install"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs++:_pp
$pkgname-libs $pkgname-clients"
replaces="mosquitto-utils"
source="http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz
libressl.patch
config.patch
mosquitto.initd"
builddir="$srcdir/$pkgname-$pkgver"
# secfixes:
# 1.4.15-r0:
# - CVE-2017-7652
# - CVE-2017-7651
# - CVE-2017-9868
# 1.4.12-r0:
# - CVE-2017-7650
prepare() {
default_prepare || return 1
# dont strip
sed -i -e "s|(INSTALL) -s|(INSTALL)|g" \
-e 's|--strip-program=${CROSS_COMPILE}${STRIP}||' \
*/Makefile */*/Makefile
}
build() {
cd "$builddir"
# PSK not supported by libressl
make \
WITH_MEMORY_TRACKING=no \
WITH_WEBSOCKETS=yes \
WITH_SRV=yes \
WITH_TLS_PSK=no \
WITH_ADNS=no \
prefix=/usr || return 1
}
package() {
cd "$builddir"
make prefix=/usr DESTDIR="$pkgdir" install || return 1
mv "$pkgdir"/etc/mosquitto/mosquitto.conf.example \
"$pkgdir"/etc/mosquitto/mosquitto.conf || return 1
sed -i -e 's/#log_dest stderr/log_dest syslog/' \
"$pkgdir"/etc/mosquitto/mosquitto.conf || return 1
install -Dm755 "$srcdir"/mosquitto.initd "$pkgdir"/etc/init.d/mosquitto
}
_pp() {
pkgdesc="C++ wrapper for libmosquitto"
replaces=
mkdir -p "$subpkgdir"/usr/lib
mv "$pkgdir"/usr/lib/libmosquittopp.so.* "$subpkgdir"/usr/lib/
}
clients() {
pkgdesc="Mosquitto command line MQTT clients"
replaces="mosquitto-utils"
mkdir -p "$subpkgdir"/usr/bin
mv "$pkgdir"/usr/bin/mosquitto_[ps]ub "$subpkgdir"/usr/bin/
}
sha512sums="36b06547553cf28af3ca9b728c42fc27e849c4ae84d7964572d430233ab26e2b59eee2a215ac23ddf2d0bef419e7c70e64e2a22c397fadb3e0677314d03f1100 mosquitto-1.4.15.tar.gz
53859b628f965b77f6e47910c0ceba2f2737b815131ed800dc64a80419e434d25b5ba0938ae645882e9aa5d475d4940c7d35cc6d56f54bc4937a66b32d7db4ad libressl.patch
d5442373ae6ae8bc83eee59b425fbd76e80f905b9fd2bd2ed2a37a7e156fe95a9cf477c9c4dac0975c5fd90e70884de6fb8a16aefcd37b239199d5deae50b7d2 config.patch
16f96d8f7f3a8b06e2b2e04d42d7e0d89a931b52277fc017e4802f7a3bc85aff4dd290b1a0c40382ea8f5568d0ceb7319c031d9be916f346d805231a002b0433 mosquitto.initd"
|