Permalink
Newer
Older
100644 43 lines (31 sloc) 1.04 KB
@ripienaar
Jan 7, 2010
1
#!/usr/bin/make -f
2
3
DESTDIR=
4
5
build:
6
@ripienaar
Jan 7, 2010
7
clean:
8
9
install: install-bin install-lib install-conf install-plugins install-doc
10
11
install-bin:
12
install -d $(DESTDIR)/usr/sbin
13
cp mc-* $(DESTDIR)/usr/sbin
14
cp mcollectived.rb $(DESTDIR)/usr/sbin/mcollectived
@ripienaar
Jan 7, 2010
15
16
install-lib:
17
install -d $(DESTDIR)/usr/lib/ruby/1.8/
18
cp -a lib/* $(DESTDIR)/usr/lib/ruby/1.8/
@ripienaar
Jan 7, 2010
19
20
install-conf:
21
install -d $(DESTDIR)/etc/mcollective/
22
install -d $(DESTDIR)/etc/init.d
23
cp -r etc/* $(DESTDIR)/etc/mcollective/
24
cp mcollective.init $(DESTDIR)/etc/init.d/mcollective
25
rm $(DESTDIR)/etc/mcollective/ssl/PLACEHOLDER
26
rm $(DESTDIR)/etc/mcollective/ssl/clients/PLACEHOLDER
@ripienaar
Jan 7, 2010
27
28
install-plugins:
29
install -d $(DESTDIR)/usr/share/mcollective/
30
cp -a plugins $(DESTDIR)/usr/share/mcollective/
@ripienaar
Jan 7, 2010
31
32
install-doc:
33
install -d $(DESTDIR)/usr/share/doc/
34
cp -a doc $(DESTDIR)/usr/share/doc/mcollective
@ripienaar
Jan 7, 2010
35
36
uninstall:
37
rm -f $(DESTDIR)/usr/sbin/mcollectived
38
rm -rf $(DESTDIR)/usr/lib/ruby/1.8/mcollective*
39
rm -rf $(DESTDIR)/usr/share/mcollective
40
rm -rf $(DESTDIR)/etc/mcollective
@ripienaar
Jan 7, 2010
41
42
.PHONY: build clean install uninstall