leafnode2.mk 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ################################################################################
  2. #
  3. # leafnode2
  4. #
  5. ################################################################################
  6. LEAFNODE2_VERSION = ce7d3b13fb285c9fb7bffc382ea10fd41e12582d
  7. LEAFNODE2_SITE = $(call gitlab,leafnode-2,leafnode-2,$(LEAFNODE2_VERSION))
  8. LEAFNODE2_LICENSE = LGPL-2.1
  9. LEAFNODE2_LICENSE_FILES = COPYING COPYING.LGPL
  10. LEAFNODE2_DEPENDENCIES = host-pcre pcre
  11. LEAFNODE2_AUTORECONF = YES
  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 separate 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))