From 586204e88e621ca3788ae842be5ceeba9e33d5a5 Mon Sep 17 00:00:00 2001 From: Daniel Joseph Barnhart Clark Date: Sat, 23 Jun 2007 21:21:21 +0000 Subject: EncapPackages: Seperate server build now works. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3340 ce84e21b-d406-0410-9b95-82705330c041 --- encap/src/encap-profiles/server/Makefile | 110 +++++++++++++++++++++ encap/src/encap-profiles/server/README | 8 +- .../src/encap-profiles/server/bcfg2-gamin-0.1.8.ep | 1 + .../src/encap-profiles/server/bcfg2-glib-2.12.9.ep | 1 + .../encap-profiles/server/bcfg2-libxml2-2.6.29.ep | 1 + .../encap-profiles/server/bcfg2-libxslt-1.1.21.ep | 1 + .../src/encap-profiles/server/bcfg2-lxml-1.2.1.ep | 2 +- .../encap-profiles/server/bcfg2-pyrex-0.9.5.1a.ep | 2 +- 8 files changed, 122 insertions(+), 4 deletions(-) create mode 100644 encap/src/encap-profiles/server/Makefile (limited to 'encap') diff --git a/encap/src/encap-profiles/server/Makefile b/encap/src/encap-profiles/server/Makefile new file mode 100644 index 000000000..2785a0426 --- /dev/null +++ b/encap/src/encap-profiles/server/Makefile @@ -0,0 +1,110 @@ +# $Id$ + +.PHONY : test log all install clean distclean uninstall encaps rename bcfg2only bcfg2bump +.SUFFIXES : +.SUFFIXES : .ep .sh .installed .packaged .d + +export BASEDIR = /usr/local +export ENCAPDIR := ${BASEDIR}/encap +export EPKG := ${BASEDIR}/bin/epkg +export MKENCAP := ${BASEDIR}/bin/mkencap +export SHELL = /bin/sh +srcdir = . +export EP2TARGET := $(srcdir)/../ep2target +PAGER ?= more + +BCFG2_CHEETAH_DOC := $(basename $(wildcard bcfg2-cheetah-doc-*.ep)) +BCFG2_GAMIN := $(basename $(wildcard bcfg2-gamin-*.ep)) +BCFG2_GLIB := $(basename $(wildcard bcfg2-glib-*.ep)) +BCFG2_LIBXML2 := $(basename $(wildcard bcfg2-libxml2-*.ep)) +BCFG2_LIBXSLT := $(basename $(wildcard bcfg2-libxslt-*.ep)) +BCFG2_LXML := $(basename $(wildcard bcfg2-lxml-*.ep)) +BCFG2_PYREX := $(basename $(wildcard bcfg2-pyrex-*.ep)) +BCFG2_SETUPTOOLS := $(basename $(wildcard bcfg2-setuptools-*.ep)) +OSTIARTY_DOC := $(basename $(wildcard ostiary-doc-*.ep)) + +sources := $(BCFG2_CHEETAH_DOC) $(BCFG2_GAMIN) $(BCFG2_GLIB) $(BCFG2_LIBXML2) $(BCFG2_LIBXSLT) $(BCFG2_LXML) $(BCFG2_PYREX) $(BCFG2_SETUPTOOLS) $(OSTIARTY_DOC) + +%.installed : %.ep # Clean, compile and install an encap package + @printf "***** START .ep.installed for |$*| ***** \n" + -$(EPKG) -q -r $(ENCAPDIR)/$* + -rm -rf $(ENCAPDIR)/$* + -$(MKENCAP) -m /usr/local/bin/m4 -b -DUP $(srcdir)/$*.ep > ./$*.log 2>&1 + -$(MKENCAP) -m /usr/local/bin/m4 -b -T $(srcdir)/$*.ep >> ./$*.log 2>&1 + $(MKENCAP) -m /usr/local/bin/m4 -b -CBI $(srcdir)/$*.ep >> ./$*.log 2>&1 + $(EPKG) -q -i $(ENCAPDIR)/$* + test -h $(BASEDIR)/var/encap/$* + touch ./$*.installed + @printf "***** STOP .ep.installed for |$*| ***** \n" + +%.installed : %.sh # Create and install a "fake" encap package + @printf "***** START .sh.installed for |$*| ***** \n" + -$(EPKG) -q -r $(ENCAPDIR)/$* + -rm -rf $(ENCAPDIR)/$* + chmod 755 $(srcdir)/$*.sh && $(srcdir)/$*.sh + $(EPKG) -q -i $(ENCAPDIR)/$* + test -h $(BASEDIR)/var/encap/$* + touch ./$*.installed + @printf "***** STOP .sh.installed for |$*| ***** \n" + +%.packaged : %.installed # Create .tar.gz encap packages + @printf "***** START .installed.packaged for |$*| ***** \n" + -rm $(ENCAPDIR)/$*-*.tar.gz + -(cd $(ENCAPDIR) && $(MKENCAP) -e $*) + -(cd $(ENCAPDIR) && $(MKENCAP) -c $*) + mv $(ENCAPDIR)/$*-encap-*.tar.gz ./ + touch ./$*.packaged + @printf "***** STOP .installed.packaged for |$*| ***** \n" + +%.d : %.ep # Create dependancy files from .ep files + @printf "***** START .d.ep for |$*| ***** \n" + chmod 755 $(EP2TARGET) && $(EP2TARGET) $< > $@ + @printf "***** STOP .d.ep for |$*| ***** \n" + +%.d : %.sh # Create dependancy files from .sh files + @printf "***** START .d.sh for |$*| ***** \n" + chmod 755 $(EP2TARGET) && $(EP2TARGET) $< > $@ + @printf "***** STOP .d.sh for |$*| ***** \n" + +log : + ( $(MAKE) install > ./make.log 2>&1 \ + && $(MAKE) encaps >> ./make.log 2>&1 \ + && $(MAKE) rename >> ./make.log 2>&1 ) & + +all : install encaps rename + +.DELETE_ON_ERROR : # delete the target of a rule if it has changed and its + # commands exit with a nonzero exit status + +install : $(EPKG) $(MKENCAP) $(EP2TARGET) $(M4).installed $(addsuffix .installed,$(sources)) + +encaps : $(EPKG) $(MKENCAP) $(EP2TARGET) $(addsuffix .packaged,$(sources)) + +rename : encaps + if [ "$(OS)x" != "x" ]; then OS="$(OS)"; fi && \ + if [ "$${OS}x" != "x" ]; then \ + for OLDNAME in `(ls . | grep .*-encap-.*.tar.gz) || break`; do \ + NEWNAME="`printf "%s\n" "$${OLDNAME}" \ + | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' \ + | sed s:\ :-:g | sed s:OSDIST:\$${OS}:g`" ; \ + if [ "$${OLDNAME}x" != "$${NEWNAME}x" ]; then \ + mv ./$${OLDNAME} ./$${NEWNAME}; \ + fi; \ + done; \ + fi + for OLDNAME in `(ls . | grep .*-doc-.*-encap-.*.tar.gz) || break`; do \ + NEWNAME="`printf "%s\n" "$${OLDNAME}" \ + | awk -F- '{$$NF = "OSDIST.tar.gz" ; print}' \ + | sed s:\ :-:g | sed s:OSDIST:share:g`" ; \ + if [ "$${OLDNAME}x" != "$${NEWNAME}x" ]; then \ + mv ./$${OLDNAME} ./$${NEWNAME}; \ + fi; \ + done; + +clean : + -(rm ./*.log; rm ./*.packaged; rm ./*.gz; rm ./*~) + +distclean : clean + -rm ./*.d + +include $(addsuffix .d,$(sources)) diff --git a/encap/src/encap-profiles/server/README b/encap/src/encap-profiles/server/README index a121f737e..983d9f1ba 100644 --- a/encap/src/encap-profiles/server/README +++ b/encap/src/encap-profiles/server/README @@ -1,2 +1,6 @@ -The seperated server build is not currently operational; -only the client build is supported with encap for the moment. +You must build and install the client packages in ".." before building here. + +Type "make". + +Bcfg2 Server does not work on all of the platforms supported by Bcfg2 client. +GNU/Linux on x86_32 or x86_64 are recommended. diff --git a/encap/src/encap-profiles/server/bcfg2-gamin-0.1.8.ep b/encap/src/encap-profiles/server/bcfg2-gamin-0.1.8.ep index fddba59c4..5a8b60b2f 100644 --- a/encap/src/encap-profiles/server/bcfg2-gamin-0.1.8.ep +++ b/encap/src/encap-profiles/server/bcfg2-gamin-0.1.8.ep @@ -11,6 +11,7 @@ + + + + - + - +