2010-05-18 Miguel de Dios <miguel.dedios@artica.es>

* DEBIAN/make_deb_package.sh: added parameter to make only packages of
	pear modules or not.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2753 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
mdtrooper 2010-05-19 16:29:14 +00:00
parent 6eb81e4838
commit cf99725ce4

View File

@ -14,8 +14,32 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_console_version="3.0.0"
pandora_console_version="3.1.0"
package_pear=1
package_pandora=1
for param in $@
do
if [ $param = "-h" -o $param = "--help" ]
then
echo "For only make packages of pear type +pear"
echo "For not make packages of pear type -pear"
exit 0
fi
if [ $param = "+pear" ]
then
package_pandora=0
fi
if [ $param = "-pear" ]
then
package_pear=0
fi
done
if [ $package_pandora -eq 1 ]
then
echo "Test if you have all the needed tools to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null
if [ $? = 1 ]
@ -25,7 +49,10 @@ then
else
echo "Found \"dpkg-debs\"."
fi
fi
if [ $package_pear -eq 1 ]
then
whereis dh-make-pear | cut -d":" -f2 | grep dh-make-pear > /dev/null
if [ $? = 1 ]
then
@ -43,6 +70,7 @@ then
else
echo "Found \"fakeroot\"."
fi
fi
whereis dpkg-buildpackage | cut -d":" -f2 | grep dpkg-buildpackage > /dev/null
if [ $? = 1 ]
@ -56,6 +84,9 @@ fi
cd ..
echo "Make a \"temp_package\" temporary dir for job."
mkdir -p temp_package
if [ $package_pandora -eq 1 ]
then
mkdir -p temp_package/var/www/pandora_console
echo "Make directory system tree for package."
@ -87,7 +118,10 @@ echo "END"
echo "Make the package \"Pandorafms console\"."
dpkg-deb --build temp_package
mv temp_package.deb pandorafms.console_$pandora_console_version.deb
fi
if [ $package_pear -eq 1 ]
then
echo "Make the package \"php-xml-rpc\"."
cd temp_package
dh-make-pear --maintainer "Miguel de Dios <miguel.dedios@artica.es>" XML_RPC
@ -96,6 +130,7 @@ dpkg-buildpackage -rfakeroot
cd ..
mv php-xml-rpc*.deb ..
cd ..
fi
echo "Delete the \"temp_package\" temporary dir for job."