summaryrefslogtreecommitdiff
path: root/app-misc/mosquitto
diff options
context:
space:
mode:
Diffstat (limited to 'app-misc/mosquitto')
-rw-r--r--app-misc/mosquitto/Manifest11
-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.15-conditional-tests.patch12
-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-r1.ebuild97
-rw-r--r--app-misc/mosquitto/mosquitto-1.4.14.ebuild96
-rw-r--r--app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild102
-rw-r--r--app-misc/mosquitto/mosquitto-1.4.15.ebuild99
10 files changed, 514 insertions, 0 deletions
diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest
new file mode 100644
index 000000000000..b66100fde2a3
--- /dev/null
+++ b/app-misc/mosquitto/Manifest
@@ -0,0 +1,11 @@
+AUX mosquitto 559 BLAKE2B 16a34850c13d9fd6007b5fbd26b4db9e31caa0ee91b8eee8dbca605c273756bf6c92458d5093eee56f603cce7f10956ee084403e188d49693a759538976f411f SHA512 0bb0e648484269c2a5396118340177af10fae9ccbe4973371f7c8f5e31c96ff97c5146680415c450bad63397baa5c076e7c994f897fd3af2fcce0d1e0965ee22
+AUX mosquitto-1.4.10-conditional-tests.patch 1142 BLAKE2B 66be5988681be543a1c9d61bbd47baa528be1d8d8b1206e7d711b0d7789aba41ae8bd28e2729d084c6bb64fc43386e31a426717b0719c5c26219d3fa0a166455 SHA512 d07a081830fe7d23db380033c0c68d366bf60652f86c43a39074faa9bbcc6286485aad225226b64ef3055b4bd7a6c6969fa9ddd97eb2e6d8d98e815a881e634c
+AUX mosquitto-1.4.15-conditional-tests.patch 371 BLAKE2B 4e96752a6ef489a6dec24cb02381f11ec38f3440c13f99ee2adee2aa7995b591c341ff050793960d81e73849147e809f9cd98a29c035038ed1f3b2047bd7431f SHA512 a970740b0cabd34f2532fbd27037546c125337943b848c4489ed44c3e3408e802d223b6f2c8a0144c43ccf5d7ae1270f0c4bb23833827492994d7bfe569639de
+AUX mosquitto.service 261 BLAKE2B 6ea8059914acf8730f2e7d04bfd5f79c59a335b65ddecb4773bb4418260c6ed6d0120eaa2e3f7ba4842fc7014e5b51d1ba376cf1db2009b7a55a53a4e6747221 SHA512 3552618733fc106705375c5a1126db72e356694705312072f27f18e21c142cd75ae3ff1f17854ce54cdee092ff9e01fd75c1a8a12d68f75ead8a3697c69623e9
+DIST mosquitto-1.4.14.tar.gz 365596 BLAKE2B 92bcb1fd9e67711d6ce8db5e767be31a1321866205cf4cad684d8b77a8b14a2eaf5e4367a74d5dd8f814f0d229dc77ce878879632c0c34c6a23f7975bf6ae8c7 SHA512 dc75a971354f87deeb79f32435acfae9bc561a1a24a75ee4940a35176ff91758071930d2105d8dee2a090e07527dbfaa5692bece67e03cc87e8b4b8b46f846c2
+DIST mosquitto-1.4.15.tar.gz 368961 BLAKE2B 28bfab7d41d9e057ba8b52e0c428967ecc5d0c25a3d73dca420ae883c2b462ee02da1eeb9c22f4d392f0ccf62224acab6f24d4a0798a594f4b9f90c907fa1495 SHA512 36b06547553cf28af3ca9b728c42fc27e849c4ae84d7964572d430233ab26e2b59eee2a215ac23ddf2d0bef419e7c70e64e2a22c397fadb3e0677314d03f1100
+EBUILD mosquitto-1.4.14-r1.ebuild 2462 BLAKE2B e747f7751b56d1f93a460985e19555fd7fdb1bf08540eec7ab2107ad8165797de2363f0383eeaab4b2bc5011d830022f63ec5baf73804a1f0492c03a7632de3b SHA512 59f100a47c98636c82f4ca5b4d2edb0c1e6399ef25d95dd62f576f9694b11fef32d01dc58c63d69d5aa4bd119dd467199f3d49d19760be9b8220ff7420749c0c
+EBUILD mosquitto-1.4.14.ebuild 2453 BLAKE2B e8785e9f2dcd4d8d1a627dff29a895b0ff1f149b0a63454371b31ff241a42e7bbb7288c7a5becf3175cafe29c4da11e5fd656f8bb311cb892909929e62e93034 SHA512 a7ce7e5f393cf6508415c044a51518891f7a953ecdaa680f952cfbfdb8905561a017b0a7dad5281d9fee41c909331b26712c0466a33e345a232d538ffafb2a7f
+EBUILD mosquitto-1.4.15-r2.ebuild 2463 BLAKE2B 3e6c1a3ab075a62675e3f9158a665f65238c8a35c72bd7e1a4b5517f756907e5769bc4ea46b6f5c1cff2a74f3983caa3945fb6a0df3203d76ae182764d43f9ec SHA512 6cc77d34fd71a288db14c8f2b74ead1602953d8c5c96fba9c6b742fa74ec0c356ded19ff0d0d6436c1f7c8b8bf42c239568c8ed7c59fbf07b2e525dcc47c2b49
+EBUILD mosquitto-1.4.15.ebuild 2366 BLAKE2B 6df167983ebe736631cc55fb47b9487bd456928e17d149653e7f5ec333ab874f41e4371ee882ee16a984fc055146ddb1fe7727ff71f5917fd1e3c0dd50db76f4 SHA512 609584b242bbabca2214fa6027f948ce6c237fe9e6be43acb38625abdf83e5c898c9158244612b5a4201a18e99b0fd78b987b71d54dbbf6a0a62f4a60ce4bb5c
+MISC metadata.xml 656 BLAKE2B 58ecef974e662c6dccf267ba8732116010a3db7679d6ee3e163cd351073a210f0bb06e5098945564f048353caf4ed7fe73d69bc96cce42c56ba298073fe95384 SHA512 2034ecb6ff73024cd905d275da23b27568d897dd616ca70a2485922667a74d4ac1d6df11b0a7a413bc8d595962697959e4cbe13c8934e8b3333c6a4e290d657f
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.15-conditional-tests.patch b/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch
new file mode 100644
index 000000000000..1642597c5620
--- /dev/null
+++ b/app-misc/mosquitto/files/mosquitto-1.4.15-conditional-tests.patch
@@ -0,0 +1,12 @@
+--- 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..2b05da7a5d48
--- /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>ramage.lucas@openmailbox.org</email>
+ <name>Lucas Ramage</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-r1.ebuild b/app-misc/mosquitto/mosquitto-1.4.14-r1.ebuild
new file mode 100644
index 000000000000..96530da48cb2
--- /dev/null
+++ b/app-misc/mosquitto/mosquitto-1.4.14-r1.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit 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() {
+ eapply "${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
+ eapply_user
+}
+
+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"
+}
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"
+}
diff --git a/app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild b/app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild
new file mode 100644
index 000000000000..48165a4db6f3
--- /dev/null
+++ b/app-misc/mosquitto/mosquitto-1.4.15-r2.ebuild
@@ -0,0 +1,102 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit systemd user toolchain-funcs python-any-r1
+
+DESCRIPTION="An Open Source MQTT v3 Broker"
+HOMEPAGE="https://mosquitto.org/"
+SRC_URI="https://mosquitto.org/files/source/${P}.tar.gz"
+
+LICENSE="EPL-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~x86"
+IUSE="bridge examples +persistence +srv ssl tcpd test websockets"
+
+REQUIRED_USE="test? ( bridge )"
+
+RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ ssl? ( dev-libs/openssl:0= )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ srv? ( net-dns/c-ares )
+ websockets? ( net-libs/libwebsockets )"
+
+PATCHES=( "${FILESDIR}/${P}-conditional-tests.patch" )
+
+_emake() {
+ LIBDIR=$(get_libdir)
+ emake \
+ 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)" \
+ "$@"
+}
+
+pkg_setup() {
+ enewgroup mosquitto
+ enewuser mosquitto -1 -1 -1 mosquitto
+}
+
+src_prepare() {
+ default
+ if use persistence; then
+ sed -i -e "/^#autosave_interval/s|^#||" \
+ -e "s|^#persistence false$|persistence true|" \
+ -e "/^#persistence_file/s|^#||" \
+ -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_compile() {
+ _emake
+}
+
+src_test() {
+ _emake test
+}
+
+src_install() {
+ _emake 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"
+ docinto "/usr/share/doc/${PF}"
+ doins -r examples
+ fi
+}
+
+pkg_postinst() {
+ if [[ -z "${REPLACING_VERSIONS}" ]]; then
+ elog "The Python module has been moved out of mosquitto."
+ elog "See https://mosquitto.org/documentation/python/"
+ else
+ 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"
+ fi
+}
diff --git a/app-misc/mosquitto/mosquitto-1.4.15.ebuild b/app-misc/mosquitto/mosquitto-1.4.15.ebuild
new file mode 100644
index 000000000000..65dffc2f3f19
--- /dev/null
+++ b/app-misc/mosquitto/mosquitto-1.4.15.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+
+inherit 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 test websockets"
+
+REQUIRED_USE="test? ( bridge )"
+
+RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
+ ssl? ( dev-libs/openssl:0= )"
+DEPEND="${RDEPEND}
+ ${PYTHON_DEPS}
+ srv? ( net-dns/c-ares )
+ websockets? ( net-libs/libwebsockets )"
+
+_emake() {
+ LIBDIR=$(get_libdir)
+ emake \
+ 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)" \
+ "$@"
+}
+
+pkg_setup() {
+ enewgroup mosquitto
+ enewuser mosquitto -1 -1 -1 mosquitto
+}
+
+src_prepare() {
+ if use persistence; then
+ sed -i -e "/^#autosave_interval/s|^#||" \
+ -e "s|^#persistence false$|persistence true|" \
+ -e "/^#persistence_file/s|^#||" \
+ -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
+ eapply_user
+}
+
+src_compile() {
+ _emake
+}
+
+src_test() {
+ _emake test
+}
+
+src_install() {
+ _emake 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"
+ docinto "/usr/share/doc/${PF}"
+ 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"
+}