source: packages/net/prosody/Makefile @ 18211

Last change on this file since 18211 was 18211, checked in by florian, 7 years ago

[package] fix more std=gnu99 lua related packages

File size: 2.5 KB
Line 
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
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=prosody
11PKG_VERSION:=0.5.2
12PKG_RELEASE:=1
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://prosody.im/downloads/source/
16PKG_MD5SUM:=bcc7828c041e53b2c909822b1acdf600
17
18include $(INCLUDE_DIR)/package.mk
19
20define 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
26endef
27
28define 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
32endef
33
34define Package/prosody/conffiles
35/etc/prosody/prosody.cfg.lua
36endef
37
38TARGET_CFLAGS += $(FPIC)
39
40define 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        )
49endef
50
51define Build/Compile
52        $(call Build/Compile/Default,\
53                CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -std=gnu99" \
54                LDFLAGS="$(TARGET_LDFLAGS)" \
55                DESTDIR="$(PKG_INSTALL_DIR)" \
56                PREFIX="/usr" \
57                all install \
58        )
59endef
60
61define 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/
80endef
81
82$(eval $(call BuildPackage,prosody))
Note: See TracBrowser for help on using the repository browser.