summaryrefslogtreecommitdiffstats
path: root/package/sysklogd/sysklogd.mk
diff options
context:
space:
mode:
authorMartin Banky <martin.banky@gmail.com>2010-12-12 22:53:50 +0100
committerPeter Korsgaard <jacmet@sunsite.dk>2010-12-14 00:17:31 +0100
commitdfd068cd279063b3be31870bda998b6ddda50e25 (patch)
tree11359c1403b0a9866b7c0623b56a5293c02a4bbb /package/sysklogd/sysklogd.mk
parent690df505864e45457dec3f5f1d0198705605faa9 (diff)
downloadbuildroot-novena-dfd068cd279063b3be31870bda998b6ddda50e25.tar.gz
buildroot-novena-dfd068cd279063b3be31870bda998b6ddda50e25.zip
sysklogd: convert to gentargets and bump to 1.5
Also, changed the site to Debian, to get the latest patches [ Thomas: Minor fixes. Removed S25sysklogd since our default /etc/inittab already starts klogd and sysklogd. ] [Peter: only install syslog.conf if not available in skeleton] Signed-off-by: Martin Banky <Martin.Banky@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/sysklogd/sysklogd.mk')
-rw-r--r--package/sysklogd/sysklogd.mk94
1 files changed, 44 insertions, 50 deletions
diff --git a/package/sysklogd/sysklogd.mk b/package/sysklogd/sysklogd.mk
index 7333dfd5b..11aee2af5 100644
--- a/package/sysklogd/sysklogd.mk
+++ b/package/sysklogd/sysklogd.mk
@@ -3,59 +3,53 @@
# sysklogd
#
#############################################################
-SYSKLOGD_VERSION:=1.4.1
-SYSKLOGD_SOURCE:=sysklogd-$(SYSKLOGD_VERSION).tar.gz
-SYSKLOGD_SITE:=http://www.infodrom.org/projects/sysklogd/download
-SYSKLOGD_DIR:=$(BUILD_DIR)/sysklogd-$(SYSKLOGD_VERSION)
-SYSKLOGD_SYSLOGD_BINARY:=syslogd
-SYSKLOGD_KLOGD_BINARY:=klogd
-SYSKLOGD_BINARY:=$(SYSKLOGD_KLOGD_BINARY)
-SYSKLOGD_SYSLOGD_TARGET_BINARY:=sbin/syslogd
-SYSKLOGD_KLOGD_TARGET_BINARY:=sbin/klogd
-SYSKLOGD_TARGET_BINARY:=$(SYSKLOGD_KLOGD_TARGET_BINARY)
-
-$(DL_DIR)/$(SYSKLOGD_SOURCE):
- $(call DOWNLOAD,$(SYSKLOGD_SITE),$(SYSKLOGD_SOURCE))
-
-sysklogd-source: $(DL_DIR)/$(SYSKLOGD_SOURCE)
-
-$(SYSKLOGD_DIR)/.unpacked: $(DL_DIR)/$(SYSKLOGD_SOURCE)
- $(ZCAT) $(DL_DIR)/$(SYSKLOGD_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(SYSKLOGD_DIR) package/sysklogd/ sysklogd\*.patch
- touch $(SYSKLOGD_DIR)/.unpacked
-
-$(SYSKLOGD_DIR)/$(SYSKLOGD_BINARY): $(SYSKLOGD_DIR)/.unpacked
- $(MAKE) CC="$(TARGET_CC) $(TARGET_CFLAGS)" -C $(SYSKLOGD_DIR)
- $(STRIPCMD) $(SYSKLOGD_DIR)/$(SYSKLOGD_SYSLOGD_BINARY)
- $(STRIPCMD) $(SYSKLOGD_DIR)/$(SYSKLOGD_KLOGD_BINARY)
-
-$(TARGET_DIR)/$(SYSKLOGD_TARGET_BINARY): $(SYSKLOGD_DIR)/$(SYSKLOGD_BINARY)
- $(INSTALL) -m 0755 -D $(SYSKLOGD_DIR)/$(SYSKLOGD_SYSLOGD_BINARY) $(TARGET_DIR)/$(SYSKLOGD_SYSLOGD_TARGET_BINARY)
- $(INSTALL) -m 0755 -D $(SYSKLOGD_DIR)/$(SYSKLOGD_KLOGD_BINARY) $(TARGET_DIR)/$(SYSKLOGD_KLOGD_TARGET_BINARY)
- if [ ! -f $(TARGET_DIR)/etc/init.d/S25syslog ]; then \
- $(INSTALL) -m 0755 -D package/sysklogd/S25syslog $(TARGET_DIR)/etc/init.d; \
- fi
- if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
- $(INSTALL) -m 0644 -D package/sysklogd/syslog.conf $(TARGET_DIR)/etc/syslog.conf; \
+SYSKLOGD_VERSION = 1.5
+SYSKLOGD_SOURCE = sysklogd_$(SYSKLOGD_VERSION).orig.tar.gz
+SYSKLOGD_PATCH = sysklogd_$(SYSKLOGD_VERSION)-6.diff.gz
+SYSKLOGD_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/s/sysklogd
+
+# Override Busybox implementations if Busybox is enabled.
+ifeq ($(BR2_PACKAGE_BUSYBOX),y)
+SYSKLOGD_DEPENDENCIES = busybox
+endif
+
+define SYSKLOGD_DEBIAN_PATCHES
+ if [ -d $(@D)/debian/patches ]; then \
+ toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
fi
+endef
+
+SYSKLOGD_POST_PATCH_HOOKS = SYSKLOGD_DEBIAN_PATCHES
-sysklogd: $(TARGET_DIR)/$(SYSKLOGD_TARGET_BINARY)
+define SYSKLOGD_BUILD_CMDS
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+endef
-sysklogd-clean:
- rm -f $(TARGET_DIR)/$(SYSKLOGD_SYSLOGD_TARGET_BINARY)
- rm -f $(TARGET_DIR)/$(SYSKLOGD_KLOGD_TARGET_BINARY)
- rm -f $(TARGET_DIR)/etc/init.d/S25syslogd
+define SYSKLOGD_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0500 $(@D)/syslogd $(TARGET_DIR)/usr/sbin/syslogd
+ $(INSTALL) -D -m 0500 $(@D)/klogd $(TARGET_DIR)/usr/sbin/klogd
+ $(INSTALL) -D -m 0644 $(@D)/sysklogd.8 $(TARGET_DIR)/usr/share/man/man8/sysklogd.8
+ $(INSTALL) -D -m 0644 $(@D)/syslogd.8 $(TARGET_DIR)/usr/share/man/man8/syslogd.8
+ $(INSTALL) -D -m 0644 $(@D)/syslog.conf.5 $(TARGET_DIR)/usr/share/man/man5/syslog.conf.5
+ $(INSTALL) -D -m 0644 $(@D)/klogd.8 $(TARGET_DIR)/usr/share/man/man8/klogd.8
+ if [ ! -f $(TARGET_DIR)/etc/syslog.conf ]; then \
+ $(INSTALL) -D -m 0644 package/sysklogd/syslog.conf \
+ $(TARGET_DIR)/etc/syslog.conf; \
+ fi
+endef
+
+define SYSKLOGD_UNINSTALL_TARGET_CMDS
+ rm -f $(TARGET_DIR)/usr/sbin/syslogd
+ rm -f $(TARGET_DIR)/usr/sbin/klogd
+ rm -f $(TARGET_DIR)/usr/share/man/man8/sysklogd.8
+ rm -f $(TARGET_DIR)/usr/share/man/man8/syslogd.8
+ rm -f $(TARGET_DIR)/usr/share/man/man5/syslog.conf.5
+ rm -f $(TARGET_DIR)/usr/share/man/man8/klogd.8
rm -f $(TARGET_DIR)/etc/syslog.conf
- -$(MAKE) -C $(SYSKLOGD_DIR) clean
+endef
-sysklogd-dirclean:
- rm -rf $(SYSKLOGD_DIR)
+define SYSKLOGD_CLEAN_CMDS
+ $(MAKE) -C $(@D) clean
+endef
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_SYSKLOGD),y)
-TARGETS+=sysklogd
-endif
+$(eval $(call GENTARGETS,package,sysklogd))