2014-07-14 18:54:12 +00:00
|
|
|
#!/bin/sh
|
|
|
|
cd `dirname $0`
|
|
|
|
./makesetup
|
|
|
|
VERSION=`cat VERSION`
|
|
|
|
PKGNAME=$(basename $(pwd))
|
|
|
|
python setup.py sdist > /dev/null 2>&1
|
|
|
|
cp dist/*.tar.gz ~/rpmbuild/SOURCES
|
|
|
|
sed -e 's/#VERSION#/'$VERSION/ $PKGNAME.spec.tmpl > ~/rpmbuild/SPECS/$PKGNAME.spec
|
|
|
|
rpmbuild -ba ~/rpmbuild/SPECS/$PKGNAME.spec 2> /dev/null |grep ^Wrote:
|
2015-02-02 21:41:37 +00:00
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo "[ERROR] rpmbuild returned non-zero, run: rpmbuild -ba ~/rpmbuild/SPECS/$PKGNAME.spec"
|
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
# Clean up the generated files in this directory
|
|
|
|
rm -rf $PKGNAME.egg-info dist setup.py
|
|
|
|
fi
|
|
|
|
exit 0
|