Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/mosquitto/
Date: Sun, 28 May 2017 22:05:34
Message-Id: 1496009108.ee8b421a75f07ba080244b75cb351a7a08edf58d.mrueg@gentoo
1 commit: ee8b421a75f07ba080244b75cb351a7a08edf58d
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 28 22:04:03 2017 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Sun May 28 22:05:08 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee8b421a
7
8 app-misc/mosquitto: Version bump to 1.4.11, proxy commit for Neil Bothwick
9
10 * Add support for WebSockets (bug 588504)
11 * Fix prestripped files
12 * Respect CC
13
14 Gentoo-Bug: 615678
15
16 Package-Manager: Portage-2.3.6, Repoman-2.3.1
17
18 app-misc/mosquitto/Manifest | 1 +
19 app-misc/mosquitto/metadata.xml | 1 +
20 app-misc/mosquitto/mosquitto-1.4.11.ebuild | 96 ++++++++++++++++++++++++++++++
21 3 files changed, 98 insertions(+)
22
23 diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest
24 index d404db1ef51..97732b6a437 100644
25 --- a/app-misc/mosquitto/Manifest
26 +++ b/app-misc/mosquitto/Manifest
27 @@ -1 +1,2 @@
28 DIST mosquitto-1.4.10.tar.gz 359569 SHA256 437648d68a4a781dd8d913814cd5451f59ab4a5fcf84cccaf7c36e6a07459770 SHA512 fe5d6d7196a137a496ba6881c77d852396baefb4f0b83ccd9a22175fc05b09e48a09ea249e30ec7db966e11de134ebcc4e2e9b1fd40b31dc59fb0fa2f60b75a1 WHIRLPOOL 9510060701259e78c39bf88989ce8142d11e0b53348a20c1a71ffc69b98d7c1725c9315026d392d8d86d131bc55c86492a91ddde94eca0d353f1d3ab6ef6900f
29 +DIST mosquitto-1.4.11.tar.gz 361468 SHA256 ca47533bbc1b7c5e15d6e5d96d3efc59677f2515b6692263c34b7c48f33280c5 SHA512 c05ca8679b9a6f540868f4ccf701257fcabc114d5450ac0bbbe80b91bb7cd4fc52668773e945506760c7a5bd8a494e0a56100714112e5d2713d57bfab8951587 WHIRLPOOL d4418b951ff55eaba1fc67b324f1ecdd0d55c0eea066be9793de30e8561d0fe0e36537adb688fc98764758998086eb64b827041e76160ddc858c6066f83e8f21
30
31 diff --git a/app-misc/mosquitto/metadata.xml b/app-misc/mosquitto/metadata.xml
32 index da548ae04a8..53e88eadda1 100644
33 --- a/app-misc/mosquitto/metadata.xml
34 +++ b/app-misc/mosquitto/metadata.xml
35 @@ -13,5 +13,6 @@
36 <flag name="bridge">Enable bridge support in the MQTT broker.</flag>
37 <flag name="persistence">Store messages and subscriptions to a file.</flag>
38 <flag name="srv">Include SRV lookup support.</flag>
39 + <flag name="websockets">Support the WebSocket protocol.</flag>
40 </use>
41 </pkgmetadata>
42
43 diff --git a/app-misc/mosquitto/mosquitto-1.4.11.ebuild b/app-misc/mosquitto/mosquitto-1.4.11.ebuild
44 new file mode 100644
45 index 00000000000..3f4677c38d1
46 --- /dev/null
47 +++ b/app-misc/mosquitto/mosquitto-1.4.11.ebuild
48 @@ -0,0 +1,96 @@
49 +# Copyright 1999-2017 Gentoo Foundation
50 +# Distributed under the terms of the GNU General Public License v2
51 +
52 +EAPI=5
53 +PYTHON_COMPAT=( python2_7 )
54 +
55 +inherit eutils systemd user toolchain-funcs python-any-r1
56 +
57 +DESCRIPTION="An Open Source MQTT v3 Broker"
58 +HOMEPAGE="http://mosquitto.org/"
59 +SRC_URI="http://mosquitto.org/files/source/${P}.tar.gz"
60 +LICENSE="EPL-1.0"
61 +SLOT="0"
62 +KEYWORDS="~amd64 ~x86 ~arm"
63 +IUSE="bridge examples +persistence +srv ssl tcpd websockets"
64 +
65 +RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
66 + ssl? ( dev-libs/openssl:0= )"
67 +DEPEND="${RDEPEND}
68 + ${PYTHON_DEPS}
69 + srv? ( net-dns/c-ares )
70 + websockets? ( net-libs/libwebsockets )"
71 +
72 +pkg_setup() {
73 + enewgroup mosquitto
74 + enewuser mosquitto -1 -1 -1 mosquitto
75 +}
76 +
77 +src_prepare() {
78 + epatch "${FILESDIR}/${PN}-1.4.10-conditional-tests.patch"
79 + if use persistence; then
80 + sed -i -e "s:^#autosave_interval:autosave_interval:" \
81 + -e "s:^#persistence false$:persistence true:" \
82 + -e "s:^#persistence_file:persistence_file:" \
83 + -e "s:^#persistence_location$:persistence_location /var/lib/mosquitto/:" \
84 + mosquitto.conf || die
85 + fi
86 +
87 + # Remove prestripping
88 + sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
89 + client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
90 +
91 + python_setup
92 + python_fix_shebang test
93 +}
94 +
95 +src_configure() {
96 + LIBDIR=$(get_libdir)
97 + makeopts=(
98 + "CC=$(tc-getCC)"
99 + "LIB_SUFFIX=${LIBDIR:3}"
100 + "WITH_BRIDGE=$(usex bridge)"
101 + "WITH_PERSISTENCE=$(usex persistence)"
102 + "WITH_SRV=$(usex srv)"
103 + "WITH_TLS=$(usex ssl)"
104 + "WITH_WEBSOCKETS=$(usex websockets)"
105 + "WITH_WRAP=$(usex tcpd)"
106 + )
107 +}
108 +
109 +src_compile() {
110 + emake "${makeopts[@]}"
111 +}
112 +
113 +src_test() {
114 + emake "${makeopts[@]}" test
115 +}
116 +
117 +src_install() {
118 + emake "${makeopts[@]}" DESTDIR="${D}" prefix=/usr install
119 + keepdir /var/lib/mosquitto
120 + fowners mosquitto:mosquitto /var/lib/mosquitto
121 + dodoc readme.md CONTRIBUTING.md ChangeLog.txt
122 + doinitd "${FILESDIR}"/mosquitto
123 + insinto /etc/mosquitto
124 + doins mosquitto.conf
125 + systemd_dounit "${FILESDIR}/mosquitto.service"
126 +
127 + if use examples; then
128 + docompress -x "/usr/share/doc/${PF}/examples"
129 + insinto "/usr/share/doc/${PF}/examples"
130 + doins -r examples/*
131 + fi
132 +}
133 +
134 +pkg_postinst() {
135 + elog ""
136 + elog "The Python module has been moved out of mosquitto."
137 + elog "See http://mosquitto.org/documentation/python/"
138 + elog ""
139 + elog "To start the mosquitto daemon at boot, add it to the default runlevel with:"
140 + elog ""
141 + elog " rc-update add mosquitto default"
142 + elog " or"
143 + elog " systemctl enable mosquitto"
144 +}