From ec07bb59328583fddd880dae2f43e1af5bac4070 Mon Sep 17 00:00:00 2001
From: Lucas Carvalho <lucas@nexedi.com>
Date: Tue, 2 Mar 2010 01:15:03 +0000
Subject: [PATCH] Clean up the debian package. Fixed path issues.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@33200 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 buildout/Makefile | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/buildout/Makefile b/buildout/Makefile
index 2c84392fba..88d6cb42d1 100644
--- a/buildout/Makefile
+++ b/buildout/Makefile
@@ -1,4 +1,5 @@
-INSTALL_PATH='opt/erp5/'`cat VERSION.txt`
+SOFTWARE_BUILD_PATH='/opt/erp5/'`cat VERSION.txt`
+PACKAGE_INSTALL_PATH='opt/erp5/'`cat VERSION.txt`
 
 software: bin/buildout
 	bin/buildout
@@ -11,10 +12,14 @@ assert: bin/python2.4
 	bin/python2.4 tests/assertSoftware.py
 
 debian-appliance:
-	svn co https://svn.erp5.org/repos/public/spec/debian-erp5-appliance/ debian-erp5-appliance
-	cd debian-erp5-appliance/$(INSTALL_PATH); $(MAKE) $(MFLAGS)
+	svn co https://svn.erp5.org/repos/public/erp5/trunk/buildout $(SOFTWARE_BUILD_PATH)
+	cd $(SOFTWARE_BUILD_PATH); $(MAKE) $(MFLAGS)
+	svn co --ignore-externals https://svn.erp5.org/repos/public/spec/debian-erp5-appliance/ debian-erp5-appliance
+	mkdir -p debian-erp5-appliance/$(PACKAGE_INSTALL_PATH)
+	mv $(SOFTWARE_BUILD_PATH)/* debian-erp5-appliance/$(PACKAGE_INSTALL_PATH)
 	rm -rf debian-erp5-appliance/*.txt
-	rm -rf `find . -type d -name .svn`
-	rm -rf `find . -name *.pyc`
-	cd ../../../../
+	rm -rf debian-erp5-appliance/*.TXT
+	rm -rf `find debian-erp5-appliance/ -type d -name .svn`
+	rm -rf `find debian-erp5-appliance/ -name *.pyc`
 	dpkg-deb -b debian-erp5-appliance/ .
+
-- 
2.30.9