xref: /OK3568_Linux_fs/buildroot/package/leafnode2/leafnode2.mk (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1################################################################################
2#
3# leafnode2
4#
5################################################################################
6
7LEAFNODE2_VERSION = 2.0.0.alpha20140727b
8LEAFNODE2_SOURCE = leafnode-$(LEAFNODE2_VERSION).tar.bz2
9LEAFNODE2_SITE = http://krusty.dt.e-technik.tu-dortmund.de/~ma/leafnode/beta
10LEAFNODE2_LICENSE = LGPL-2.1
11LEAFNODE2_LICENSE_FILES = COPYING COPYING.LGPL
12LEAFNODE2_DEPENDENCIES = host-pcre pcre
13
14LEAFNODE2_CONF_ENV = \
15	PCRECONFIG="$(STAGING_DIR)/usr/bin/pcre-config"
16
17# --enable-runas-user use 'news' as default but the configure stop
18# if news doesn't exist on the build host.
19# Use 'root' while cross-compiling
20LEAFNODE2_CONF_OPTS = \
21	--sysconfdir=/etc/leafnode2 \
22	--enable-spooldir=/var/spool/news \
23	--enable-runas-user=root
24
25# Leafnode2 needs the host version of b_sortnl during
26# compilation. Instead of creating a seperate host package and
27# installing b_sortnl to $(HOST_DIR) this binary is compiled
28# on-the-fly, host-pcre is needed for this
29define LEAFNODE2_BUILD_SORTNL_TOOL
30	cd $(@D); \
31	$(HOSTCC) $(HOST_CFLAGS) -o b_sortnl_host \
32		arc4random.c mergesort.c b_sortnl.c critmem_malloc.c \
33		critmem_realloc.c -DHAVE_CONFIG_H -I$(HOST_DIR)/include \
34		-L $(HOST_DIR)/lib -Wl,-rpath,$(HOST_DIR)/lib -lpcre
35endef
36
37LEAFNODE2_PRE_BUILD_HOOKS += LEAFNODE2_BUILD_SORTNL_TOOL
38
39define LEAFNODE2_USERS
40	news -1 news -1 * - - - Leafnode2 daemon
41endef
42
43$(eval $(autotools-package))
44