summaryrefslogtreecommitdiff
path: root/package/libdaemon/libdaemon.mk
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2006-12-12 22:26:51 +0000
committerEric Andersen <andersen@codepoet.org>2006-12-12 22:26:51 +0000
commit21e97d3e155f4d9604f729698cdfff3c40eefbe7 (patch)
tree537888ff1cab21569b3bebdb44faee883d051995 /package/libdaemon/libdaemon.mk
parenta7748b2f132b1e7c1a87a5f3d80cb64e46ce5219 (diff)
Add avahi package and add libdaemon, which is needed by avahi
Diffstat (limited to 'package/libdaemon/libdaemon.mk')
-rw-r--r--package/libdaemon/libdaemon.mk90
1 files changed, 90 insertions, 0 deletions
diff --git a/package/libdaemon/libdaemon.mk b/package/libdaemon/libdaemon.mk
new file mode 100644
index 000000000..8f684efd4
--- /dev/null
+++ b/package/libdaemon/libdaemon.mk
@@ -0,0 +1,90 @@
+#############################################################
+#
+# libdaemon (UNIX daemon library)
+#
+#############################################################
+# Copyright 2003-2005 Lennart Poettering <mzqnrzba@0pointer.de>
+#
+# This library is free software; you can redistribute it
+# and/or modify it under the terms of the GNU Lesser General
+# Public License as published by the Free Software Foundation;
+# either version 2.1 of the License, or (at your option) any
+# later version.
+
+LIBDAEMON_VER:=0.10
+LIBDAEMON_DIR:=$(BUILD_DIR)/libdaemon-$(LIBDAEMON_VER)
+LIBDAEMON_SITE:=http://0pointer.de/lennart/projects/libdaemon/
+LIBDAEMON_SOURCE:=libdaemon-$(LIBDAEMON_VER).tar.gz
+LIBDAEMON_CAT:=zcat
+
+$(DL_DIR)/$(LIBDAEMON_SOURCE):
+ $(WGET) -P $(DL_DIR) $(LIBDAEMON_SITE)/$(LIBDAEMON_SOURCE)
+
+libdaemon-source: $(DL_DIR)/$(LIBDAEMON_SOURCE)
+
+$(LIBDAEMON_DIR)/.unpacked: $(DL_DIR)/$(LIBDAEMON_SOURCE)
+ $(LIBDAEMON_CAT) $(DL_DIR)/$(LIBDAEMON_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+ toolchain/patch-kernel.sh $(LIBDAEMON_DIR) package/libdaemon/ \*.patch
+ touch $(LIBDAEMON_DIR)/.unpacked
+
+$(LIBDAEMON_DIR)/.configured: $(LIBDAEMON_DIR)/.unpacked
+ (cd $(AVAHI_DIR) && rm -rf config.cache && autoconf)
+ ( \
+ cd $(LIBDAEMON_DIR) && \
+ $(TARGET_CONFIGURE_OPTS) \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ ./configure \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libexecdir=/usr/sbin \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ --includedir=$(STAGING_DIR)/include \
+ $(DISABLE_NLS) \
+ $(DISABLE_LARGEFILE) \
+ --disable-lynx \
+ --disable-shared \
+ );
+ touch $(LIBDAEMON_DIR)/.configured
+
+$(LIBDAEMON_DIR)/.compiled: $(LIBDAEMON_DIR)/.configured
+ $(MAKE) -C $(LIBDAEMON_DIR)
+ touch $(LIBDAEMON_DIR)/.compiled
+
+$(STAGING_DIR)/lib/libdaemon.a: $(LIBDAEMON_DIR)/.compiled
+ $(MAKE) \
+ -C $(LIBDAEMON_DIR) \
+ prefix=$(STAGING_DIR) \
+ exec_prefix=$(STAGING_DIR) \
+ bindir=$(STAGING_DIR)/bin \
+ datadir=$(STAGING_DIR)/share \
+ install
+ touch -c $(STAGING_DIR)/lib/libdaemon.a
+
+#$(TARGET_DIR)/usr/lib/libdaemon.a: $(STAGING_DIR)/lib/libdaemon.a
+# -$(STRIP) --strip-unneeded $(TARGET_DIR)/usr/lib/libdaemon.a
+
+libdaemon: uclibc $(STAGING_DIR)/lib/libdaemon.a
+
+libdaemon-clean:
+ -$(MAKE) -C $(LIBDAEMON_DIR) clean
+
+libdaemon-dirclean:
+ rm -rf $(LIBDAEMON_DIR)
+
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_LIBDAEMON)),y)
+TARGETS+=libdaemon
+endif