leafnode2.mk 1.4 KB

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