2 # Copyright (C) 2009-2011 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
8 include $(TOPDIR)/rules.mk
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://prosody.im/downloads/source
16 PKG_MD5SUM:=5da59bc906419ad3b4faa21516a6ca18
20 include $(INCLUDE_DIR)/package.mk
22 define Package/prosody
25 SUBMENU:=Instant Messaging
26 DEPENDS:=+luafilesystem +libidn +luaexpat +luasec
28 URL:=http://prosody.im/
31 define Package/prosody/description
32 Prosody is an exciting new server for Jabber/XMPP
33 written in Lua. It aims to be easy to use, and light
37 define Package/prosody/conffiles
38 /etc/prosody/prosody.cfg.lua
41 TARGET_CFLAGS += $(FPIC)
43 define Build/Configure
44 # this is *NOT* GNU autoconf stuff
45 (cd $(PKG_BUILD_DIR); ./configure \
47 --with-lua="$(STAGING_DIR)/host/bin" \
48 --with-lua-include="$(STAGING_DIR)/usr/include" \
49 --with-lua-lib="$(STAGING_DIR)/usr/lib" \
50 --cflags="$(TARGET_CFLAGS)" \
51 --datadir="/etc/prosody/data" \
56 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
57 LDFLAGS="$(TARGET_LDFLAGS)" \
60 define Package/prosody/install
61 $(INSTALL_DIR) $(1)/etc/init.d
62 $(INSTALL_BIN) ./files/prosody.init $(1)/etc/init.d/prosody
63 $(INSTALL_DIR) $(1)/etc/prosody
64 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/prosody/prosody.cfg.lua $(1)/etc/prosody/
65 $(INSTALL_DIR) $(1)/etc/prosody/certs
66 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/prosody/certs/localhost.{cert,key} $(1)/etc/prosody/certs/
67 $(INSTALL_DIR) $(1)/etc/prosody/data
68 $(INSTALL_DIR) $(1)/usr/bin
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prosody{,ctl} $(1)/usr/bin/
70 $(INSTALL_DIR) $(1)/usr/lib/prosody
71 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/
72 $(INSTALL_DIR) $(1)/usr/lib/prosody/core
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/
74 $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
75 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/
76 $(INSTALL_DIR) $(1)/usr/lib/prosody/modules
77 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/
78 $(INSTALL_DIR) $(1)/usr/lib/prosody/modules/muc
79 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/muc/*.lua $(1)/usr/lib/prosody/modules/muc/
80 $(INSTALL_DIR) $(1)/usr/lib/prosody/net
81 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/
82 $(INSTALL_DIR) $(1)/usr/lib/prosody/util
83 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.lua $(1)/usr/lib/prosody/util/
84 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.so $(1)/usr/lib/prosody/util/
87 $(eval $(call BuildPackage,prosody))