blob: 7b05573ae73e288276d96fe3ba8bc410c6bddba8 (
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
|
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=mosquitto
pkgver=1.4.1
pkgrel=1
pkgdesc="An Open Source MQTT v3.1 Broker"
url="http://mosquitto.org/"
arch="all"
license="BSD"
depends=""
depends_dev=""
makedepends="$depends_dev openssl-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/mosquitto-$pkgver.tar.gz
mosquitto.initd"
_builddir="$srcdir"/mosquitto-$pkgver
prepare() {
local i
cd "$_builddir"
for i in $source; do
case $i in
*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
esac
done
sed -i "s|prefix=/usr/local|prefix=/usr|" config.mk
# dont strip
sed -i -e "s|(INSTALL) -s|(INSTALL)|g" \
-e 's|--strip-program=${CROSS_COMPILE}${STRIP}||' \
*/Makefile */*/Makefile
}
build() {
cd "$_builddir"
make \
WITH_MEMORY_TRACKING=no \
WITH_WEBSOCKETS=yes \
WITH_SRV=yes \
prefix=/usr || return 1
}
package() {
cd "$_builddir"
make prefix=/usr DESTDIR="$pkgdir" install || return 1
rm -f "$pkgdir"/usr/lib/*.la || 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/
}
md5sums="46008028563eb750c6aa93281ab2e181 mosquitto-1.4.1.tar.gz
3a5c35f76efabcb7bd4fb6398caf9e5b mosquitto.initd"
sha256sums="75a8b051c7859a2426ffc15bf45b44f79c8288395a325d791ba54e5df9af58a8 mosquitto-1.4.1.tar.gz
97c7324f0f5e9dce52b241366bcfc3fb02ef8d2e0d622bab898eb36f261056c9 mosquitto.initd"
sha512sums="cbb38110eda5ce3248d17a006f4c87db865922e6beaff1dbd4d57e708c367bc64d7ebc35018d076b1069c6b9267897ef7616e2609e999727dc14275347bf40e7 mosquitto-1.4.1.tar.gz
16f96d8f7f3a8b06e2b2e04d42d7e0d89a931b52277fc017e4802f7a3bc85aff4dd290b1a0c40382ea8f5568d0ceb7319c031d9be916f346d805231a002b0433 mosquitto.initd"
|