nova/plugins/xenserver/xenapi/contrib/build-rpm.sh
Naveed Massjouni 998b5ba2c7 Changed package name to openstack-xen-plugins per dprince's suggestion.
All the files in /etc/xapi.d/plugins must be executable.
Added dependency on parted.
Renamed build.sh to build-rpm.sh.
2011-06-27 12:04:44 -04:00

21 lines
502 B
Bash
Executable File

#!/bin/bash
PACKAGE=openstack-xen-plugins
RPMBUILD_DIR=$PWD/rpmbuild
if [ ! -d $RPMBUILD_DIR ]; then
echo $RPMBUILD_DIR is missing
exit 1
fi
for dir in BUILD BUILDROOT SRPMS RPMS SOURCES; do
rm -rf $RPMBUILD_DIR/$dir
mkdir -p $RPMBUILD_DIR/$dir
done
rm -rf /tmp/$PACKAGE
mkdir /tmp/$PACKAGE
cp -r ../etc/xapi.d /tmp/$PACKAGE
tar czf $RPMBUILD_DIR/SOURCES/$PACKAGE.tar.gz -C /tmp $PACKAGE
rpmbuild -ba --nodeps --define "_topdir $RPMBUILD_DIR" \
$RPMBUILD_DIR/SPECS/$PACKAGE.spec