1 Description: Add DESTDIR support to Makefile.
2 Author: Benjamin Drung <bdrung@debian.org>
7 #.. Absolute path to the ProjectDefs file in this directory
8 OCSPROJECT=@ocs_abssrcdir@/ProjectDefs
9 #.. Path to the place where the distribution is to be installed
12 #.. Description of your system
13 OSARCH=@host_os@-@host_cpu@
14 #.. Path to the GNU sed program
16 MINSRCPACKAGES = pkg.examples pkg.tmpl
17 PACKAGES = $(MINPACKAGES) $(STDPACKAGES)
19 -OCSADMIN = OCSPROJECT=$(OCSPROJECT) $(OCSHOME)/bin/ocsadmin -ocshome $(OCSHOME) -ocssrc $(OCSSRC) -ocsspecs $(OCSSRC)/om/specs
20 -OCSADMININIT = OCSPROJECT=$(OCSPROJECT) $(OCSSRC)/om/scripts/ocsadmin -ocssrc $(OCSSRC) -ocshome $(OCSHOME) -ocsspecs $(OCSSRC)/om/specs
21 +OCSADMIN = OCSPROJECT=$(OCSPROJECT) $(DESTDIR)$(OCSHOME)/bin/ocsadmin -ocshome $(DESTDIR)$(OCSHOME) -ocssrc $(OCSSRC) -ocsspecs $(OCSSRC)/om/specs
22 +OCSADMININIT = OCSPROJECT=$(OCSPROJECT) $(OCSSRC)/om/scripts/ocsadmin -ocssrc $(OCSSRC) -ocshome $(DESTDIR)$(OCSHOME) -ocsspecs $(OCSSRC)/om/specs
24 install: init $(BOOTPACKAGES) update-inter pkg.getopalname $(STDPACKAGES) $(EXTRAS)
25 $(OCSADMIN) install $(MINSRCPACKAGES)
26 - chmod -R a+r @prefix@/*
27 - chmod a+x @prefix@/bin/*
28 + chmod -R a+r $(DESTDIR)$(prefix)/*
29 + chmod a+x $(DESTDIR)$(prefix)/bin/*
32 $(OCSADMIN) update_inter lib.opal_base
35 reinstall: reinit $(PACKAGES) $(EXTRAS)
36 $(OCSADMIN) install $(MINSRCPACKAGES)
37 - chmod -R a+r @prefix@/*
38 - chmod a+x @prefix@/bin/*
39 + chmod -R a+r $(DESTDIR)$(prefix)/*
40 + chmod a+x $(DESTDIR)$(prefix)/bin/*
43 $(OCSADMININIT) init -sed $(SED) "$(LONGVERSION)"
44 --- a/src/om/scripts/oasys.in
45 +++ b/src/om/scripts/oasys.in
48 # $Id: /opal/ocs/tags/2.4/src/om/scripts/oasys.in 10088 2011-09-28T22:00:14.597904Z florenz@TU-BERLIN.DE $
51 +OCS=${DESTDIR}@prefix@
55 --- a/src/om/scripts/pureDosfop.in
56 +++ b/src/om/scripts/pureDosfop.in
59 # $Id: /opal/ocs/tags/2.4/src/om/scripts/pureDosfop.in 10088 2011-09-28T22:00:14.597904Z florenz@TU-BERLIN.DE $
62 +OCS=${DESTDIR}@prefix@
65 enable_dosfop=@ocs_cv_feature_dosfop@
66 --- a/src/om/scripts/ocs.in
67 +++ b/src/om/scripts/ocs.in
70 # $Id: /opal/ocs/tags/2.4/src/om/scripts/ocs.in 10088 2011-09-28T22:00:14.597904Z florenz@TU-BERLIN.DE $
73 +OCS=${DESTDIR}@prefix@
77 --- a/src/om/scripts/dosfop.in
78 +++ b/src/om/scripts/dosfop.in
84 +OCS=${DESTDIR}@prefix@