2017-10-01 00:13:03 +02:00
|
|
|
################################################################################
|
|
|
|
#
|
|
|
|
# prosody
|
|
|
|
#
|
|
|
|
################################################################################
|
|
|
|
|
2018-12-07 05:34:21 +01:00
|
|
|
PROSODY_VERSION = 0.11.1
|
2017-10-01 00:13:03 +02:00
|
|
|
PROSODY_SITE = https://prosody.im/downloads/source
|
|
|
|
PROSODY_LICENSE = MIT
|
|
|
|
PROSODY_LICENSE_FILES = COPYING
|
2018-03-18 13:28:06 +01:00
|
|
|
PROSODY_DEPENDENCIES = host-luainterpreter luainterpreter libidn openssl
|
2017-10-01 00:13:03 +02:00
|
|
|
|
2018-04-03 06:45:24 +02:00
|
|
|
PROSODY_CFLAGS = $(TARGET_CFLAGS) -fPIC -std=c99 \
|
|
|
|
$(if BR2_TOOLCHAIN_USES_MUSL,-DWITHOUT_MALLINFO)
|
|
|
|
|
2017-10-18 18:46:48 +02:00
|
|
|
PROSODY_CONF_OPTS = \
|
2018-09-24 00:04:59 +02:00
|
|
|
--with-lua-bin=$(HOST_DIR)/bin \
|
2017-10-18 18:46:48 +02:00
|
|
|
--with-lua=$(STAGING_DIR)/usr \
|
2018-03-18 13:28:06 +01:00
|
|
|
--lua-version=$(LUAINTERPRETER_ABIVER) \
|
2017-10-18 18:46:48 +02:00
|
|
|
--c-compiler=$(TARGET_CC) \
|
2018-04-03 06:45:24 +02:00
|
|
|
--cflags="$(PROSODY_CFLAGS)" \
|
2017-10-18 18:46:48 +02:00
|
|
|
--linker=$(TARGET_CC) \
|
|
|
|
--ldflags="$(TARGET_LDFLAGS) -shared" \
|
|
|
|
--sysconfdir=/etc/prosody \
|
|
|
|
--prefix=/usr
|
|
|
|
|
2018-03-18 13:28:06 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LUAJIT),y)
|
|
|
|
PROSODY_CONF_OPTS += --runwith=luajit
|
|
|
|
endif
|
|
|
|
|
2017-10-01 00:13:03 +02:00
|
|
|
define PROSODY_CONFIGURE_CMDS
|
|
|
|
cd $(@D) && \
|
|
|
|
$(TARGET_CONFIGURE_OPTS) \
|
2017-10-18 18:46:48 +02:00
|
|
|
./configure $(PROSODY_CONF_OPTS)
|
2017-10-01 00:13:03 +02:00
|
|
|
endef
|
|
|
|
|
|
|
|
define PROSODY_BUILD_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define PROSODY_INSTALL_TARGET_CMDS
|
|
|
|
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR="$(TARGET_DIR)" -C $(@D) install
|
|
|
|
endef
|
|
|
|
|
|
|
|
define PROSODY_INSTALL_INIT_SYSV
|
|
|
|
$(INSTALL) -D -m 0755 package/prosody/S50prosody \
|
|
|
|
$(TARGET_DIR)/etc/init.d/S50prosody
|
|
|
|
endef
|
|
|
|
|
|
|
|
define PROSODY_USERS
|
|
|
|
prosody -1 prosody -1 * - - - Prosody user
|
|
|
|
endef
|
|
|
|
|
|
|
|
# make install installs a Makefile and meta data to generate certs
|
|
|
|
define PROSODY_REMOVE_CERT_GENERATOR
|
|
|
|
rm -f $(TARGET_DIR)/etc/prosody/certs/Makefile
|
|
|
|
rm -f $(TARGET_DIR)/etc/prosody/certs/*.cnf
|
|
|
|
endef
|
|
|
|
|
|
|
|
PROSODY_POST_INSTALL_TARGET_HOOKS += PROSODY_REMOVE_CERT_GENERATOR
|
|
|
|
|
|
|
|
$(eval $(generic-package))
|