Added mcollective 2.3.1 package
[packages/trusty/mcollective.git] / ext / openbsd / port-files / mcollective / patches / patch-ext_Makefile
1 diff --git ext/Makefile ext/Makefile
2 index 029fda4..638d7a5 100644
3 --- ext/Makefile
4 +++ ext/Makefile
5 @@ -1,6 +1,5 @@
6  #!/usr/bin/make -f
7  
8 -DESTDIR=
9  
10  build:
11  
12 @@ -9,36 +8,34 @@ clean:
13  install: install-bin install-lib install-conf install-plugins install-doc
14  
15  install-bin:
16 -       install -d $(DESTDIR)/usr/sbin
17 -       install -d $(DESTDIR)/usr/bin
18 -       cp bin/mc-* $(DESTDIR)/usr/sbin
19 -       cp bin/mco $(DESTDIR)/usr/bin
20 -       cp bin/mcollectived $(DESTDIR)/usr/sbin/mcollectived
21 +       install -d $(PREFIX)/sbin
22 +       install -d $(PREFIX)/bin
23 +       cp bin/mc-* $(PREFIX)/sbin
24 +       cp bin/mco $(PREFIX)/bin
25 +       cp bin/mcollectived $(PREFIX)/sbin/mcollectived
26  
27  install-lib:
28 -       install -d $(DESTDIR)/usr/lib/ruby/1.8/
29 -       cp -a lib/* $(DESTDIR)/usr/lib/ruby/1.8/
30 +       install -d $(PREFIX)/lib/ruby/1.8/
31 +       cp -R lib/* $(PREFIX)/lib/ruby/1.8/
32  
33  install-conf:
34 -       install -d $(DESTDIR)/etc/mcollective/
35 -       install -d $(DESTDIR)/etc/init.d
36 -       cp -r etc/* $(DESTDIR)/etc/mcollective/
37 -       cp mcollective.init $(DESTDIR)/etc/init.d/mcollective
38 -       rm $(DESTDIR)/etc/mcollective/ssl/PLACEHOLDER
39 -       rm $(DESTDIR)/etc/mcollective/ssl/clients/PLACEHOLDER
40 +       install -d $(PREFIX)/share/examples/mcollective/
41 +       cp -R etc/* $(PREFIX)/share/examples/mcollective/
42 +       rm $(PREFIX)/share/examples/mcollective/ssl/PLACEHOLDER
43 +       rm $(PREFIX)/share/examples/mcollective/ssl/clients/PLACEHOLDER
44  
45  install-plugins:
46 -       install -d $(DESTDIR)/usr/share/mcollective/
47 -       cp -a plugins $(DESTDIR)/usr/share/mcollective/
48 +       install -d $(PREFIX)/share/mcollective/
49 +       cp -R plugins $(PREFIX)/share/mcollective/
50  
51  install-doc:
52 -       install -d $(DESTDIR)/usr/share/doc/
53 -       cp -a doc  $(DESTDIR)/usr/share/doc/mcollective
54 +       install -d $(PREFIX)/share/doc/
55 +       cp -R doc  $(PREFIX)/share/doc/mcollective
56  
57  uninstall:
58 -       rm -f $(DESTDIR)/usr/sbin/mcollectived
59 -       rm -rf $(DESTDIR)/usr/lib/ruby/1.8/mcollective*
60 -       rm -rf $(DESTDIR)/usr/share/mcollective
61 -       rm -rf $(DESTDIR)/etc/mcollective
62 +       rm -f $(PREFIX)/sbin/mcollectived
63 +       rm -rf $(PREFIX)/lib/ruby/1.8/mcollective*
64 +       rm -rf $(PREFIX)/share/mcollective
65 +       rm -rf $(PREFIX)/share/examples/mcollective
66  
67  .PHONY: build clean install uninstall