summaryrefslogtreecommitdiff
path: root/app-misc/mosquitto
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /app-misc/mosquitto
reinit the tree, so we can have metadata
Diffstat (limited to 'app-misc/mosquitto')
-rw-r--r--app-misc/mosquitto/Manifest9
-rw-r--r--app-misc/mosquitto/files/mosquitto24
-rw-r--r--app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch43
-rw-r--r--app-misc/mosquitto/files/mosquitto-1.4.8-conditional-tests.patch41
-rw-r--r--app-misc/mosquitto/files/mosquitto-1.4.9-conditional-tests.patch43
-rw-r--r--app-misc/mosquitto/files/mosquitto.service12
-rw-r--r--app-misc/mosquitto/metadata.xml18
-rw-r--r--app-misc/mosquitto/mosquitto-1.4.14.ebuild96
8 files changed, 286 insertions, 0 deletions
diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest
new file mode 100644
index 000000000000..eafe65499b9b
--- /dev/null
+++ b/app-misc/mosquitto/Manifest
@@ -0,0 +1,9 @@
+AUX mosquitto 559 SHA256 acaf13cb940560de209d5a9e925714bae261bccecdfa35a6a713374258a6c377 SHA512 0bb0e648484269c2a5396118340177af10fae9ccbe4973371f7c8f5e31c96ff97c5146680415c450bad63397baa5c076e7c994f897fd3af2fcce0d1e0965ee22 WHIRLPOOL b2d098e03cdd5f02a8d075f9f75f6bd489a441b5b171a9c2ee76d6b3e533b1239ba349327329a5a53f4589627f04158a5bf068082cb18565a3816258bd24c02a
+AUX mosquitto-1.4.10-conditional-tests.patch 1142 SHA256 4ce039546c753459b72fe6dfa6d55e20bf90430c71d7d9756cddfdab2bd61615 SHA512 d07a081830fe7d23db380033c0c68d366bf60652f86c43a39074faa9bbcc6286485aad225226b64ef3055b4bd7a6c6969fa9ddd97eb2e6d8d98e815a881e634c WHIRLPOOL ae0e3edc5a3adb6354945dafa5644869752d02a86a0c04a3a8c77d552f22e015c460d8e0b9d63a68435c9416cb4b8c04629674ae19282e89f1a97f023461bc22
+AUX mosquitto-1.4.8-conditional-tests.patch 1080 SHA256 9e1345dc0afc5cb58c918d6f9e402a05d1367e1d6636c559d1f44e34c882e4fe SHA512 f31bb648ded33dc8d151743ebbc84ed4be634e20fe2938eecd4fa9e2cdea50951ae11ae674a43cb7683862aa5feec4907f00b9dedeba88cd2711d34d4f7d697a WHIRLPOOL 85d7cfcf07eedece86b047d1466db462b44b117e75c1fe0f35336931c447b5c249e7f0f9fb021718bcc4cf175ab4f3ebdd3b0ff04fb67679d4349537448d21ad
+AUX mosquitto-1.4.9-conditional-tests.patch 1142 SHA256 4ce039546c753459b72fe6dfa6d55e20bf90430c71d7d9756cddfdab2bd61615 SHA512 d07a081830fe7d23db380033c0c68d366bf60652f86c43a39074faa9bbcc6286485aad225226b64ef3055b4bd7a6c6969fa9ddd97eb2e6d8d98e815a881e634c WHIRLPOOL ae0e3edc5a3adb6354945dafa5644869752d02a86a0c04a3a8c77d552f22e015c460d8e0b9d63a68435c9416cb4b8c04629674ae19282e89f1a97f023461bc22
+AUX mosquitto.service 261 SHA256 d170ea60a4dfabb84a190ddc10b13e3651c750ca37f7e0159cd08c6cedf5c2de SHA512 3552618733fc106705375c5a1126db72e356694705312072f27f18e21c142cd75ae3ff1f17854ce54cdee092ff9e01fd75c1a8a12d68f75ead8a3697c69623e9 WHIRLPOOL a7ee5f5a4ea40c2ff26d59563fec1200d576d953649219145e4b29c6bac452c9620190782ec68cfff5f4049a944989877a1e3c8605b86c3d708e6fab312b60f6
+DIST mosquitto-1.4.14.tar.gz 365596 SHA256 156b1fa731d12baad4b8b22f7b6a8af50ba881fc711b81e9919ec103cf2942d1 SHA512 dc75a971354f87deeb79f32435acfae9bc561a1a24a75ee4940a35176ff91758071930d2105d8dee2a090e07527dbfaa5692bece67e03cc87e8b4b8b46f846c2 WHIRLPOOL 428494b277869d6d8d100663f1fd8f14e21028d0b2f802da634a2f033a9df4383246d6ad0802b27b41dfad7a50d3120830018dd7592888b468976798b8a2f0bf
+EBUILD mosquitto-1.4.14.ebuild 2453 SHA256 d78b90d3695958152f25e8c02807ef697941b29f3d87b1604698537d1febc4ca SHA512 a7ce7e5f393cf6508415c044a51518891f7a953ecdaa680f952cfbfdb8905561a017b0a7dad5281d9fee41c909331b26712c0466a33e345a232d538ffafb2a7f WHIRLPOOL ef84f3ed2fc93fe8c9ccd546b6dfdd916459acfb312b27db823ba5280f7b5646b1756dd58b4f9d1d5903a2818e58534222122aa5ac508aa096da4cd160601c87
+MISC ChangeLog 1589 SHA256 216f21db1364ddf07502a17b15c75ca8ecfeb7a976d1f3b63ecdcf859a76bae1 SHA512 12685cb8b941b9c4791e505245e97c733e2fc8ada073bbb7c73d8981939d08deef13c3907f1d3d0c02fdee75f68cdc8179bf82ede51b7b9c7261ada2b6f6bd28 WHIRLPOOL 8bee946d775b2a38645de389fb9462264c90152abae7a031372fac980098d88d2676f45454388626bfabc05d8252f8dcc9d1b9f2024be93d6902980ffd9ead55
+MISC metadata.xml 647 SHA256 baebe954aec439a65adcaf8c75469d999e07fdae681d37e066670e45a7cf512e SHA512 1694124e09b1d2cd3f8410a42d5514fd3d8434f0fc3163bb3f6fe5b369df7ab9e9365d1439421b4985830c6278f322a86599d33d2469f464fb089bcd89839c9a WHIRLPOOL 5d8a53ef384fabcc5a28e792900a135001118e59a007379548c583132b77e8d40e536b4567d78755f8c50ef7b917cb0660982aa6a1e503ec6d3a5e3013ee30cf
diff --git a/app-misc/mosquitto/files/mosquitto b/app-misc/mosquitto/files/mosquitto
new file mode 100644
index 000000000000..e70a6ab01b3d
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto
@@ -0,0 +1,24 @@
+#!/sbin/openrc-run
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -f /etc/${SVCNAME}/${SVCNAME}.conf ] ; then
+ eerror "No /etc/${SVCNAME}/${SVCNAME}.conf file exists!"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --exec /usr/sbin/${SVCNAME} --background --make-pidfile --pidfile /var/run/${SVCNAME}.pid -- --config-file /etc/${SVCNAME}/${SVCNAME}.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec /usr/sbin/${SVCNAME} --pidfile /var/run/${SVCNAME}.pid
+ eend $?
+}
diff --git a/app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch
new file mode 100644
index 000000000000..12b4fc56bc3c
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto-1.4.10-conditional-tests.patch
@@ -0,0 +1,43 @@
+--- a/test/broker/Makefile 2016-06-02 22:20:22.000000000 +0100
++++ b/test/broker/Makefile 2016-07-08 14:17:33.772666865 +0100
+@@ -63,6 +63,7 @@
+ ./05-clean-session-qos1.py
+
+ 06 :
++ifeq ($(WITH_BRIDGE),yes)
+ ./06-bridge-reconnect-local-out.py
+ ./06-bridge-br2b-disconnect-qos1.py
+ ./06-bridge-br2b-disconnect-qos2.py
+@@ -70,6 +71,7 @@
+ ./06-bridge-b2br-disconnect-qos2.py
+ ./06-bridge-fail-persist-resend-qos1.py
+ ./06-bridge-fail-persist-resend-qos2.py
++endif
+
+ 07 :
+ ./07-will-qos0.py
+@@ -87,10 +89,12 @@
+ ./08-ssl-connect-cert-auth-crl.py
+ ./08-ssl-connect-identity.py
+ ./08-ssl-connect-no-identity.py
++ifeq ($(WITH_BRIDGE),yes)
+ ./08-ssl-bridge.py
+ ./08-tls-psk-pub.py
+ ./08-tls-psk-bridge.py
+ endif
++endif
+
+ 09 :
+ ./09-plugin-auth-unpwd-success.py
+--- a/test/broker/c/Makefile 2016-02-14 14:36:55.000000000 +0000
++++ b/test/broker/c/Makefile 2016-05-05 09:40:31.440608209 +0100
+@@ -13,7 +13,9 @@
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1
+
+ 08-tls-psk-bridge.test : 08-tls-psk-bridge.c
++ifeq ($(WITH_BRIDGE),yes)
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1
++endif
+
+
+ reallyclean : clean
diff --git a/app-misc/mosquitto/files/mosquitto-1.4.8-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.8-conditional-tests.patch
new file mode 100644
index 000000000000..811cee645c9a
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto-1.4.8-conditional-tests.patch
@@ -0,0 +1,41 @@
+--- a/test/broker/Makefile 2016-02-14 14:36:55.000000000 +0000
++++ b/test/broker/Makefile 2016-05-05 09:53:30.548519257 +0100
+@@ -63,11 +63,13 @@
+ ./05-clean-session-qos1.py
+
+ 06 :
++ifeq ($(WITH_BRIDGE),yes)
+ ./06-bridge-reconnect-local-out.py
+ ./06-bridge-br2b-disconnect-qos1.py
+ ./06-bridge-br2b-disconnect-qos2.py
+ ./06-bridge-b2br-disconnect-qos1.py
+ ./06-bridge-b2br-disconnect-qos2.py
++endif
+
+ 07 :
+ ./07-will-qos0.py
+@@ -85,10 +87,12 @@
+ ./08-ssl-connect-cert-auth-crl.py
+ ./08-ssl-connect-identity.py
+ ./08-ssl-connect-no-identity.py
++ifeq ($(WITH_BRIDGE),yes)
+ ./08-ssl-bridge.py
+ ./08-tls-psk-pub.py
+ ./08-tls-psk-bridge.py
+ endif
++endif
+
+ 09 :
+ ./09-plugin-auth-unpwd-success.py
+--- a/test/broker/c/Makefile 2016-02-14 14:36:55.000000000 +0000
++++ b/test/broker/c/Makefile 2016-05-05 09:40:31.440608209 +0100
+@@ -13,7 +13,9 @@
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1
+
+ 08-tls-psk-bridge.test : 08-tls-psk-bridge.c
++ifeq ($(WITH_BRIDGE),yes)
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1
++endif
+
+
+ reallyclean : clean
diff --git a/app-misc/mosquitto/files/mosquitto-1.4.9-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.9-conditional-tests.patch
new file mode 100644
index 000000000000..12b4fc56bc3c
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto-1.4.9-conditional-tests.patch
@@ -0,0 +1,43 @@
+--- a/test/broker/Makefile 2016-06-02 22:20:22.000000000 +0100
++++ b/test/broker/Makefile 2016-07-08 14:17:33.772666865 +0100
+@@ -63,6 +63,7 @@
+ ./05-clean-session-qos1.py
+
+ 06 :
++ifeq ($(WITH_BRIDGE),yes)
+ ./06-bridge-reconnect-local-out.py
+ ./06-bridge-br2b-disconnect-qos1.py
+ ./06-bridge-br2b-disconnect-qos2.py
+@@ -70,6 +71,7 @@
+ ./06-bridge-b2br-disconnect-qos2.py
+ ./06-bridge-fail-persist-resend-qos1.py
+ ./06-bridge-fail-persist-resend-qos2.py
++endif
+
+ 07 :
+ ./07-will-qos0.py
+@@ -87,10 +89,12 @@
+ ./08-ssl-connect-cert-auth-crl.py
+ ./08-ssl-connect-identity.py
+ ./08-ssl-connect-no-identity.py
++ifeq ($(WITH_BRIDGE),yes)
+ ./08-ssl-bridge.py
+ ./08-tls-psk-pub.py
+ ./08-tls-psk-bridge.py
+ endif
++endif
+
+ 09 :
+ ./09-plugin-auth-unpwd-success.py
+--- a/test/broker/c/Makefile 2016-02-14 14:36:55.000000000 +0000
++++ b/test/broker/c/Makefile 2016-05-05 09:40:31.440608209 +0100
+@@ -13,7 +13,9 @@
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1
+
+ 08-tls-psk-bridge.test : 08-tls-psk-bridge.c
++ifeq ($(WITH_BRIDGE),yes)
+ $(CC) ${CFLAGS} $^ -o $@ ../../../lib/libmosquitto.so.1
++endif
+
+
+ reallyclean : clean
diff --git a/app-misc/mosquitto/files/mosquitto.service b/app-misc/mosquitto/files/mosquitto.service
new file mode 100644
index 000000000000..ebdc28e3448a
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Mosquitto MQTT Broker daemon
+ConditionPathExists=/etc/mosquitto/mosquitto.conf
+Requires=network.target
+
+[Service]
+Type=simple
+ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/app-misc/mosquitto/metadata.xml b/app-misc/mosquitto/metadata.xml
new file mode 100644
index 000000000000..53e88eadda1c
--- /dev/null
+++ b/app-misc/mosquitto/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>neil@digimed.co.uk</email>
+ <name>Neil Bothwick</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <use>
+ <flag name="bridge">Enable bridge support in the MQTT broker.</flag>
+ <flag name="persistence">Store messages and subscriptions to a file.</flag>
+ <flag name="srv">Include SRV lookup support.</flag>
+ <flag name="websockets">Support the WebSocket protocol.</flag>
+ </use>
+</pkgmetadata>
diff --git a/app-misc/mosquitto/mosquitto-1.4.14.ebuild b/app-misc/mosquitto/mosquitto-1.4.14.ebuild
new file mode 100644
index 000000000000..04008dcbd0bd
--- /dev/null
+++ b/app-misc/mosquitto/mosquitto-1.4.14.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+PYTHON_COMPAT=( python2_7 )
+
+inherit eutils systemd user toolchain-funcs python-any-r1
+
+DESCRIPTION="An Open Source MQTT v3 Broker"
+HOMEPAGE="http://mosquitto.org/"
+SRC_URI="http://mosquitto.org/files/source/${P}.tar.gz"
+LICENSE="EPL-1.0"
+SLOT="0"
+KEYWORDS="amd64 arm x86"
+IUSE="bridge examples +persistence +srv ssl tcpd websockets"
+
+RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ ssl? ( dev-libs/openssl:0= )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ srv? ( net-dns/c-ares )
+ websockets? ( net-libs/libwebsockets )"
+
+pkg_setup() {
+ enewgroup mosquitto
+ enewuser mosquitto -1 -1 -1 mosquitto
+}
+
+src_prepare() {
+ epatch "${FILESDIR}/${PN}-1.4.10-conditional-tests.patch"
+ if use persistence; then
+ sed -i -e "s:^#autosave_interval:autosave_interval:" \
+ -e "s:^#persistence false$:persistence true:" \
+ -e "s:^#persistence_file:persistence_file:" \
+ -e "s:^#persistence_location$:persistence_location /var/lib/mosquitto/:" \
+ mosquitto.conf || die
+ fi
+
+ # Remove prestripping
+ sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
+ client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
+
+ python_setup
+ python_fix_shebang test
+}
+
+src_configure() {
+ LIBDIR=$(get_libdir)
+ makeopts=(
+ "CC=$(tc-getCC)"
+ "LIB_SUFFIX=${LIBDIR:3}"
+ "WITH_BRIDGE=$(usex bridge)"
+ "WITH_PERSISTENCE=$(usex persistence)"
+ "WITH_SRV=$(usex srv)"
+ "WITH_TLS=$(usex ssl)"
+ "WITH_WEBSOCKETS=$(usex websockets)"
+ "WITH_WRAP=$(usex tcpd)"
+ )
+}
+
+src_compile() {
+ emake "${makeopts[@]}"
+}
+
+src_test() {
+ emake "${makeopts[@]}" test
+}
+
+src_install() {
+ emake "${makeopts[@]}" DESTDIR="${D}" prefix=/usr install
+ keepdir /var/lib/mosquitto
+ fowners mosquitto:mosquitto /var/lib/mosquitto
+ dodoc readme.md CONTRIBUTING.md ChangeLog.txt
+ doinitd "${FILESDIR}"/mosquitto
+ insinto /etc/mosquitto
+ doins mosquitto.conf
+ systemd_dounit "${FILESDIR}/mosquitto.service"
+
+ if use examples; then
+ docompress -x "/usr/share/doc/${PF}/examples"
+ insinto "/usr/share/doc/${PF}/examples"
+ doins -r examples/*
+ fi
+}
+
+pkg_postinst() {
+ elog ""
+ elog "The Python module has been moved out of mosquitto."
+ elog "See http://mosquitto.org/documentation/python/"
+ elog ""
+ elog "To start the mosquitto daemon at boot, add it to the default runlevel with:"
+ elog ""
+ elog " rc-update add mosquitto default"
+ elog " or"
+ elog " systemctl enable mosquitto"
+}