diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-15 22:01:23 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-10-15 22:01:23 +0200 |
commit | ab936c4354b0354d5bd4788089eb7f7dd714b8a5 (patch) | |
tree | a6339bbdb240211f28e1739ae8d2d4134e079d8a /main/mosquitto | |
parent | ce987a081201304534c2d5841302ae314b4218aa (diff) | |
download | aports-ab936c4354b0354d5bd4788089eb7f7dd714b8a5.tar.bz2 aports-ab936c4354b0354d5bd4788089eb7f7dd714b8a5.tar.xz |
main/mosquitto: improve abuild
Diffstat (limited to 'main/mosquitto')
-rw-r--r-- | main/mosquitto/APKBUILD | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/main/mosquitto/APKBUILD b/main/mosquitto/APKBUILD index 1486d7133c..5db6595953 100644 --- a/main/mosquitto/APKBUILD +++ b/main/mosquitto/APKBUILD @@ -14,21 +14,15 @@ install="$pkgname.pre-install" subpackages="$pkgname-dev $pkgname-doc $pkgname-libs++:_pp $pkgname-libs $pkgname-clients" replaces="mosquitto-utils" -source="http://mosquitto.org/files/source/mosquitto-$pkgver.tar.gz +source="http://mosquitto.org/files/source/$pkgname-$pkgver.tar.gz libressl.patch mosquitto.initd" +builddir="$srcdir/$pkgname-$pkgver" -builddir="$srcdir"/mosquitto-$pkgver prepare() { - local i - cd "$builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done + default_prepare || return 1 - sed -i "s|prefix=/usr/local|prefix=/usr|" config.mk + sed -i "s|prefix=/usr/local|prefix=/usr|" config.mk || return 1 # dont strip sed -i -e "s|(INSTALL) -s|(INSTALL)|g" \ -e 's|--strip-program=${CROSS_COMPILE}${STRIP}||' \ @@ -48,17 +42,21 @@ build() { package() { cd "$builddir" + make prefix=/usr DESTDIR="$pkgdir" install || return 1 + mv "$pkgdir"/etc/mosquitto/mosquitto.conf.example \ "$pkgdir"/etc/mosquitto/mosquitto.conf || return 1 sed -i -e 's/#log_dest stderr/log_dest syslog/' \ "$pkgdir"/etc/mosquitto/mosquitto.conf || return 1 + install -Dm755 "$srcdir"/mosquitto.initd "$pkgdir"/etc/init.d/mosquitto } _pp() { pkgdesc="C++ wrapper for libmosquitto" replaces= + mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libmosquittopp.so.* "$subpkgdir"/usr/lib/ } @@ -66,6 +64,7 @@ _pp() { clients() { pkgdesc="Mosquitto command line MQTT clients" replaces="mosquitto-utils" + mkdir -p "$subpkgdir"/usr/bin mv "$pkgdir"/usr/bin/mosquitto_[ps]ub "$subpkgdir"/usr/bin/ } |