mirror of
https://opendev.org/x/pyghmi
synced 2025-01-13 11:17:47 +00:00
bc8deb4b68
The builddeb script attempted to build in a directory without .git, breaking the version deterimination logic. Change-Id: Ia2be3a75bdcdf9335586bb40e05e635f4b497ca5
22 lines
568 B
Bash
Executable File
22 lines
568 B
Bash
Executable File
#!/bin/bash
|
|
cd `dirname $0`
|
|
mkdir -p /tmp/pyghmi
|
|
cp -a * .git /tmp/pyghmi
|
|
cd /tmp/pyghmi
|
|
if grep wheezy /etc/os-release; then
|
|
# wheezy is difficult on pyca, use cryptodomex for that platform
|
|
patch -p1 < wheezy.patch
|
|
fi
|
|
# If not PBR, use the setup.py.tmpl
|
|
python -c 'import pbr' || ./makesetup
|
|
VERSION=`python setup.py --version`
|
|
python setup.py sdist
|
|
py2dsc dist/pyghmi-$VERSION.tar.gz
|
|
shopt -s extglob
|
|
cd deb_dist/!(*.orig)/
|
|
dpkg-buildpackage -rfakeroot -uc -us -i
|
|
cd -
|
|
rm -rf $(find deb_dist -mindepth 1 -maxdepth 1 -type d)
|
|
rm $1/*pyghmi*
|
|
cp deb_dist/* $1/
|