aboutsummaryrefslogtreecommitdiff
path: root/package/sysklogd/sysklogd.mk
blob: 266c171170149aba0a9fbfae673f14d7c885c8db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
################################################################################
#
# sysklogd
#
################################################################################

SYSKLOGD_VERSION = 1.6
SYSKLOGD_SITE = $(call github,troglobit,sysklogd,v$(SYSKLOGD_VERSION))
SYSKLOGD_LICENSE = GPL-2.0+
SYSKLOGD_LICENSE_FILES = COPYING
# From git
SYSKLOGD_AUTORECONF = YES

define SYSKLOGD_INSTALL_SAMPLE_CONFIG
	$(INSTALL) -D -m 0644 package/sysklogd/syslog.conf \
		$(TARGET_DIR)/etc/syslog.conf
endef

SYSKLOGD_POST_INSTALL_TARGET_HOOKS += SYSKLOGD_INSTALL_SAMPLE_CONFIG

define SYSKLOGD_INSTALL_INIT_SYSV
	$(INSTALL) -m 755 -D package/sysklogd/S01syslogd \
		$(TARGET_DIR)/etc/init.d/S01syslogd
	$(INSTALL) -m 755 -D package/sysklogd/S02klogd \
		$(TARGET_DIR)/etc/init.d/S02klogd
endef

define SYSKLOGD_INSTALL_INIT_SYSTEMD
	$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/syslogd.service \
		$(TARGET_DIR)/usr/lib/systemd/system/syslogd.service
	$(INSTALL) -D -m 644 $(SYSKLOGD_PKGDIR)/klogd.service \
		$(TARGET_DIR)/usr/lib/systemd/system/klogd.service
	mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
	ln -sf ../../../../usr/lib/systemd/system/syslogd.service \
		$(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/syslogd.service
	ln -sf ../../../usr/lib/systemd/system/syslogd.service \
		$(TARGET_DIR)/etc/systemd/system/syslog.service
endef

$(eval $(autotools-package))