From fc5eb3232c2ca9479192b8fcff6e6c8c213ce291 Mon Sep 17 00:00:00 2001 From: Dan Foster Date: Fri, 9 Mar 2012 19:00:41 -0600 Subject: solaris: Fix building on Solaris 10 Signed-off-by: Sol Jerome --- solaris/Makefile | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'solaris/Makefile') diff --git a/solaris/Makefile b/solaris/Makefile index be98f345d..ba12b865b 100644 --- a/solaris/Makefile +++ b/solaris/Makefile @@ -1,26 +1,28 @@ #!/usr/sfw/bin/gmake -PYTHON="/opt/csw/bin/python" +PYTHON="/usr/local/bin/python" VERS=1.2.1-1 PYVERSION := $(shell $(PYTHON) -c "import sys; print sys.version[0:3]") default: clean package package: - -mkdir tmp tmp/bcfg2-server tmp/bcfg2 - -cd ../ && $(PYTHON) setup.py install --prefix=$(PWD) + -mkdir tmp tmp/bcfg2-server tmp/bcfg2 + -mkdir -p build/lib/$(PYVERSION)/site-packages + -cd ../ && PYTHONPATH=$(PYTHONPATH):$(PWD)/build/lib/python2.6/site-packages/ $(PYTHON) setup.py install --single-version-externally-managed --record=/dev/null --prefix=$(PWD)/build + #setuptools appears to use a restictive umask + -chmod -R o+r build/ -cat bin/bcfg2 | sed -e 's!/usr/bin/python!$(PYTHON)!' > bin/bcfg2.new && mv bin/bcfg2.new bin/bcfg2 - # Set python version to whichever version is installed - -cat prototype.bcfg2 | sed -e 's!PYVERSION!python$(PYVERSION)!' > prototype.bcfg2.fixed - -cat prototype.bcfg2-server | sed -e 's!PYVERSION!python$(PYVERSION)!' > prototype.bcfg2-server.fixed - -pkgmk -o -a `uname -m` -f prototype.bcfg2.fixed -d $(PWD)/tmp -r $(PWD) - -pkgmk -o -a `uname -m` -f prototype.bcfg2-server.fixed -d $(PWD)/tmp -r $(PWD) + -./gen-prototypes.sh + -pkgmk -o -a `uname -m` -f prototype.bcfg2 -d $(PWD)/tmp -r $(PWD)/build + -pkgmk -o -a `uname -m` -f prototype.bcfg2-server -d $(PWD)/tmp -r $(PWD)/build -pkgtrans -o -s $(PWD)/tmp $(PWD)/bcfg2-$(VERS) SCbcfg2 -pkgtrans -o -s $(PWD)/tmp $(PWD)/bcfg2-server-$(VERS) SCbcfg2-server -gzip -f $(PWD)/bcfg2-$(VERS) -gzip -f $(PWD)/bcfg2-server-$(VERS) clean: - -rm -rf tmp bin lib share + -rm -rf tmp build -rm -rf bcfg2-$(VERS).gz bcfg2-server-$(VERS).gz -rm -rf prototype.bcfg2.fixed prototype.bcfg2-server.fixed + -rm -f prototype.* -- cgit v1.2.3-1-g7c22