2009-11-04 Miguel de Dios <miguel.dedios@artica.es>

* 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@2077 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2009-11-04 15:39:35 +00:00
parent 880227e280
commit 4010f73ec9
2 changed files with 30 additions and 27 deletions

View File

@ -1,3 +1,8 @@
2009-11-04 Miguel de Dios <miguel.dedios@artica.es>
* 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-10-30 Miguel de Dios <miguel.dedios@artica.es> 2009-10-30 Miguel de Dios <miguel.dedios@artica.es>
* DEBIAN/control, DEBIAN/md5sums, DEBIAN/postinst, DEBIAN/prerm, * DEBIAN/control, DEBIAN/md5sums, DEBIAN/postinst, DEBIAN/prerm,

View File

@ -16,33 +16,26 @@
pandora_agent_version="3.0.0.rc1" pandora_agent_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 whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
if [ $? = 1 ] if [ $? = 1 ]
then then
echo No found \"dpkg-deb\" aplication, please install. echo "No found \"dpkg-deb\" aplication, please install."
exit 1 exit 1
else else
echo Found \"dpkg-debs\". echo "Found \"dpkg-debs\"."
fi fi
echo Make a \"temp_package\" temp dir for job. echo "Make a \"temp_package\" temp dir for job."
mkdir temp_package mkdir -p temp_package/usr/share/pandora_agent
mkdir temp_package/usr mkdir -p temp_package/var/spool/pandora/data_out
mkdir temp_package/usr/bin mkdir -p temp_package/var/log/pandora/
mkdir temp_package/usr/share mkdir -p temp_package/etc/pandora
mkdir temp_package/usr/share/pandora_agent mkdir -p temp_package/etc/init.d/
mkdir temp_package/var
mkdir temp_package/var/spool
mkdir temp_package/var/spool/pandora
mkdir temp_package/var/spool/pandora/data_out
mkdir temp_package/var/log
mkdir temp_package/var/log/pandora/
mkdir temp_package/etc
mkdir temp_package/etc/pandora
mkdir temp_package/etc/init.d/
echo Make directory system tree for package. cd ..
echo "Make directory system tree for package."
cp DEBIAN temp_package -R cp DEBIAN temp_package -R
PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log PANDORA_LOG=temp_package/var/log/pandora/pandora_agent.log
@ -82,7 +75,7 @@ cp pandora_agent_daemon $PANDORA_STARTUP
touch $PANDORA_CFG/pandora_agent.conf touch $PANDORA_CFG/pandora_agent.conf
echo Remove the SVN files. echo "Remove the SVN files and other temp files."
for item in `find temp_package` for item in `find temp_package`
do do
echo -n "." echo -n "."
@ -92,11 +85,17 @@ do
then then
rm -rf $item rm -rf $item
fi fi
echo $item | grep "make_deb_package.sh" > /dev/null
#last command success
if [ $? -eq 0 ]
then
rm -rf $item
fi
done 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` for item in `find temp_package`
do do
echo -n "." echo -n "."
@ -114,12 +113,11 @@ do
fi fi
fi fi
done done
echo "END"
echo "" echo "Make the package \"Pandorafms console\"."
echo Make the package \"Pandorafms console\".
dpkg-deb --build temp_package dpkg-deb --build temp_package
mv temp_package.deb pandorafms.agent_$pandora_agent_version.deb mv temp_package.deb pandorafms.agent_$pandora_agent_version.deb
echo Delete the \"temp_package\" temp dir for job. echo "Delete the \"temp_package\" temp dir for job."
rm -rf temp_package rm -rf temp_package