Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/mosquitto/
Date: Fri, 23 Mar 2018 22:27:47
Message-Id: 1521844059.2cee2c07a68cc9d0e9798a61d400ef4904219c94.mgorny@gentoo
1 commit: 2cee2c07a68cc9d0e9798a61d400ef4904219c94
2 Author: lramage94 <ramage.lucas <AT> openmailbox <DOT> org>
3 AuthorDate: Sun Mar 4 22:32:41 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Fri Mar 23 22:27:39 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2cee2c07
7
8 app-misc/mosquitto: bump version to 1.4.15
9
10 Closes: https://github.com/gentoo/gentoo/pull/7362
11 Package-Manager: Portage-2.3.19, Repoman-2.3.6
12
13 app-misc/mosquitto/Manifest | 1 +
14 app-misc/mosquitto/mosquitto-1.4.15.ebuild | 99 ++++++++++++++++++++++++++++++
15 2 files changed, 100 insertions(+)
16
17 diff --git a/app-misc/mosquitto/Manifest b/app-misc/mosquitto/Manifest
18 index 781bd37391c..e57c2e973ef 100644
19 --- a/app-misc/mosquitto/Manifest
20 +++ b/app-misc/mosquitto/Manifest
21 @@ -1 +1,2 @@
22 DIST mosquitto-1.4.14.tar.gz 365596 BLAKE2B 92bcb1fd9e67711d6ce8db5e767be31a1321866205cf4cad684d8b77a8b14a2eaf5e4367a74d5dd8f814f0d229dc77ce878879632c0c34c6a23f7975bf6ae8c7 SHA512 dc75a971354f87deeb79f32435acfae9bc561a1a24a75ee4940a35176ff91758071930d2105d8dee2a090e07527dbfaa5692bece67e03cc87e8b4b8b46f846c2
23 +DIST mosquitto-1.4.15.tar.gz 368961 BLAKE2B 28bfab7d41d9e057ba8b52e0c428967ecc5d0c25a3d73dca420ae883c2b462ee02da1eeb9c22f4d392f0ccf62224acab6f24d4a0798a594f4b9f90c907fa1495 SHA512 36b06547553cf28af3ca9b728c42fc27e849c4ae84d7964572d430233ab26e2b59eee2a215ac23ddf2d0bef419e7c70e64e2a22c397fadb3e0677314d03f1100
24
25 diff --git a/app-misc/mosquitto/mosquitto-1.4.15.ebuild b/app-misc/mosquitto/mosquitto-1.4.15.ebuild
26 new file mode 100644
27 index 00000000000..65dffc2f3f1
28 --- /dev/null
29 +++ b/app-misc/mosquitto/mosquitto-1.4.15.ebuild
30 @@ -0,0 +1,99 @@
31 +# Copyright 1999-2018 Gentoo Foundation
32 +# Distributed under the terms of the GNU General Public License v2
33 +
34 +EAPI=6
35 +PYTHON_COMPAT=( python2_7 )
36 +
37 +inherit systemd user toolchain-funcs python-any-r1
38 +
39 +DESCRIPTION="An Open Source MQTT v3 Broker"
40 +HOMEPAGE="http://mosquitto.org/"
41 +SRC_URI="http://mosquitto.org/files/source/${P}.tar.gz"
42 +
43 +LICENSE="EPL-1.0"
44 +SLOT="0"
45 +KEYWORDS="~amd64 ~arm ~x86"
46 +IUSE="bridge examples +persistence +srv ssl tcpd test websockets"
47 +
48 +REQUIRED_USE="test? ( bridge )"
49 +
50 +RDEPEND="tcpd? ( sys-apps/tcp-wrappers )
51 + ssl? ( dev-libs/openssl:0= )"
52 +DEPEND="${RDEPEND}
53 + ${PYTHON_DEPS}
54 + srv? ( net-dns/c-ares )
55 + websockets? ( net-libs/libwebsockets )"
56 +
57 +_emake() {
58 + LIBDIR=$(get_libdir)
59 + emake \
60 + CC="$(tc-getCC)" \
61 + LIB_SUFFIX="${LIBDIR:3}" \
62 + WITH_BRIDGE="$(usex bridge)" \
63 + WITH_PERSISTENCE="$(usex persistence)" \
64 + WITH_SRV="$(usex srv)" \
65 + WITH_TLS="$(usex ssl)" \
66 + WITH_WEBSOCKETS="$(usex websockets)" \
67 + WITH_WRAP="$(usex tcpd)" \
68 + "$@"
69 +}
70 +
71 +pkg_setup() {
72 + enewgroup mosquitto
73 + enewuser mosquitto -1 -1 -1 mosquitto
74 +}
75 +
76 +src_prepare() {
77 + if use persistence; then
78 + sed -i -e "/^#autosave_interval/s|^#||" \
79 + -e "s|^#persistence false$|persistence true|" \
80 + -e "/^#persistence_file/s|^#||" \
81 + -e "s|#persistence_location|persistence_location /var/lib/mosquitto/|" \
82 + mosquitto.conf || die
83 + fi
84 +
85 + # Remove prestripping
86 + sed -i -e 's/-s --strip-program=${CROSS_COMPILE}${STRIP}//'\
87 + client/Makefile lib/cpp/Makefile src/Makefile lib/Makefile || die
88 +
89 + python_setup
90 + python_fix_shebang test
91 + eapply_user
92 +}
93 +
94 +src_compile() {
95 + _emake
96 +}
97 +
98 +src_test() {
99 + _emake test
100 +}
101 +
102 +src_install() {
103 + _emake DESTDIR="${D}" prefix=/usr install
104 + keepdir /var/lib/mosquitto
105 + fowners mosquitto:mosquitto /var/lib/mosquitto
106 + dodoc readme.md CONTRIBUTING.md ChangeLog.txt
107 + doinitd "${FILESDIR}"/mosquitto
108 + insinto /etc/mosquitto
109 + doins mosquitto.conf
110 + systemd_dounit "${FILESDIR}/mosquitto.service"
111 +
112 + if use examples; then
113 + docompress -x "/usr/share/doc/${PF}/examples"
114 + docinto "/usr/share/doc/${PF}"
115 + doins -r examples
116 + fi
117 +}
118 +
119 +pkg_postinst() {
120 + elog ""
121 + elog "The Python module has been moved out of mosquitto."
122 + elog "See http://mosquitto.org/documentation/python/"
123 + elog ""
124 + elog "To start the mosquitto daemon at boot, add it to the default runlevel with:"
125 + elog ""
126 + elog " rc-update add mosquitto default"
127 + elog " or"
128 + elog " systemctl enable mosquitto"
129 +}