From 5c4988e1fe0f4316a7042de87c522808f7e73f27 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Tue, 3 Nov 2009 17:15:06 +0000 Subject: [PATCH] 2009-11-03 Miguel de Dios * DEBIAN/make_deb_package.sh: move the script to make the deb package into the DEBIAN and change some things into the sourcecode for the directory change. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2071 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 ++ .../{ => DEBIAN}/make_deb_package.sh | 61 +++++++++++-------- 2 files changed, 39 insertions(+), 27 deletions(-) rename pandora_console/{ => DEBIAN}/make_deb_package.sh (65%) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 175c0164fa..feac34e9b6 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 Miguel de Dios + * DEBIAN/make_deb_package.sh: move the script to make the deb package into + the DEBIAN and change some things into the sourcecode for the directory + change. + 2009-11-03 Raul Mateos * godmode/alerts/configure*.php: Improving integrity of diff --git a/pandora_console/make_deb_package.sh b/pandora_console/DEBIAN/make_deb_package.sh similarity index 65% rename from pandora_console/make_deb_package.sh rename to pandora_console/DEBIAN/make_deb_package.sh index 9e25d722af..9ff343a8d8 100644 --- a/pandora_console/make_deb_package.sh +++ b/pandora_console/DEBIAN/make_deb_package.sh @@ -16,53 +16,52 @@ pandora_console_version="3.0.0.rc1" -echo Test if you has the tools for to make the packages. +echo "Test if you has the tools for to make the packages." whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null if [ $? = 1 ] then - echo No found \"dpkg-deb\" aplication, please install. + echo "No found \"dpkg-deb\" aplication, please install." exit 1 else - echo Found \"dpkg-debs\". + echo "Found \"dpkg-debs\"." fi whereis dh-make-pear | cut -d":" -f2 | grep dh-make-pear > /dev/null if [ $? = 1 ] then - echo No found \"dh-make-pear\" aplication, please install. + echo "No found \"dh-make-pear\" aplication, please install." exit 1 else - echo Found \"dh-make-pear\". + echo "Found \"dh-make-pear\"." fi whereis fakeroot | cut -d":" -f2 | grep fakeroot > /dev/null if [ $? = 1 ] then - echo No found \"fakeroot\" aplication, please install. + echo "No found \"fakeroot\" aplication, please install." exit 1 else - echo Found \"fakeroot\". + echo "Found \"fakeroot\"." fi whereis dpkg-buildpackage | cut -d":" -f2 | grep dpkg-buildpackage > /dev/null if [ $? = 1 ] then - echo No found \"dpkg-buildpackage\" aplication, please install. + echo "No found \"dpkg-buildpackage\" aplication, please install." exit 1 else - echo Found \"dpkg-buildpackage\". + echo "Found \"dpkg-buildpackage\"." fi -echo Make a \"temp_package\" temp dir for job. -mkdir temp_package -mkdir temp_package/var -mkdir temp_package/var/www/ -mkdir temp_package/var/www/pandora_console +echo "Make a \"temp_package\" temp dir for job." +mkdir -p ../temp_package/var/www/pandora_console +cd .. -echo Make directory system tree for package. -for item in `ls` +echo "Make directory system tree for package." +for item in `ls ` do echo -n "." + if [ $item != 'temp_package' -a $item != 'pandora_console.spec' ] then if [ $item = 'DEBIAN' ] @@ -73,10 +72,13 @@ do fi fi done +echo "END" -echo "" +# if [ $item != 'temp_package' -a $item != 'pandora_console.spec' -a $item != 'make_deb_package.sh' ] +# then +# fi -echo Remove the SVN files. +echo "Remove the SVN files and other temp files." for item in `find temp_package` do echo -n "." @@ -86,11 +88,17 @@ do then rm -rf $item fi + + echo $item | grep "make_deb_package.sh" > /dev/null + #last command success + if [ $? -eq 0 ] + then + rm -rf $item + fi done +echo "END" -echo "" - -echo Calcule md5sum for md5sums file control of package +echo "Calcule md5sum for md5sums file control of package." for item in `find temp_package` do echo -n "." @@ -108,15 +116,13 @@ do fi fi done +echo "END" -echo "" - -echo Make the package \"Pandorafms console\". +echo "Make the package \"Pandorafms console\"." dpkg-deb --build temp_package mv temp_package.deb pandorafms.console_$pandora_console_version.deb - -echo Make the package \"php-xml-rpc\". +echo "Make the package \"php-xml-rpc\"." cd temp_package dh-make-pear --maintainer "Miguel de Dios " XML_RPC cd php-xml-rpc-* @@ -125,5 +131,6 @@ cd .. mv php-xml-rpc*.deb .. cd .. -echo Delete the \"temp_package\" temp dir for job. + +echo "Delete the \"temp_package\" temp dir for job." rm -rf temp_package