summaryrefslogtreecommitdiff
path: root/pcr
diff options
context:
space:
mode:
Diffstat (limited to 'pcr')
-rw-r--r--pcr/mosquitto/PKGBUILD52
-rw-r--r--pcr/mosquitto/docbook.patch10
-rw-r--r--pcr/mosquitto/mosquitto.install15
-rw-r--r--pcr/mosquitto/mosquitto.service13
-rw-r--r--pcr/mosquitto/usr_move.patch13
5 files changed, 69 insertions, 34 deletions
diff --git a/pcr/mosquitto/PKGBUILD b/pcr/mosquitto/PKGBUILD
index 24bbd9961..d365ab360 100644
--- a/pcr/mosquitto/PKGBUILD
+++ b/pcr/mosquitto/PKGBUILD
@@ -1,44 +1,48 @@
# This is the PKGBUILD for mosquitto, an MQTT broker and example clients
-# Maintainer (Arch): Alexander Rust <mail at alr dot st>
-# Contributor (Arch): Dan Anderson <dan-anderson at cox dptnet>
+
+# Maintainer: Alexander Rust <mail at alr dot st>
+# Contributor: Dan Anderson <dan-anderson at cox dptnet>
pkgname=mosquitto
-pkgver=1.1.3
-pkgrel=3
+pkgver=1.3.2
+pkgrel=1
pkgdesc="An Open Source MQTT v3.1 Broker"
-arch=('i686' 'x86_64' 'arm' 'armv6h' 'mips64el')
+arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'mips64el')
url="http://mosquitto.org/"
-makedepends=('python')
-optdepends=('python: python support')
+depends=('openssl' 'c-ares')
+makedepends=('python' 'docbook-xsl' 'c-ares')
license=('BSD')
-source=(http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz{,.asc} "$pkgname.service"
- "binmerge.patch")
-md5sums=('fd0cae17221d778b0a002c31e6c3de9e'
+source=(http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz{,.asc} "$pkgname.service" "$pkgname.install" "docbook.patch" "usr_move.patch")
+install=$pkgname.install
+md5sums=('5d2fe7c8bf2518eb9829547751c04bbf'
'SKIP'
- '58af79ed48be928f91e5435cda82bb8b'
- '27e24b672d63b797f0e026ab85c64c4b')
+ '83dcdd5318ffe33d112b4b7a55269f05'
+ 'bfabddbce1d8c856cbb52517a7917d4c'
+ '8e1c14e99d7eba210b874e80b5153f0d'
+ 'b37551bbdccf751cdc5ea5b25afd2f5a')
prepare() {
- cd "$srcdir/$pkgname-$pkgver/src"
- patch -N -i ${srcdir}/binmerge.patch
+ cd "$srcdir/$pkgname-$pkgver"
+ #patch -p1 < ../docbook.patch
+ patch -p1 < ../usr_move.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver"
- make prefix=/usr
+ make
}
package() {
cd "$srcdir/$pkgname-$pkgver"
+
make prefix=/usr DESTDIR="$pkgdir/" install
-
- # Systemd service file
- install -Dm644 $srcdir/$pkgname.service $pkgdir/usr/lib/systemd/system/$pkgname.service
-
- # License files
- install -Dm644 LICENSE.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE
- install -Dm644 LICENSE-3rd-party.txt $pkgdir/usr/share/licenses/$pkgname/LICENSE-3rd-party
-}
-# vim:set ts=2 sw=2 et:
+ # systemd service file
+ install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"
+ echo 'pid_file /run/mosquitto.pid' >> "$pkgdir/etc/mosquitto/mosquitto.conf.example"
+
+ # license files
+ install -Dm644 LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ install -Dm644 LICENSE-3rd-party.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE-3rd-party"
+}
diff --git a/pcr/mosquitto/docbook.patch b/pcr/mosquitto/docbook.patch
new file mode 100644
index 000000000..b82a00789
--- /dev/null
+++ b/pcr/mosquitto/docbook.patch
@@ -0,0 +1,10 @@
+--- a/man/manpage.xsl 2013-06-02 17:22:59.958307000 +0200
++++ b/man/manpage.xsl 2013-06-02 17:34:17.441551534 +0200
+@@ -1,6 +1,6 @@
+ <!-- Set parameters for manpage xsl -->
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+- <xsl:import href="/usr/share/xml/docbook/stylesheet/docbook-xsl/manpages/docbook.xsl"/>
++ <xsl:import href="/usr/share/xml/docbook/xsl-stylesheets-1.78.1/manpages/docbook.xsl"/>
+ <!-- Don't display notes list of link urls. -->
+ <xsl:param name="man.endnotes.list.enabled">0</xsl:param>
+ <xsl:param name="man.endnotes.are.numbered">0</xsl:param>
diff --git a/pcr/mosquitto/mosquitto.install b/pcr/mosquitto/mosquitto.install
new file mode 100644
index 000000000..b2dfb9600
--- /dev/null
+++ b/pcr/mosquitto/mosquitto.install
@@ -0,0 +1,15 @@
+post_install() {
+ getent group mosquitto > /dev/null || groupadd mosquitto
+ getent passwd mosquitto > /dev/null || useradd -c 'Mosquitto MQTT Broker daemon' -d /etc/mosquitto -s /bin/false -g mosquitto mosquitto
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ post_install $1
+ echo "You may want to remove mosquitto user and group"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/pcr/mosquitto/mosquitto.service b/pcr/mosquitto/mosquitto.service
index 9626cbc45..388bcf7a9 100644
--- a/pcr/mosquitto/mosquitto.service
+++ b/pcr/mosquitto/mosquitto.service
@@ -1,10 +1,3 @@
-# This file is part of systemd.
-#
-# systemd is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-
[Unit]
Description=Mosquitto MQTT Broker daemon
ConditionPathExists=/etc/mosquitto/mosquitto.conf
@@ -12,11 +5,11 @@ Requires=network.target
[Service]
Type=forking
-ExecStart=/usr/bin/mosquitto -c /etc/mosquitto/mosquitto.conf -d
ExecStartPre=/usr/bin/rm -f /run/mosquitto.pid
+ExecStart=/usr/bin/mosquitto -c /etc/mosquitto/mosquitto.conf -d
+ExecReload=/bin/kill -HUP $MAINPID
PIDFile=/run/mosquitto.pid
-Restart=on-abort
+Restart=on-failure
[Install]
WantedBy=multi-user.target
-
diff --git a/pcr/mosquitto/usr_move.patch b/pcr/mosquitto/usr_move.patch
new file mode 100644
index 000000000..961ab8a36
--- /dev/null
+++ b/pcr/mosquitto/usr_move.patch
@@ -0,0 +1,13 @@
+--- a/src/Makefile 2013-06-03 03:03:05.321690000 +0200
++++ b/src/Makefile 2013-06-04 03:45:13.514436898 +0200
+@@ -96,8 +96,8 @@
+ ${CC} $(CFLAGS) ${CPPFLAGS} -c $< -o $@
+
+ install : all
+- $(INSTALL) -d ${DESTDIR}$(prefix)/sbin
+- $(INSTALL) -s mosquitto ${DESTDIR}${prefix}/sbin/mosquitto
++ $(INSTALL) -d ${DESTDIR}$(prefix)/bin
++ $(INSTALL) -s mosquitto ${DESTDIR}${prefix}/bin/mosquitto
+ $(INSTALL) mosquitto_plugin.h ${DESTDIR}${prefix}/include/mosquitto_plugin.h
+ ifeq ($(WITH_TLS),yes)
+ $(INSTALL) -s mosquitto_passwd ${DESTDIR}${prefix}/bin/mosquitto_passwd