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