diff options
author | Thomas Krug | 2015-06-14 20:51:14 +0200 |
---|---|---|
committer | Thomas Krug | 2015-06-14 20:51:14 +0200 |
commit | 5752717a88c7230f3b74202586b8a89097ad31b0 (patch) | |
tree | 1f3620afecf633f49f13afc766eb714a9f8c36e6 | |
download | aur-5752717a88c7230f3b74202586b8a89097ad31b0.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 29 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | docbook.patch | 10 | ||||
-rw-r--r-- | mosquitto-hg.install | 15 | ||||
-rw-r--r-- | mosquitto.service | 16 | ||||
-rw-r--r-- | usr_move.patch | 13 |
6 files changed, 138 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b594704101ee --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,29 @@ +pkgbase = mosquitto-hg + pkgdesc = An Open Source MQTT v3.1 Broker + pkgver = 3070.db5147ce80f1 + pkgrel = 2 + url = http://mosquitto.org/ + install = mosquitto-hg.install + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + license = BSD + makedepends = mercurial + makedepends = python + makedepends = docbook-xsl + depends = openssl + provides = mosquitto + conflicts = mosquitto + source = mosquitto::hg+https://bitbucket.org/oojah/mosquitto#branch=1.2 + source = mosquitto.service + source = docbook.patch + source = usr_move.patch + md5sums = SKIP + md5sums = bac7f1ff5c13b9e04e82c875c5f2c422 + md5sums = 8e1c14e99d7eba210b874e80b5153f0d + md5sums = b37551bbdccf751cdc5ea5b25afd2f5a + +pkgname = mosquitto-hg + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8d9077df54ce --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Thomas Krug <t.krug@elektronenpumpe.de> +# Contributor: Thomas Krug <t.krug@elektronenpumpe.de> + +pkgname=mosquitto-hg +_hgname=mosquitto +pkgver=3070.db5147ce80f1 +pkgrel=2 +pkgdesc="An Open Source MQTT v3.1 Broker" +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h') +url="http://mosquitto.org/" +depends=('openssl') +makedepends=('mercurial' 'python' 'docbook-xsl') +conflicts=('mosquitto') +provides=('mosquitto') +license=('BSD') +install=$pkgname.install +source=("$_hgname::hg+https://bitbucket.org/oojah/mosquitto#branch=1.2" + 'mosquitto.service' + 'docbook.patch' + 'usr_move.patch') +md5sums=('SKIP' + 'bac7f1ff5c13b9e04e82c875c5f2c422' + '8e1c14e99d7eba210b874e80b5153f0d' + 'b37551bbdccf751cdc5ea5b25afd2f5a') + +pkgver() { + cd "$srcdir/$_hgname" + + echo $(hg identify -n).$(hg identify -i) +} + +build() { + cd "$srcdir/$_hgname" + + patch -p1 < ../docbook.patch + patch -p1 < ../usr_move.patch + + make +} + +package() { + cd "$srcdir/$_hgname" + + make prefix=/usr DESTDIR="$pkgdir/" install + + # systemd service file + install -Dm644 "$srcdir/mosquitto.service" "$pkgdir/usr/lib/systemd/system/mosquitto.service" + echo 'pid_file /run/mosquitto.pid' >> "$pkgdir/etc/mosquitto/mosquitto.conf" + + # 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: diff --git a/docbook.patch b/docbook.patch new file mode 100644 index 000000000000..b82a00789e6d --- /dev/null +++ b/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/mosquitto-hg.install b/mosquitto-hg.install new file mode 100644 index 000000000000..b2dfb9600b89 --- /dev/null +++ b/mosquitto-hg.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/mosquitto.service b/mosquitto.service new file mode 100644 index 000000000000..568aaa127504 --- /dev/null +++ b/mosquitto.service @@ -0,0 +1,16 @@ +[Unit] +Description=Mosquitto MQTT Broker daemon +ConditionPathExists=/etc/mosquitto/mosquitto.conf +Requires=network.target + +[Service] +Type=forking +ExecStartPre=/usr/bin/rm -f /run/mosquitto.pid +ExecStart=/usr/sbin/mosquitto -c /etc/mosquitto/mosquitto.conf -d +ExecReload=/bin/kill -HUP $MAINPID +PIDFile=/run/mosquitto.pid +Restart=on-failure + +[Install] +WantedBy=multi-user.target + diff --git a/usr_move.patch b/usr_move.patch new file mode 100644 index 000000000000..961ab8a36543 --- /dev/null +++ b/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 |