forked from beave/sagan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.am
76 lines (54 loc) · 2.42 KB
/
Makefile.am
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## Problems:
## Default should probably install to "/usr/local", but this does not. I'm not sure why.
## On my system, "$(SpoolPath)" expands to "/var/lib". Again, I don't know why.
AUTOMAKE_OPIONS=foreign no-dependencies subdir-objects
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src
INSTALL_PROGRAM ::= $(INSTALL) -m 755
#man8dir ::= "$(mandir)/man8"
#ifeq ($(origin man8dir),undefined)
#ifndef "$(man8dir)"
#man8dir ::= "$(mandir)/man8"
#endif
man8dir ?= "$(mandir)/man8"
RunPath ::= "$(DESTDIR)$(runstatedir)/sagan"
SpoolPath ::= "$(DESTDIR)$(localstatedir)/spool/sagan"
LogPath ::= "$(DESTDIR)$(localstatedir)/log/sagan"
ConfPath ::= "$(DESTDIR)$(sysconfdir)/sagan"
RulePath ::= "$(ConfPath)/rules"
#INCLUDES = @INCLUDES@
# Install BFD include file, and others that it needs.
#install-data-local:
# @$(NORMAL_INSTALL)
# $(mkinstalldirs) $(sysconfdir)
# $(INSTALL_DATA)sagan.conf $(sysconfdir)/sagan.yaml
.NOTPARALLEL: install-done
install-data-local: install-man install-process install-config install-program install-done
install-man:
test -d "$(DESTDIR)$(man8dir)" || /bin/mkdir -p "$(DESTDIR)$(man8dir)"
$(INSTALL_DATA) etc/sagan.8 "$(DESTDIR)$(man8dir)"
install-process: install-process-logs install-process-spool install-process-run
install-process-logs:
test -d "$(LogPath)" || /bin/mkdir -p "$(LogPath)"
$(INSTALL) -d "$(LogPath)"
install-process-spool:
test -d "$(SpoolPath)" || /bin/mkdir -p "$(SpoolPath)"
test -p "$(SpoolPath)/input.fifo" || mkfifo -m o-rwx "$(SpoolPath)/input.fifo"
/bin/chown -R 'sagan:adm' "$(SpoolPath)"
install-process-run:
$(INSTALL) -d -o sagan "$(DESTDIR)/var/run/sagan"
# test -e "$(RunPath)/sagan.pid" && echo "PID file already exists: $(RunPath)/sagan.pid"
install-config:
test -d "$(ConfPath)" || /bin/mkdir -p "$(ConfPath)"
test -f "$(ConfPath)/sagan.yaml" || $(INSTALL_DATA) etc/sagan.yaml "$(ConfPath)/sagan.yaml"
test -d "$(ConfPath)/rules" || /bin/mkdir -p "$(ConfPath)/rules"
install-program:
test -d "$(DESTDIR)$(sbindir)" || /bin/mkdir -p "$(DESTDIR)$(sbindir)"
$(INSTALL_PROGRAM) src/sagan "$(DESTDIR)$(sbindir)/sagan"
install-done:
@echo ""
@echo "------------------------------------------------------------------------------"
@echo "Sagan has been installed! You still need to do a few more things before your"
@echo "up and running. For more information, see https://sagan.readthedocs.io"
@echo "------------------------------------------------------------------------------"
@echo ""