diff options
Diffstat (limited to 'package')
-rw-r--r-- | package/c-ares/Makefile | 28 | ||||
-rw-r--r-- | package/mosquitto/Makefile | 46 | ||||
-rw-r--r-- | package/mosquitto/files/mosquitto.init | 29 | ||||
-rw-r--r-- | package/mosquitto/files/mosquitto.postinst | 7 |
4 files changed, 110 insertions, 0 deletions
diff --git a/package/c-ares/Makefile b/package/c-ares/Makefile new file mode 100644 index 000000000..e0b79ca90 --- /dev/null +++ b/package/c-ares/Makefile @@ -0,0 +1,28 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= c-ares +PKG_VERSION:= 1.10.0 +PKG_RELEASE:= 1 +PKG_HASH:= 3d701674615d1158e56a59aaede7891f2dde3da0f46a6d3c684e0ae70f52d3db +PKG_DESCR:= c-ares asynchronous dns lib +PKG_SECTION:= libs/net +PKG_URL:= http://c-ares.haxx.se +PKG_SITES:= http://c-ares.haxx.se/download/ +PKG_OPTS:= dev + +# if downloaded package is not ending with .tar.xz use following +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,C_ARES,c-ares,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS})) + +c-ares-install: + $(INSTALL_DIR) $(IDIR_C_ARES)/usr/lib + $(CP) $(WRKINST)/usr/lib/libcares*.so* \ + $(IDIR_C_ARES)/usr/lib + +include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mosquitto/Makefile b/package/mosquitto/Makefile new file mode 100644 index 000000000..206099b15 --- /dev/null +++ b/package/mosquitto/Makefile @@ -0,0 +1,46 @@ +# This file is part of the OpenADK project. OpenADK is copyrighted +# material, please see the LICENCE file in the top-level directory. + +include $(ADK_TOPDIR)/rules.mk + +PKG_NAME:= mosquitto +PKG_VERSION:= 1.3.5 +PKG_RELEASE:= 1 +PKG_HASH:= 16eb3dbef183827665feee9288362c7352cd016ba04ca0402a0ccf857d1c2ab2 +PKG_DESCR:= MQTT Broker +PKG_SECTION:= net/misc +PKG_DEPENDS:= c-ares +PKG_BUILDDEP:= cmake-host c-ares +PKG_URL:= http://mosquitto.org +PKG_SITES:= http://mosquitto.org/files/source/ + +# if downloaded package is not ending with .tar.xz use following +DISTFILES:= ${PKG_NAME}-${PKG_VERSION}.tar.gz + +include $(ADK_TOPDIR)/mk/package.mk + +$(eval $(call PKG_template,MOSQUITTO,mosquitto,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION})) + +CONFIG_STYLE:= manual + +do-configure: + (cd ${WRKBUILD} && PATH='${HOST_PATH}' \ + cmake -DCMAKE_SYSTEM_NAME=Linux .) + +mosquitto-install: + $(INSTALL_DIR) $(IDIR_MOSQUITTO)/usr/bin + $(INSTALL_DIR) $(IDIR_MOSQUITTO)/usr/sbin + $(INSTALL_DIR) $(IDIR_MOSQUITTO)/usr/lib + $(INSTALL_DIR) $(IDIR_MOSQUITTO)/etc/mosquitto + $(INSTALL_BIN) $(WRKINST)/usr/local/bin/mosquitto* \ + $(IDIR_MOSQUITTO)/usr/bin + $(INSTALL_BIN) $(WRKINST)/usr/local/sbin/mosquitto* \ + $(IDIR_MOSQUITTO)/usr/sbin + $(INSTALL_DATA) $(WRKINST)/etc/mosquitto/* \ + $(IDIR_MOSQUITTO)/etc/mosquitto + $(CP) $(WRKINST)/usr/local/lib/*.so* \ + $(IDIR_MOSQUITTO)/usr/lib + + + +include ${ADK_TOPDIR}/mk/pkg-bottom.mk diff --git a/package/mosquitto/files/mosquitto.init b/package/mosquitto/files/mosquitto.init new file mode 100644 index 000000000..7b9c7a827 --- /dev/null +++ b/package/mosquitto/files/mosquitto.init @@ -0,0 +1,29 @@ +#!/bin/sh +#PKG mosquitto +#INIT 60 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${mosquitto:-NO}" = x"NO" && exit 0 + test x"$mosquitto" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + [ -d /var/lib/mosquitto ] || mkdir -p /var/lib/mosquitto + /usr/sbin/mosquitto $mosquitto_flags + ;; +stop) + kill $(pgrep -f /usr/sbin/mosquitto) + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/mosquitto/files/mosquitto.postinst b/package/mosquitto/files/mosquitto.postinst new file mode 100644 index 000000000..5c39e9bde --- /dev/null +++ b/package/mosquitto/files/mosquitto.postinst @@ -0,0 +1,7 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf mosquitto NO +add_rcconf mosquitto_flags '' +gid=$(get_next_gid) +add_group mosquitto $gid +add_user mosquitto $(get_next_uid) $gid /etc/mosquitto |