File: Makefile

package info (click to toggle)
sitesummary 0.0.47
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 264 kB
  • ctags: 71
  • sloc: perl: 931; sh: 386; makefile: 63
file content (71 lines) | stat: -rw-r--r-- 1,960 bytes parent folder | download
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
DESTDIR = 

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

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

COLLECTORS = \
	collect.d/debian \
	collect.d/debian-edu \
	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)
	$(INSTALL) sitesummary-makewebreport $(DESTDIR)$(sbindir)
	$(INSTALL) sitesummary-nodes $(DESTDIR)$(sbindir)

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

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

	$(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-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

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