File: builddeb

package info (click to toggle)
python-pyghmi 1.5.70-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,292 kB
  • sloc: python: 19,961; sh: 29; makefile: 18
file content (24 lines) | stat: -rwxr-xr-x 661 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
cd `dirname $0`
mkdir -p /tmp/pyghmi
cp -a * .git /tmp/pyghmi
cd /tmp/pyghmi
export PYEXEC=python3
export DSCARGS="--with-python2=False --with-python3=True"
if grep wheezy /etc/os-release; then
    # also it's old, use python2 instead of python3
    export PYEXEC=python
    export DSCARGS=""
fi
# If not PBR, use the setup.py.tmpl
$PYEXEC -c 'import pbr' || ./makesetup
VERSION=`$PYEXEC setup.py --version`
$PYEXEC setup.py sdist
py2dsc $DSCARGS 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/