awips2/rpms/awips2.qpid/0.18/deploy.builder/build.sh
Bryan Kowal 1ecf83c57c Issue #1503 - initial commit for build of Qpid 0.18 rpms
-created a qpid service script

Change-Id: I380333efad2954e7a9b6d1b27dc8a497cf38acf3

Former-commit-id: 7b4935a0ef [formerly ec584b4d4b] [formerly ff34587e94] [formerly 7b4935a0ef [formerly ec584b4d4b] [formerly ff34587e94] [formerly 54697ff658 [formerly ff34587e94 [formerly ee5806c98eb57680403e4f7768f92af1faa75de4]]]]
Former-commit-id: 54697ff658
Former-commit-id: f8e120a219 [formerly 45dd0b02ff] [formerly 32df1491d555132dea478823ea8d5513fb36a0d5 [formerly 0cf405d8d9]]
Former-commit-id: 82ecdb55cbcc1cd43992ca51e32b92ab48329fec [formerly ce2d246314]
Former-commit-id: b7f7312c7d
2013-01-28 11:21:24 -06:00

59 lines
1.1 KiB
Bash

#!/bin/bash
# Verify that the workspace has been specified
if [ -z ${WORKSPACE} ]; then
echo "Error: the location of the baseline workspace must be specified using the WORKSPACE environment variable."
exit 1
fi
__SPECS=qpid-java.spec
__SPECS_PATCH0=qpid-java.spec.patch0
# apply the rpm specification patch
cd ../SPECS
if [ $? -ne 0 ]; then
exit 1
fi
patch -p1 -i ${__SPECS_PATCH0}
if [ $? -ne 0 ]; then
exit 1
fi
pushd . > /dev/null
cd ../
export TOPDIR=`pwd`
# create the rpm directory structure
if [ -d ${TOPDIR}/BUILD ]; then
rm -rf ${TOPDIR}/BUILD
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${TOPDIR}/BUILD
if [ -d ${TOPDIR}/RPMS ]; then
rm -rf ${TOPDIR}/RPMS
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${TOPDIR}/RPMS
if [ -d ${TOPDIR}/SRPMS ]; then
rm -rf ${TOPDIR}/SRPMS
if [ $? -ne 0 ]; then
exit 1
fi
fi
mkdir ${TOPDIR}/SRPMS
# build the rpm
rpmbuild -ba \
--define "_topdir ${TOPDIR}" \
--define "_baseline_workspace ${WORKSPACE}" \
SPECS/${__SPECS}
if [ $? -ne 0 ]; then
exit 1
fi
popd > /dev/null
exit 0