Skip to content

Instantly share code, notes, and snippets.

@binarybucks
Last active December 18, 2015 02:39
Show Gist options
  • Save binarybucks/5712220 to your computer and use it in GitHub Desktop.
Save binarybucks/5712220 to your computer and use it in GitHub Desktop.
Mosquitto PKGBUILD
# This is the PKGBUILD for mosquitto, an MQTT broker and example clients
# Maintainer: Alexander Rust <mail at alr dot st>
# Contributor: Dan Anderson <dan-anderson at cox dptnet>
pkgname=mosquitto
pkgver=1.1.3
pkgrel=3
pkgdesc="An Open Source MQTT v3.1 Broker"
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h')
url="http://mosquitto.org/"
depends=('openssl')
makedepends=('python' 'docbook-xsl')
conflicts=('mosquitto-hg')
provides=('mosquitto')
license=('BSD')
source=(http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz{,.asc} "$pkgname.service" "$pkgname.install" "docbook.patch" "usr_move.patch")
install=$pkgname.install
md5sums=('fd0cae17221d778b0a002c31e6c3de9e'
'SKIP'
'bac7f1ff5c13b9e04e82c875c5f2c422'
'bfabddbce1d8c856cbb52517a7917d4c'
'8e1c14e99d7eba210b874e80b5153f0d'
'b37551bbdccf751cdc5ea5b25afd2f5a')
build() {
cd "$srcdir/$pkgname-$pkgver"
patch -p1 < ../docbook.patch
patch -p1 < ../usr_move.patch
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"
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"
}
~
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment