aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian/tests/smoke-rpm
blob: de0a62ff3ab6e0da695b3da1a70473c1addf4d00 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh

set -e
set -x

git init .
git config user.email "you@example.com"
git config user.name "Doesnot Matter"
git add .
git commit -m"Smoketest" -a
cat <<EOF >> ~/.rpmmacros
%__python3 /usr/bin/python3
%python_sitelib %(%{__python3} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib().replace('dist-', 'site-'))")
%python_sitearch %(%{__python3} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib(1).replace('dist-', 'site-'))")
EOF

gbp buildpackage-rpm --help

# Build an RPM of ourselfes if build-deps are available
if python3 -c "import setuptools"; then
  gbp buildpackage-rpm --git-packaging-dir=packaging/ -bb --nodeps
  rm -r .git ~/.rpmmacros
fi