[package] update prosody to 0.5.2 (#5920)
[openwrt/svn-archive/archive.git] / net / prosody / Makefile
1 #
2 # Copyright (C) 2009 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=prosody
11 PKG_VERSION:=0.5.2
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=http://prosody.im/downloads/source/
16 PKG_MD5SUM:=bcc7828c041e53b2c909822b1acdf600
17
18 include $(INCLUDE_DIR)/package.mk
19
20 define Package/prosody
21 SECTION:=net
22 CATEGORY:=Network
23 DEPENDS:=+liblua +libidn +libopenssl +luasocket +luaexpat +luasec
24 TITLE:=XMPP server
25 URL:=http://prosody.im
26 endef
27
28 define Package/prosody/description
29 Prosody is an exciting new server for Jabber/XMPP
30 written in Lua. It aims to be easy to use, and light
31 on resources
32 endef
33
34 define Package/prosody/conffiles
35 /etc/prosody/prosody.cfg.lua
36 endef
37
38 TARGET_CFLAGS += $(FPIC)
39
40 define Build/Configure
41 # this is *NOT* GNU autoconf stuff
42 (cd $(PKG_BUILD_DIR); ./configure \
43 --prefix=/usr \
44 --with-lua="$(STAGING_DIR)/host/bin" \
45 --with-lua-include="$(STAGING_DIR)/usr/include" \
46 --with-lua-lib="$(STAGING_DIR)/usr/lib" \
47 --cflags="$(TARGET_CFLAGS)" \
48 )
49 endef
50
51 define Build/Compile
52 $(call Build/Compile/Default,\
53 CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
54 LDFLAGS="$(TARGET_LDFLAGS)" \
55 DESTDIR="$(PKG_INSTALL_DIR)" \
56 PREFIX="/usr" \
57 all install \
58 )
59 endef
60
61 define Package/prosody/install
62 $(INSTALL_DIR) $(1)/etc/prosody
63 $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/prosody/prosody.cfg.lua $(1)/etc/prosody/
64 $(INSTALL_DIR) $(1)/etc/prosody/certs
65 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/etc/prosody/certs/localhost.{cert,key} $(1)/etc/prosody/certs/
66 $(INSTALL_DIR) $(1)/usr/bin
67 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/prosody{,ctl} $(1)/usr/bin/
68 $(INSTALL_DIR) $(1)/usr/lib/prosody
69 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/prosody/prosody.version $(1)/usr/lib/prosody/
70 $(INSTALL_DIR) $(1)/usr/lib/prosody/core
71 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/core/*.lua $(1)/usr/lib/prosody/core/
72 $(INSTALL_DIR) $(1)/usr/lib/prosody/fallbacks
73 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/fallbacks/*.lua $(1)/usr/lib/prosody/fallbacks/
74 $(INSTALL_DIR) $(1)/usr/lib/prosody/modules
75 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/modules/*.lua $(1)/usr/lib/prosody/modules/
76 $(INSTALL_DIR) $(1)/usr/lib/prosody/net
77 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/net/*.lua $(1)/usr/lib/prosody/net/
78 $(INSTALL_DIR) $(1)/usr/lib/prosody/util
79 $(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/prosody/util/*.{lua,so} $(1)/usr/lib/prosody/util/
80 endef
81
82 $(eval $(call BuildPackage,prosody))