mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-25 02:52:07 +00:00
73d6511d9e
The source distrobution on CentOS7 does not work well with python2. Using python3 to build the dist for python2 and python3 fixes issues with extra data being missed in packaging.
21 lines
600 B
Bash
Executable File
21 lines
600 B
Bash
Executable File
#!/bin/sh
|
|
cd `dirname $0`
|
|
if [ -x ./makeman ]; then
|
|
./makeman
|
|
fi
|
|
./makesetup
|
|
VERSION=`cat VERSION`
|
|
PKGNAME=$(basename $(pwd))
|
|
python3 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:
|
|
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
|