summaryrefslogtreecommitdiffstats
path: root/solaris/Makefile
diff options
context:
space:
mode:
authorDan Foster <dan.foster@bristol.ac.uk>2012-03-09 19:00:41 -0600
committerSol Jerome <sol.jerome@gmail.com>2012-03-09 19:00:41 -0600
commitfc5eb3232c2ca9479192b8fcff6e6c8c213ce291 (patch)
treea24fdac2ee62e924257737fe0a78b6b1088881b3 /solaris/Makefile
parent0e9e0b523ceeea001838ffd1279c71a7e0b59772 (diff)
downloadbcfg2-fc5eb3232c2ca9479192b8fcff6e6c8c213ce291.tar.gz
bcfg2-fc5eb3232c2ca9479192b8fcff6e6c8c213ce291.tar.bz2
bcfg2-fc5eb3232c2ca9479192b8fcff6e6c8c213ce291.zip
solaris: Fix building on Solaris 10
Signed-off-by: Sol Jerome <sol.jerome@gmail.com>
Diffstat (limited to 'solaris/Makefile')
-rw-r--r--solaris/Makefile20
1 files changed, 11 insertions, 9 deletions
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.*