Makefile 2.4 KB
Newer Older
1 2
SOFTWARE_BUILD_PATH='/opt/erp5/'`cat VERSION.txt`
PACKAGE_INSTALL_PATH='opt/erp5/'`cat VERSION.txt`
3 4 5
ifndef $(PACKAGE_VERSION)
PACKAGE_VERSION=`cat VERSION.txt`
endif
6

Łukasz Nowak's avatar
Łukasz Nowak committed
7
software: bin/buildout
8
	bin/buildout
9

Łukasz Nowak's avatar
Łukasz Nowak committed
10
bin/buildout:
11
	python bootstrap/bootstrap.py
12 13

# run make assert to check that all is working
14 15
assert: bin/python2.4
	bin/python2.4 tests/assertSoftware.py
16 17

debian-appliance:
18
	svn co --ignore-externals https://svn.erp5.org/repos/public/spec/debian-erp5-appliance/ debian-erp5-appliance
19
	sed -i "s,__PACKAGE_NAME__,erp5-`cat VERSION.txt`,g" debian-erp5-appliance/DEBIAN/control
20 21
	sed -i "s,__VERSION__,$(PACKAGE_VERSION),g" debian-erp5-appliance/DEBIAN/control
	sed -i "s,__VERSION__,`cat VERSION.txt`,g" debian-erp5-appliance/DEBIAN/prerm
Lucas Carvalho's avatar
Lucas Carvalho committed
22 23 24
	sudo svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout $(SOFTWARE_BUILD_PATH)
	sudo chown -R `whoami` $(SOFTWARE_BUILD_PATH)
	sudo $(SOFTWARE_BUILD_PATH)/helpers/debian.lenny.sh
Lucas Carvalho's avatar
Typo.  
Lucas Carvalho committed
25
	cd $(SOFTWARE_BUILD_PATH); $(MAKE) $(MFLAGS)
26 27
	mkdir -p debian-erp5-appliance/$(PACKAGE_INSTALL_PATH)
	mv $(SOFTWARE_BUILD_PATH)/* debian-erp5-appliance/$(PACKAGE_INSTALL_PATH)
28
	rm -rf debian-erp5-appliance/*.txt
29 30 31
	rm -rf debian-erp5-appliance/*.TXT
	rm -rf `find debian-erp5-appliance/ -type d -name .svn`
	rm -rf `find debian-erp5-appliance/ -name *.pyc`
32
	dpkg-deb -b debian-erp5-appliance/ .
33

34 35
rpm-appliance:
	svn co https://svn.erp5.org/repos/public/erp5/trunk/utils/rpmgen rpmgen
36
	# set the correct name erp5-5.4.6
Lucas Carvalho's avatar
Typo.  
Lucas Carvalho committed
37
	sed -i "s,name = erp5-official-buildout,name = erp5-`cat VERSION.txt`,g" rpmgen/buildout.cfg
38 39 40 41 42 43 44 45
	# set the correct version defined in the main buildout
	sed -i "s,\$${checkout:location\}\/VERSION.txt,`cat VERSION.txt`,g" rpmgen/buildout.cfg
	# set the correct release
	sed -i "s,release = 001,release = $(PACKAGE_VERSION),g" rpmgen/buildout.cfg
	# it must use version defined in the main buildout
	sed -i "s,\$$(shell cat parts/checkout/VERSION.txt), `cat VERSION.txt`,g" rpmgen/Makefile
	sudo helpers/mandriva2010.0.sh
	# just make and wait...
46 47
	cd rpmgen; make
	# now we have the erp5 software rpm and we need it installed to build tiolive application rpm
Lucas Carvalho's avatar
Lucas Carvalho committed
48 49 50
	if test -d ~/rpmbuild/RPMS/x86_64; \
	then find ~/rpmbuild/RPMS/x86_64/ -name  erp5-`cat VERSION.txt`*.rpm -print0 | xargs -0 sudo urpmi; \
	else find ~/rpmbuild/RPMS/i586/ -name  erp5-`cat VERSION.txt`*.rpm -print0 | xargs -0 sudo urpmi; \
51 52 53
 	fi
	# building tiolive appliance
	sudo rpmbuild -bb rpmgen/spec/tiolive-application-buildout-mandriva2010.spec