diff options
Diffstat (limited to 'chat/prosody')
-rw-r--r-- | chat/prosody/Makefile | 53 | ||||
-rw-r--r-- | chat/prosody/distinfo | 9 | ||||
-rw-r--r-- | chat/prosody/files/smf/manifest.xml | 30 | ||||
-rw-r--r-- | chat/prosody/patches/patch-util-src_Makefile | 24 |
4 files changed, 81 insertions, 35 deletions
diff --git a/chat/prosody/Makefile b/chat/prosody/Makefile index 60d5200e66e..f9eace268f2 100644 --- a/chat/prosody/Makefile +++ b/chat/prosody/Makefile @@ -1,8 +1,7 @@ -# $NetBSD: Makefile,v 1.17 2014/10/19 22:27:43 alnsn Exp $ +# $NetBSD: Makefile,v 1.18 2014/11/27 10:18:20 fhajny Exp $ # -DISTNAME= prosody-0.9.4 -PKGREVISION= 2 +DISTNAME= prosody-0.9.7 CATEGORIES= chat MASTER_SITES= http://prosody.im/downloads/source/ @@ -11,18 +10,16 @@ HOMEPAGE= http://prosody.im/ COMMENT= Flexible communications server for Jabber/XMPP written in Lua LICENSE= mit -DEPENDS+= ${LUA_PKGPREFIX}-filesystem>=1.0:../../devel/lua-filesystem -DEPENDS+= ${LUA_PKGPREFIX}-expat>=1.2:../../textproc/lua-expat -DEPENDS+= ${LUA_PKGPREFIX}-sec>=0.3.3:../../security/lua-sec -DEPENDS+= ${LUA_PKGPREFIX}-socket>=2.0:../../net/lua-socket +DEPENDS+= ${LUA_PKGPREFIX}-expat>=1.2:../../textproc/lua-expat +DEPENDS+= ${LUA_PKGPREFIX}-filesystem>=1.0:../../devel/lua-filesystem +DEPENDS+= ${LUA_PKGPREFIX}-sec>=0.3.3:../../security/lua-sec +DEPENDS+= ${LUA_PKGPREFIX}-socket>=2.0:../../net/lua-socket HAS_CONFIGURE= yes USE_TOOLS+= gmake BUILD_DEFS+= VARBASE -CONFIGURE_ARGS+= --with-lua-include=${PREFIX}/${LUA_INCDIR} - -RCD_SCRIPTS= prosody +LUA_VERSIONS_ACCEPTED= 51 .include "../../mk/bsd.prefs.mk" @@ -32,7 +29,6 @@ PROSODY_DATA?= ${VARBASE}/db/prosody PROSODY_LOG?= ${VARBASE}/log/prosody PROSODY_RUN?= ${VARBASE}/run/prosody -OWN_DIRS+= ${PROSODY_DATA} ${PROSODY_LOG} ${PROSODY_RUN} OWN_DIRS_PERMS+= ${PROSODY_DATA} ${PROSODY_USER} ${PROSODY_GROUP} 0770 OWN_DIRS_PERMS+= ${PROSODY_LOG} ${PROSODY_USER} ${PROSODY_GROUP} 0770 OWN_DIRS_PERMS+= ${PROSODY_RUN} ${PROSODY_USER} ${PROSODY_GROUP} 0770 @@ -56,34 +52,29 @@ CONF_FILES+= ${EGDIR}/certs/localhost.cnf ${PKG_SYSCONFDIR}/certs/localhost.cnf CONF_FILES+= ${EGDIR}/certs/localhost.crt ${PKG_SYSCONFDIR}/certs/localhost.crt CONF_FILES+= ${EGDIR}/certs/localhost.key ${PKG_SYSCONFDIR}/certs/localhost.key -CFLAGS+= -fPIC -Wall -DLUA_COMPAT_MODULE - REPLACE_LUA+= prosody prosodyctl -CONFIGURE_ARGS+= --prefix=${PREFIX} -CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +SUBST_CLASSES+= path +SUBST_MESSAGE.path= Fixing default paths +SUBST_STAGE.path= pre-configure +SUBST_FILES.path= Makefile man/prosodyctl.man prosody.cfg.lua.dist +SUBST_SED.path= -e 's,/etc/prosody,${PKG_SYSCONFDIR},g' +SUBST_VARS.path= EGDIR PROSODY_DATA PROSODY_LOG PROSODY_RUN + +CONFIGURE_ARGS+= --cflags=${CFLAGS:Q} CONFIGURE_ARGS+= --datadir=${PROSODY_DATA} CONFIGURE_ARGS+= --ldflags="${COMPILER_RPATH_FLAG}${PREFIX}/lib -shared" -CONFIGURE_ARGS+= --cflags=${CFLAGS:Q} +CONFIGURE_ARGS+= --prefix=${PREFIX} +CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR} +CONFIGURE_ARGS+= --with-lua-include=${PREFIX}/${LUA_INCDIR} -SUBST_CLASSES+= eg -SUBST_MESSAGE.eg= Fixing examples/configuration directories -SUBST_STAGE.eg= post-patch -SUBST_FILES.eg= Makefile man/prosodyctl.man -SUBST_SED.eg= -e 's,@EGDIR@,${EGDIR},g' -SUBST_SED.eg+= -e 's,/etc/prosody,${PKG_SYSCONFDIR},g' - -SUBST_CLASSES+= config -SUBST_MESSAGE.config= Configure POSIX functionality -SUBST_STAGE.config= pre-configure -SUBST_FILES.config= prosody.cfg.lua.dist -SUBST_SED.config= -e 's,@PROSODY_DATA@,${PROSODY_DATA},' -SUBST_SED.config+= -e 's,@PROSODY_LOG@,${PROSODY_LOG},' -SUBST_SED.config+= -e 's,@PROSODY_RUN@,${PROSODY_RUN},' +CFLAGS+= -fPIC -Wall -DLUA_COMPAT_MODULE +MAKE_ENV+= SOCKET_LIB=-lsocket + +RCD_SCRIPTS= prosody .include "../../lang/lua/application.mk" .include "../../lang/lua/tool.mk" - .include "../../devel/libidn/buildlink3.mk" .include "../../lang/lua/buildlink3.mk" .include "../../security/openssl/buildlink3.mk" diff --git a/chat/prosody/distinfo b/chat/prosody/distinfo index e37d4a82cc0..b82251d90fb 100644 --- a/chat/prosody/distinfo +++ b/chat/prosody/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.7 2014/04/07 20:32:20 fhajny Exp $ +$NetBSD: distinfo,v 1.8 2014/11/27 10:18:20 fhajny Exp $ -SHA1 (prosody-0.9.4.tar.gz) = 102357e4682b053b5fa37fbc91d66b6d8923e987 -RMD160 (prosody-0.9.4.tar.gz) = f47253e92e9eba605193dc9e5ecd403e89ba23d6 -Size (prosody-0.9.4.tar.gz) = 265898 bytes +SHA1 (prosody-0.9.7.tar.gz) = 5515e15077ea0e8e26b83614a02ad632374a256b +RMD160 (prosody-0.9.7.tar.gz) = 841f40b33852d2a67ab7b39892e1679bffd9a181 +Size (prosody-0.9.7.tar.gz) = 266638 bytes SHA1 (patch-aa) = 3b4084a887b373bfdbef28028a4630bf9e26c17d SHA1 (patch-ab) = 755dd6d77689ef56ea4468f943f149933be72378 SHA1 (patch-ad) = abcae34982fee846c00252be1c0b033a44ad65d0 SHA1 (patch-prosodyctl) = e3e3a8f03c6d7c74b9026cf7ada765ee86c8397e +SHA1 (patch-util-src_Makefile) = be6d7dd7224a56687238a85827756c109d068a96 diff --git a/chat/prosody/files/smf/manifest.xml b/chat/prosody/files/smf/manifest.xml new file mode 100644 index 00000000000..4c21f47007e --- /dev/null +++ b/chat/prosody/files/smf/manifest.xml @@ -0,0 +1,30 @@ +<?xml version="1.0"?> +<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1"> +<service_bundle type="manifest" name="@SMF_NAME@"> + <service name="@SMF_PREFIX@/@SMF_NAME@" type="service" version="1"> + <create_default_instance enabled="false" /> + <single_instance /> + <dependency name="network" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/milestone/network:default" /> + </dependency> + <dependency name="filesystem" grouping="require_all" restart_on="error" type="service"> + <service_fmri value="svc:/system/filesystem/local" /> + </dependency> + <method_context></method_context> + <exec_method type="method" name="start" exec="@PREFIX@/bin/prosodyctl start" timeout_seconds="600" /> + <exec_method type="method" name="stop" exec="@PREFIX@/bin/prosodyctl stop" timeout_seconds="600" /> + <property_group name="startd" type="framework"> + <propval name="duration" type="astring" value="contract" /> + <propval name="ignore_error" type="astring" value="core,signal" /> + </property_group> + <property_group name="application" type="application"> + <propval name="config_file" type="astring" value="@PKG_SYSCONFDIR@/prosody.cfg.lua" /> + </property_group> + <stability value="Evolving" /> + <template> + <common_name> + <loctext xml:lang="C">Prosody XMPP server</loctext> + </common_name> + </template> + </service> +</service_bundle> diff --git a/chat/prosody/patches/patch-util-src_Makefile b/chat/prosody/patches/patch-util-src_Makefile new file mode 100644 index 00000000000..2cf4ca29e69 --- /dev/null +++ b/chat/prosody/patches/patch-util-src_Makefile @@ -0,0 +1,24 @@ +$NetBSD: patch-util-src_Makefile,v 1.1 2014/11/27 10:18:20 fhajny Exp $ + +We need libsocket on SunOS at least, for getifaddrs. +--- util-src/Makefile.orig 2014-10-24 22:30:55.000000000 +0000 ++++ util-src/Makefile +@@ -6,6 +6,7 @@ LUA_INCDIR?=/usr/include/lua$(LUA_SUFFIX + LUA_LIB?=lua$(LUA_SUFFIX) + IDN_LIB?=idn + OPENSSL_LIB?=crypto ++SOCKET_LIB?= + CC?=gcc + CXX?=g++ + LD?=gcc +@@ -32,6 +33,10 @@ hashes.so: hashes.o + MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; + $(CC) -o $@ $< $(LDFLAGS) -l$(OPENSSL_LIB) + ++net.so: net.o ++ MACOSX_DEPLOYMENT_TARGET="10.3"; export MACOSX_DEPLOYMENT_TARGET; ++ $(CC) -o $@ $< $(LDFLAGS) $(SOCKET_LIB) ++ + .c.o: + $(CC) $(CFLAGS) -I$(LUA_INCDIR) -c -o $@ $< + |