2 # Copyright (C) 2006 OpenWrt.org
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
9 include $(TOPDIR
)/rules.mk
15 PKG_SOURCE
:=$(PKG_NAME
)-$(PKG_VERSION
).
tar.gz
16 PKG_SOURCE_URL
:=http
://0pointer.de
/lennart
/projects
/libdaemon
/
17 PKG_MD5SUM
:=76596823cc1a6d1cdf7779b782ff0ee6
19 PKG_BUILD_DIR
:=$(BUILD_DIR
)/$(PKG_NAME
)-$(PKG_VERSION
)
20 PKG_INSTALL_DIR
:=$(PKG_BUILD_DIR
)/ipkg-install
22 include $(INCLUDE_DIR
)/package.mk
24 define Package
/libdaemon
27 TITLE
:=A lightweight C library that eases the writing of UNIX daemons
28 URL
:=http
://0pointer.de
/lennart
/projects
/libdaemon
/
31 define Package
/libdaemon
/description
32 libdaemon is a lightweight C library that eases the writing of UNIX daemons.
33 It consists of the following parts
:
34 - A wrapper around fork
() which does the correct daemonization procedure of a process
35 - A wrapper around syslog
() for simpler and compatible log output to Syslog or STDERR
36 - An API for writing PID files
37 - An API for serializing UNIX signals into a pipe for usage with select
() or poll
()
38 - An API for running subprocesses with STDOUT and STDERR redirected to syslog
40 APIs like these are used in most daemon software available. It is not that
41 simple to
get it done right and code duplication is not a goal.
44 define Build
/Configure
45 $(call Build
/Configure
/Default
, \
53 $(MAKE
) -C
$(PKG_BUILD_DIR
) \
54 DESTDIR
="$(PKG_INSTALL_DIR)" \
58 define Build
/InstallDev
59 mkdir
-p
$(1)/usr
/include
60 $(CP
) $(PKG_INSTALL_DIR
)/usr
/include/libdaemon
$(1)/usr
/include/
62 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdaemon.a
$(1)/usr
/lib
/
63 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdaemon.so
* $(1)/usr
/lib
/
64 mkdir
-p
$(1)/usr
/lib
/pkgconfig
65 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/pkgconfig
/libdaemon.
pc $(1)/usr
/lib
/pkgconfig
/
68 define Package
/libdaemon
/install
69 $(INSTALL_DIR
) $(1)/usr
/lib
70 $(CP
) $(PKG_INSTALL_DIR
)/usr
/lib
/libdaemon.so.
* $(1)/usr
/lib
/
73 $(eval
$(call BuildPackage
,libdaemon
))