Changeset 4209


Ignore:
Timestamp:
2006-07-22T17:53:04+02:00 (12 years ago)
Author:
nico
Message:

port libdaemon to buildroot-ng

Location:
packages/libs/libdaemon
Files:
2 deleted
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • packages/libs/libdaemon/Makefile

    r3112 r4209  
     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# 
    17# $Id$ 
    28 
     
    612PKG_VERSION:=0.10 
    713PKG_RELEASE:=1 
     14 
     15PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
     16PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
     17PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/ 
    818PKG_MD5SUM:=6812a5e4063b5016f25e9a0cebbd3dd9 
    9  
    10 PKG_SOURCE_URL:=http://0pointer.de/lennart/projects/libdaemon/ 
    11 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz 
    1219PKG_CAT:=zcat 
    1320 
    14 PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) 
    1521PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install 
    1622 
    17 include $(TOPDIR)/package/rules.mk 
     23include $(INCLUDE_DIR)/package.mk 
    1824 
    19 $(eval $(call PKG_template,LIBDAEMON,libdaemon,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH))) 
     25define Package/libdaemon 
     26  SECTION:=libs 
     27  CATEGORY:=Libraries 
     28  TITLE:=A lightweight C library that eases the writing of UNIX daemons 
     29  DESCRIPTION:=A lightweight C library that eases the writing of UNIX daemons.\\\ 
     30    libdaemon is a lightweight C library that eases the writing of UNIX daemons.\\\ 
     31    It consists of the following parts:\\\ 
     32    \\\ 
     33      * A wrapper around fork() which does the correct daemonization procedure of a process\\\ 
     34      * A wrapper around syslog() for simpler and compatible log output to Syslog or STDERR\\\ 
     35      * An API for writing PID files\\\ 
     36      * An API for serializing UNIX signals into a pipe for usage with select() or poll()\\\ 
     37      * An API for running subprocesses with STDOUT and STDERR redirected to syslog\\\ 
     38    \\\ 
     39    APIs like these are used in most daemon software available. It is not that \\\ 
     40    simple to get it done right and code duplication is not a goal. 
     41  URL:=http://0pointer.de/lennart/projects/libdaemon/ 
     42endef 
    2043 
    21 $(PKG_BUILD_DIR)/.configured: 
    22         (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \ 
     44define Build/Configure 
     45        (cd $(PKG_BUILD_DIR); rm -f config.cache; \ 
    2346                $(TARGET_CONFIGURE_OPTS) \ 
    2447                CFLAGS="$(TARGET_CFLAGS)" \ 
     
    5275                        --disable-lynx \ 
    5376        ); 
    54         touch $@ 
     77endef 
    5578 
    56 $(PKG_BUILD_DIR)/.built: 
     79define Build/Compile 
    5780        rm -rf $(PKG_INSTALL_DIR) 
    5881        mkdir -p $(PKG_INSTALL_DIR) 
     
    6083                DESTDIR="$(PKG_INSTALL_DIR)" \ 
    6184                all install 
    62         touch $@ 
     85endef 
    6386 
    64 $(IPKG_LIBDAEMON): 
    65         install -d -m0755 $(IDIR_LIBDAEMON)/usr/lib 
    66         $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(IDIR_LIBDAEMON)/usr/lib/ 
    67         $(RSTRIP) $(IDIR_LIBDAEMON) 
    68         $(IPKG_BUILD) $(IDIR_LIBDAEMON) $(PACKAGE_DIR) 
     87define Package/libdaemon/install 
     88        install -d -m0755 $(1)/usr/lib 
     89        $(CP) $(PKG_INSTALL_DIR)/usr/lib/libdaemon.so.* $(1)/usr/lib/ 
     90endef 
    6991 
    70 $(STAGING_DIR)/usr/lib/libdaemon.so: $(PKG_BUILD_DIR)/.built 
     92define Build/InstallDev 
    7193        mkdir -p $(STAGING_DIR)/usr/include 
    7294        $(CP) $(PKG_INSTALL_DIR)/usr/include/libdaemon $(STAGING_DIR)/usr/include/ 
     
    78100        $(SED) 's,-I$${includedir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc 
    79101        $(SED) 's,-L$${libdir},,g' $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc 
    80         touch $@ 
     102endef 
    81103 
    82 install-dev: $(STAGING_DIR)/usr/lib/libdaemon.so 
    83  
    84 uninstall-dev: 
     104define Build/UninstallDev 
    85105        rm -rf \ 
    86106                $(STAGING_DIR)/usr/include/libdaemon \ 
    87107                $(STAGING_DIR)/usr/lib/libdaemon.a \ 
    88108                $(STAGING_DIR)/usr/lib/libdaemon.so* \ 
    89                 $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc \ 
     109                $(STAGING_DIR)/usr/lib/pkgconfig/libdaemon.pc 
     110endef 
    90111 
    91 compile-targets: install-dev 
    92 clean-targets: uninstall-dev 
    93  
    94 mostlyclean: 
    95         -$(MAKE) -C $(PKG_BUILD_DIR) clean 
    96         rm -f $(PKG_BUILD_DIR)/.built 
    97  
     112$(eval $(call BuildPackage,libdaemon)) 
Note: See TracChangeset for help on using the changeset viewer.