lede-packages-rs

git clone git://archive.git.mtrnord.blog/MTRNord/lede-packages-rs.git
Log | Files | Refs | README | LICENSE

Makefile (2170B)


      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 
      8 include $(TOPDIR)/rules.mk
      9 
     10 PKG_NAME:=libdaemon
     11 PKG_VERSION:=0.14
     12 PKG_RELEASE:=5
     13 
     14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
     15 PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/
     16 PKG_MD5SUM:=509dc27107c21bcd9fbf2f95f5669563
     17 PKG_MAINTAINER:=Ted Hess <thess@kitschensync.net>
     18 
     19 PKG_FIXUP:=autoreconf
     20 PKG_INSTALL:=1
     21 
     22 include $(INCLUDE_DIR)/package.mk
     23 
     24 define Package/libdaemon
     25   SECTION:=libs
     26   CATEGORY:=Libraries
     27   TITLE:=A lightweight C library that eases the writing of UNIX daemons
     28   URL:=http://0pointer.de/lennart/projects/libdaemon/
     29 endef
     30 
     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
     39 
     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.
     42 endef
     43 
     44 define Build/Configure
     45 	$(call Build/Configure/Default, \
     46 		--enable-shared \
     47 		--enable-static \
     48 		--disable-lynx \
     49 		--disable-examples \
     50 		, \
     51 		ac_cv_func_setpgrp_void=yes \
     52 	)
     53 endef
     54 
     55 TARGET_CFLAGS += $(FPIC)
     56 
     57 define Build/InstallDev
     58 	$(INSTALL_DIR) $(1)/usr/include
     59 	$(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(1)/usr/include/
     60 	$(INSTALL_DIR) $(1)/usr/lib
     61 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.a $(1)/usr/lib/
     62 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so* $(1)/usr/lib/
     63 	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
     64 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/libdaemon.pc $(1)/usr/lib/pkgconfig/
     65 endef
     66 
     67 define Package/libdaemon/install
     68 	$(INSTALL_DIR) $(1)/usr/lib
     69 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(1)/usr/lib/
     70 endef
     71 
     72 $(eval $(call BuildPackage,libdaemon))