From 6dcdc01be909f37d9b0a80fda2ced49f5567feb9 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Mon, 28 Jul 2014 19:30:51 -0300 Subject: mosquitto --- pcr/mosquitto/PKGBUILD | 52 ++++++++++++++++++++++------------------- pcr/mosquitto/docbook.patch | 10 ++++++++ pcr/mosquitto/mosquitto.install | 15 ++++++++++++ pcr/mosquitto/mosquitto.service | 13 +++-------- pcr/mosquitto/usr_move.patch | 13 +++++++++++ 5 files changed, 69 insertions(+), 34 deletions(-) create mode 100644 pcr/mosquitto/docbook.patch create mode 100644 pcr/mosquitto/mosquitto.install create mode 100644 pcr/mosquitto/usr_move.patch (limited to 'pcr/mosquitto') 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 -# Contributor (Arch): Dan Anderson + +# Maintainer: Alexander Rust +# Contributor: Dan Anderson 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 @@ + + +- ++ + + 0 + 0 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 -- cgit v1.2.3