File: Makefile

package info (click to toggle)
sitesummary 0.1.17+deb8u3
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 468 kB
  • ctags: 103
  • sloc: perl: 1,742; sh: 787; makefile: 84
file content (94 lines) | stat: -rw-r--r-- 2,810 bytes parent folder | download | duplicates (2)
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
DESTDIR = 

prefix       = /usr
sbindir      = $(prefix)/sbin
datadir      = $(prefix)/share
libdir       = $(prefix)/lib
cgibindir    = $(libdir)/cgi-bin
pkgdatadir   = $(datadir)/sitesummary
pkgdir       = $(libdir)/sitesummary
collectordir = $(pkgdir)/collect.d
perldir      = $(datadir)/perl5
pkgvardir    = /var/lib/sitesummary
nagiosplugdir= $(pkgdir)/nagios-plugins

INSTALL      = install
INSTALL_DATA = $(INSTALL) -m 644

COLLECTORS = \
	collect.d/debian \
	collect.d/debian-edu \
	collect.d/nagios \
	collect.d/system \
	collect.d/siteinfo

SUMMARYSCRIPTS = \
	agesinceseen-summary \
	site-summary \
	hardware-model-summary \
	hostclass-summary \
	kernelversion-summary \
	debian_edu-summary

all:

install: install-server install-client

install-server:
	$(INSTALL) -d $(DESTDIR)$(cgibindir)
	$(INSTALL) sitesummary-collector.cgi $(DESTDIR)$(cgibindir)

	$(INSTALL) -d $(DESTDIR)$(sbindir)
	for f in sitesummary-makewebreport sitesummary-nodes sitesummary-update-munin sitesummary-update-nagios ; do \
		$(INSTALL) $$f $(DESTDIR)$(sbindir) ; \
	done

	$(INSTALL) -d $(DESTDIR)$(perldir)
	$(INSTALL) -d $(DESTDIR)$(pkgdir)
	$(INSTALL_DATA) SiteSummary.pm $(DESTDIR)$(perldir)
	$(INSTALL) $(SUMMARYSCRIPTS) $(DESTDIR)$(pkgdir)/

	$(INSTALL) expire-entry $(DESTDIR)$(pkgdir)/

	$(INSTALL) -d $(DESTDIR)/etc/apache2/conf-available
	$(INSTALL_DATA) apache.conf $(DESTDIR)/etc/apache2/conf-available/sitesummary.conf

	$(INSTALL) -o www-data -d $(DESTDIR)$(pkgvardir)/entries
	$(INSTALL) -o www-data -d $(DESTDIR)$(pkgvardir)/tmpstorage
	$(INSTALL) -d $(DESTDIR)$(pkgvardir)/www

	$(INSTALL) -d $(DESTDIR)/usr/share/munin/plugins/.
	$(INSTALL) munin-plugin $(DESTDIR)/usr/share/munin/plugins/sitesummary_sites
	$(INSTALL) munin-plugin-agesinceseen \
		$(DESTDIR)/usr/share/munin/plugins/sitesummary_agesinceseen

	$(INSTALL) -d $(DESTDIR)/etc/nagios3
	$(INSTALL_DATA) nagios.cfg \
		$(DESTDIR)/etc/nagios3/sitesummary.cfg
	$(INSTALL_DATA) nagios-templates.cfg \
		$(DESTDIR)/etc/nagios3/sitesummary-templates.cfg
	$(INSTALL_DATA) nagios-template-contacts.cfg \
		$(DESTDIR)/etc/nagios3/sitesummary-template-contacts.cfg
	$(INSTALL) -d $(DESTDIR)/etc/nagios
	$(INSTALL_DATA) nagios-nrpe-commands.cfg \
		$(DESTDIR)/etc/nagios/sitesummary-nrpe-commands.cfg

install-client:
	$(INSTALL) -d $(DESTDIR)$(sbindir)
	$(INSTALL) sitesummary-client sitesummary-upload $(DESTDIR)$(sbindir)
	$(INSTALL) -d $(DESTDIR)$(pkgdatadir)
	$(INSTALL_DATA) sitesummary-client.conf $(DESTDIR)$(pkgdatadir)/

	$(INSTALL) -d $(DESTDIR)$(collectordir)
	for collector in $(COLLECTORS) ; do \
		$(INSTALL) $$collector $(DESTDIR)$(collectordir); \
	done

	$(INSTALL) -d $(DESTDIR)$(nagiosplugdir)
	for plugin in nagios-plugins/* ; do \
		$(INSTALL) $$plugin $(DESTDIR)$(nagiosplugdir); \
	done

clean:
	$(RM) *~ */*~
distclean: clean