2010-12-23 Ramon Novoa <rnovoa@artica.es>

* build_src.sh, build_windows_agent.sh,
	  build_deb.sh, build_rpm.sh: Return error codes and exclude .po files.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3696 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
Ramon Novoa 2010-12-23 12:34:02 +00:00
parent da2304eb14
commit f3ec02bf57
5 changed files with 66 additions and 48 deletions

View File

@ -1,3 +1,8 @@
2010-12-23 Ramon Novoa <rnovoa@artica.es>
* build_src.sh, build_windows_agent.sh,
build_deb.sh, build_rpm.sh: Return error codes and exclude .po files.
2010-12-21 Ramon Novoa <rnovoa@artica.es>
* build_src.sh, build_deb.sh, build_rpm.sh: Small fixes to build scripts.

View File

@ -2,35 +2,27 @@
CODEHOME=~/code/pandora/trunk
CODEHOME_ENT=~/code/artica/code
RPMHOME=/usr/src/packages
START_DIR=`pwd`
mkdir -p $RPMHOME/DEB
if [ ! -d $RPMHOME/DEB ]; then
mkdir -p $RPMHOME/DEB || exit 1
fi
echo "Creating DEB packages in $RPMHOME/DEB"
cd $CODEHOME/pandora_console/DEBIAN
bash ./make_deb_package.sh
cd ..
mv *.deb $RPMHOME/DEB
cd $CODEHOME/pandora_server/DEBIAN
bash ./make_deb_package.sh
cd ..
mv *.deb $RPMHOME/DEB
# Console
cd $CODEHOME/pandora_console/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1
cd $CODEHOME/pandora_agents/unix/DEBIAN
bash ./make_deb_package.sh
cd ..
mv *.deb $RPMHOME/DEB
# Server
cd $CODEHOME/pandora_server/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1
cd $CODEHOME_ENT/pandora/trunk/pandora_console/DEBIAN
bash ./make_deb_package.sh
cd ..
mv *.deb $RPMHOME/DEB
# Unix agent
cd $CODEHOME/pandora_agents/unix/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1
cd $CODEHOME_ENT/pandora/trunk/pandora_server/PandoraFMS-Enterprise/DEBIAN
bash ./make_deb_package.sh
cd ..
mv *.deb $RPMHOME/DEB
# Enterprise console
cd $CODEHOME_ENT/pandora/trunk/pandora_console/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1
cd $START_DIR
# Enterprise server
cd $CODEHOME_ENT/pandora/trunk/pandora_server/PandoraFMS-Enterprise/DEBIAN && bash ./make_deb_package.sh && mv ../*.deb $RPMHOME/DEB || exit 1
exit 0

View File

@ -3,12 +3,29 @@ CODEHOME=~/code/pandora/trunk
CODEHOME_ENT=~/code/artica/code
RPMHOME=/usr/src/packages
if [ ! -d $RPMHOME/RPMS ]; then
mkdir -p $RPMHOME/RPMS || exit 1
fi
echo "Creating RPM packages in $RPMHOME/RPMS"
rpmbuild -ba $CODEHOME/pandora_console/pandora_console.spec
rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.spec
rpmbuild -ba $CODEHOME/pandora_server/pandora_server.spec
rpmbuild -ba $CODEHOME_ENT/pandora/trunk/pandora_console/enterprise/pandora_console_enterprise.spec
rpmbuild -ba $CODEHOME_ENT/pandora/trunk/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spec
rpmbuild -ba $CODEHOME_ENT/updatemanager/keygen/pandora/pandora_keygen.spec
# Console
rpmbuild -ba $CODEHOME/pandora_console/pandora_console.spec || exit 1
# Server
rpmbuild -ba $CODEHOME/pandora_server/pandora_server.spec || exit 1
# Unix agent
rpmbuild -ba $CODEHOME/pandora_agents/unix/pandora_agent.spec || exit 1
# Enterprise console
rpmbuild -ba $CODEHOME_ENT/pandora/trunk/pandora_console/enterprise/pandora_console_enterprise.spec || exit 1
# Enterprise server
rpmbuild -ba $CODEHOME_ENT/pandora/trunk/pandora_server/PandoraFMS-Enterprise/pandora_server_enterprise.spec || exit 1
# Updatemanager keygen
rpmbuild -ba $CODEHOME_ENT/updatemanager/keygen/pandora/pandora_keygen.spec || exit 1
exit 0

View File

@ -5,29 +5,29 @@ RPMHOME=/usr/src/packages
VERSION=$(grep 'my $pandora_version =' $CODEHOME/pandora_server/lib/PandoraFMS/Config.pm | awk '{print substr($4, 2, length($4) - 3)}')
KEYGEN_VERSION=$(grep "%define version" $CODEHOME_ENT/updatemanager/keygen/pandora/pandora_keygen.spec | awk '{print $3}')
if [ ! -d $RPMHOME/SOURCES ]; then
mkdir -p $RPMHOME/SOURCES || exit 1
fi
echo "Creating source tarballs in $RPMHOME/SOURCES"
rm -Rf /usr/src/rpm/SOURCES/pandorafms_*.tar.gz
cd $CODEHOME/pandora_agents
tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$VERSION.tar.gz --exclude \.svn --exclude nohup linux
tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$VERSION.tar.gz --exclude \.svn --exclude nohup --exclude NT4 unix
# Console
cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_console-$VERSION.tar.gz --exclude \.svn --exclude config.php --exclude enterprise --exclude \*\.po pandora_console || exit 1
cd $CODEHOME
tar zcvf $RPMHOME/SOURCES/pandorafms_server-$VERSION.tar.gz --exclude \.svn pandora_server
# Server
cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_server-$VERSION.tar.gz --exclude \.svn pandora_server || exit 1
# Console OpenSource
cd $CODEHOME
tar zcvf $RPMHOME/SOURCES/pandorafms_console-$VERSION.tar.gz --exclude \.svn --exclude config.php --exclude enterprise pandora_console
# Linux and Unix agents
cd $CODEHOME/pandora_agents && tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$VERSION.tar.gz --exclude \.svn --exclude nohup linux && tar zvcf $RPMHOME/SOURCES/pandorafms_agent_unix-$VERSION.tar.gz --exclude \.svn --exclude nohup --exclude NT4 unix || exit 1
# Console Enterprise
cd $CODEHOME_ENT/pandora/trunk/pandora_console
tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$VERSION.tar.gz --exclude \.svn enterprise/*
# Enterprise console
cd $CODEHOME_ENT/pandora/trunk/pandora_console && tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$VERSION.tar.gz --exclude \.svn enterprise/* || exit 1
# Server OpenSource
cd $CODEHOME_ENT/pandora/trunk/pandora_server/
tar zcvf $RPMHOME/SOURCES/pandorafms_server_enterprise-$VERSION.tar.gz --exclude \.svn PandoraFMS-Enterprise
# Enterprise server
cd $CODEHOME_ENT/pandora/trunk/pandora_server/ && tar zcvf $RPMHOME/SOURCES/pandorafms_server_enterprise-$VERSION.tar.gz --exclude \.svn PandoraFMS-Enterprise || exit 1
# Updatemanager Client keygen
cd $CODEHOME_ENT/updatemanager/keygen
tar cvzf $RPMHOME/SOURCES/pandorafms_keygen-$KEYGEN_VERSION.tar.gz --exclude .svn --exclude keygen --exclude keygen.i386.static --exclude pandora_keygen.spec pandora
# Updatemanager keygen
cd $CODEHOME_ENT/updatemanager/keygen && tar cvzf $RPMHOME/SOURCES/pandorafms_keygen-$KEYGEN_VERSION.tar.gz --exclude .svn --exclude keygen --exclude keygen.i386.static --exclude pandora_keygen.spec pandora || exit 1
exit 0

View File

@ -2,9 +2,13 @@
CODEHOME=~/code/pandora/trunk
RPMHOME=/usr/src/packages
mkdir -p $RPMHOME/EXE
if [ ! -d $RPMHOME/EXE ]; then
mkdir -p $RPMHOME/EXE || exit 1
fi
echo "Creating Pandora FMS Agent Windows installer in $RPMHOME/EXE"
# Windows agent
rm -rf $CODEHOME/pandora_agents/win32/installer/output/*.exe
cd $CODEHOME/pandora_agents/win32
./build.sh