102 lines
2.7 KiB
Bash
102 lines
2.7 KiB
Bash
# Template file for 'mosquitto'
|
|
pkgname=mosquitto
|
|
version=2.0.18
|
|
revision=2
|
|
build_style=gnu-makefile
|
|
make_build_args="WITH_WEBSOCKETS=yes WITH_BUNDLED_DEPS=no"
|
|
make_install_args="prefix=/usr"
|
|
make_check_target=test
|
|
conf_files="/etc/mosquitto/mosquitto.conf"
|
|
makedepends="c-ares-devel openssl-devel uthash libwebsockets-devel cJSON-devel"
|
|
checkdepends="CUnit-devel python3"
|
|
short_desc="MQTT version 3.1/3.1.1/5.0 compatible message broker"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="EPL-1.0, BSD-3-Clause-Attribution"
|
|
homepage="https://mosquitto.org"
|
|
distfiles="${homepage}/files/source/${pkgname}-${version}.tar.gz"
|
|
checksum=d665fe7d0032881b1371a47f34169ee4edab67903b2cd2b4c083822823f4448a
|
|
# testing too long ?
|
|
make_check="ci-skip"
|
|
|
|
system_accounts="_mosquitto"
|
|
_mosquitto_homedir="/var/lib/mosquitto"
|
|
make_dirs="/var/lib/mosquitto 0755 ${system_accounts} ${system_accounts}"
|
|
|
|
CFLAGS="-fcommon"
|
|
|
|
post_extract() {
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
*-musl)
|
|
post_extract() {
|
|
vsed -e 's/-lanl//' -i config.mk
|
|
}
|
|
esac
|
|
}
|
|
|
|
pre_check() {
|
|
# fd, addr = self._accept() # socket.timeout: timed out
|
|
vsed -i test/lib/Makefile -e /02-subscribe-qos/d
|
|
}
|
|
|
|
pre_install() {
|
|
sed -i 's,sbin,bin,g' */Makefile
|
|
}
|
|
|
|
post_install() {
|
|
vlicense edl-v10 LICENSE
|
|
mv ${DESTDIR}/etc/${pkgname}/${pkgname}.conf.example \
|
|
${DESTDIR}/etc/${pkgname}/${pkgname}.conf
|
|
vmkdir usr/share/examples/${pkgname}
|
|
mv ${DESTDIR}/etc/${pkgname}/*.example \
|
|
${DESTDIR}/usr/share/examples/${pkgname}
|
|
vsv mosquitto
|
|
}
|
|
|
|
mosquitto-clients_package() {
|
|
short_desc="Mosquitto command line MQTT clients"
|
|
pkg_install() {
|
|
vmove usr/bin/mosquitto_pub
|
|
vmove usr/bin/mosquitto_sub
|
|
vmove usr/share/man/man1/mosquitto_pub.1
|
|
vmove usr/share/man/man1/mosquitto_sub.1
|
|
}
|
|
}
|
|
|
|
libmosquitto_package() {
|
|
short_desc="MQTT version 3.1/3.1.1/5.0 client library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libmosquitto.so.*"
|
|
}
|
|
}
|
|
|
|
libmosquitto-devel_package() {
|
|
short_desc="MQTT version 3.1/3.1.1/5.0 client library - development files"
|
|
depends="libmosquitto-${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include/mqtt_protocol.h
|
|
vmove usr/include/mosquitto.h
|
|
vmove usr/include/mosquitto_plugin.h
|
|
vmove usr/include/mosquitto_broker.h
|
|
vmove usr/lib/libmosquitto.so
|
|
vmove usr/share/man/man3/libmosquitto.3
|
|
vmove usr/lib/pkgconfig/libmosquitto.pc
|
|
}
|
|
}
|
|
|
|
libmosquittopp_package() {
|
|
short_desc="MQTT version 3.1/3.1.1/5.0 C++ client library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libmosquittopp.so.*"
|
|
}
|
|
}
|
|
|
|
libmosquittopp-devel_package() {
|
|
short_desc="MQTT version 3.1/3.1.1/5.0 C++ client library - development files"
|
|
depends="libmosquittopp-${version}_${revision} libmosquitto-devel-${version}_${revision}"
|
|
pkg_install() {
|
|
vmove usr/include/mosquittopp.h
|
|
vmove usr/lib/libmosquittopp.so
|
|
vmove usr/lib/pkgconfig/libmosquittopp.pc
|
|
}
|
|
}
|