summaryrefslogtreecommitdiffstats
path: root/solaris/Makefile
blob: 995253ea80b26b6a32977f47a9cc4f9ec4d58e33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/sfw/bin/gmake

PYTHON="/usr/local/bin/python"
VERS=1.3.4-1
PYVERSION := $(shell $(PYTHON) -c "import sys; print sys.version[0:3]")

default: clean package

package:
	-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 build/bin/bcfg2 | sed -e 's!/usr/bin/python!$(PYTHON)!' > build/bin/bcfg2.new && mv build/bin/bcfg2.new build/bin/bcfg2
	-chmod +x build/bin/bcfg2
	-sh ./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 build
	-rm -rf bcfg2-$(VERS).gz bcfg2-server-$(VERS).gz
	-rm -rf prototype.bcfg2.fixed prototype.bcfg2-server.fixed
	-rm -f prototype.*