-created a qpid service script Change-Id: I380333efad2954e7a9b6d1b27dc8a497cf38acf3 Former-commit-id:7b4935a0ef
[formerlyec584b4d4b
] [formerlyff34587e94
] [formerly7b4935a0ef
[formerlyec584b4d4b
] [formerlyff34587e94
] [formerly54697ff658
[formerlyff34587e94
[formerly ee5806c98eb57680403e4f7768f92af1faa75de4]]]] Former-commit-id:54697ff658
Former-commit-id:f8e120a219
[formerly45dd0b02ff
] [formerly 32df1491d555132dea478823ea8d5513fb36a0d5 [formerly0cf405d8d9
]] Former-commit-id: 82ecdb55cbcc1cd43992ca51e32b92ab48329fec [formerlyce2d246314
] Former-commit-id:b7f7312c7d
59 lines
1.1 KiB
Bash
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
|