2009-09-08 17:40:51 +02:00
|
|
|
#!/bin/bash
|
2011-12-21 12:38:57 +01:00
|
|
|
source build_vars.sh
|
2009-09-08 17:40:51 +02:00
|
|
|
|
2011-10-27 18:50:37 +02:00
|
|
|
# Add build string for nightly builds
|
|
|
|
if [ "$1" == "nightly" ]; then
|
2011-10-27 19:07:38 +02:00
|
|
|
LOCAL_VERSION="$VERSION-$BUILD"
|
|
|
|
else
|
|
|
|
LOCAL_VERSION=$VERSION
|
2011-10-27 18:50:37 +02:00
|
|
|
fi
|
|
|
|
|
2010-12-23 13:34:02 +01:00
|
|
|
if [ ! -d $RPMHOME/SOURCES ]; then
|
|
|
|
mkdir -p $RPMHOME/SOURCES || exit 1
|
|
|
|
fi
|
|
|
|
|
2010-12-21 13:14:15 +01:00
|
|
|
echo "Creating source tarballs in $RPMHOME/SOURCES"
|
2009-09-08 17:40:51 +02:00
|
|
|
|
2010-12-23 13:34:02 +01:00
|
|
|
# Console
|
2016-08-29 15:33:35 +02:00
|
|
|
cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_console-$LOCAL_VERSION.tar.gz --exclude \.svn --exclude config.php --exclude \.exe --exclude enterprise pandora_console || exit 1
|
2010-12-23 13:34:02 +01:00
|
|
|
|
|
|
|
# Server
|
2016-08-29 15:33:35 +02:00
|
|
|
cd $CODEHOME && tar zcvf $RPMHOME/SOURCES/pandorafms_server-$LOCAL_VERSION.tar.gz --exclude \.svn pandora_server --exclude \.exe || exit 1
|
2009-11-11 19:06:58 +01:00
|
|
|
|
2011-02-22 12:04:40 +01:00
|
|
|
# Linux agent
|
2016-08-29 15:33:35 +02:00
|
|
|
cd $CODEHOME/pandora_agents/shellscript && tar zcvf $RPMHOME/SOURCES/pandorafms_agent-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn --exclude nohup linux || exit 1
|
2011-02-22 12:04:40 +01:00
|
|
|
|
|
|
|
# Unix agent
|
2022-12-23 12:01:16 +01:00
|
|
|
cd $CODEHOME/pandora_agents && tar zvcf $RPMHOME/SOURCES/pandorafms_agent_linux-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn --exclude nohup --exclude NT4 --exclude Darwin/dmg unix || exit 1
|
2009-09-08 17:40:51 +02:00
|
|
|
|
2010-12-23 13:34:02 +01:00
|
|
|
# Enterprise console
|
2016-08-29 15:33:35 +02:00
|
|
|
cd $PANDHOME_ENT/pandora_console && tar zcvf $RPMHOME/SOURCES/pandorafms_console_enterprise-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn enterprise/* || exit 1
|
2010-05-20 15:42:47 +02:00
|
|
|
|
2010-12-23 13:34:02 +01:00
|
|
|
# Enterprise server
|
2016-08-29 15:33:35 +02:00
|
|
|
cd $PANDHOME_ENT/pandora_server/ && tar zcvf $RPMHOME/SOURCES/pandorafms_server_enterprise-$LOCAL_VERSION.tar.gz --exclude \.exe --exclude \.svn PandoraFMS-Enterprise || exit 1
|
2010-05-20 15:42:47 +02:00
|
|
|
|
2011-10-27 19:07:38 +02:00
|
|
|
# Create symlinks needed to build RPM packages
|
|
|
|
if [ "$1" == "nightly" ]; then
|
|
|
|
ln -s $RPMHOME/SOURCES/pandorafms_console-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_console-$VERSION.tar.gz || exit 1
|
|
|
|
ln -s $RPMHOME/SOURCES/pandorafms_server-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_server-$VERSION.tar.gz || exit 1
|
|
|
|
ln -s $RPMHOME/SOURCES/pandorafms_agent-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_agent-$VERSION.tar.gz || exit 1
|
2022-12-23 12:01:16 +01:00
|
|
|
ln -s $RPMHOME/SOURCES/pandorafms_agent_linux-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_agent_linux-$VERSION.tar.gz || exit 1
|
2011-10-27 19:07:38 +02:00
|
|
|
ln -s $RPMHOME/SOURCES/pandorafms_console_enterprise-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_console_enterprise-$VERSION.tar.gz || exit 1
|
2014-06-05 11:04:00 +02:00
|
|
|
ln -s $RPMHOME/SOURCES/pandorafms_server_enterprise-$LOCAL_VERSION.tar.gz $RPMHOME/SOURCES/pandorafms_server_enterprise-$VERSION.tar.gz || exit 1
|
2011-10-27 19:07:38 +02:00
|
|
|
fi
|
|
|
|
|
2010-12-23 13:34:02 +01:00
|
|
|
exit 0
|
2009-09-08 17:40:51 +02:00
|
|
|
|