You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
2.1 KiB

  1. #
  2. # Copyright (C) 2006-2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libdaemon
  9. PKG_VERSION:=0.14
  10. PKG_RELEASE:=5
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/
  13. PKG_MD5SUM:=509dc27107c21bcd9fbf2f95f5669563
  14. PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
  15. PKG_FIXUP:=autoreconf
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/libdaemon
  19. SECTION:=libs
  20. CATEGORY:=Libraries
  21. TITLE:=A lightweight C library that eases the writing of UNIX daemons
  22. URL:=http://0pointer.de/lennart/projects/libdaemon/
  23. endef
  24. define Package/libdaemon/description
  25. libdaemon is a lightweight C library that eases the writing of UNIX daemons.
  26. It consists of the following parts:
  27. - A wrapper around fork() which does the correct daemonization procedure of a process
  28. - A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR
  29. - An API for writing PID files
  30. - An API for serializing UNIX signals into a pipe for usage with select() or poll()
  31. - An API for running subprocesses with STDOUT and STDERR redirected to syslog
  32. APIs like these are used in most daemon software available. It is not that
  33. simple to get it done right and code duplication is not a goal.
  34. endef
  35. define Build/Configure
  36. $(call Build/Configure/Default, \
  37. --enable-shared \
  38. --enable-static \
  39. --disable-lynx \
  40. --disable-examples \
  41. , \
  42. ac_cv_func_setpgrp_void=yes \
  43. )
  44. endef
  45. TARGET_CFLAGS += $(FPIC)
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/include
  48. $(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(1)/usr/include/
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(1)/usr/lib/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(1)/usr/lib/
  52. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  53. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(1)/usr/lib/pkgconfig/
  54. endef
  55. define Package/libdaemon/install
  56. $(INSTALL_DIR) $(1)/usr/lib
  57. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(1)/usr/lib/
  58. endef
  59. $(eval $(call BuildPackage,libdaemon))