aboutsummaryrefslogtreecommitdiffstats
path: root/main/mosquitto
diff options
context:
space:
mode:
Diffstat (limited to 'main/mosquitto')
-rw-r--r--main/mosquitto/APKBUILD19
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/
}