aboutsummaryrefslogtreecommitdiffhomepage
path: root/debian/tests/smoke-rpm
blob: 75b479855790dc802e60399baeb04ef2083368be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/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
%python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; import sys; sys.stdout.write(get_python_lib().replace('dist-', 'site-'))")
%python_sitearch %(%{__python} -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 python -c "import setuptools"; then
  gbp buildpackage-rpm --git-packaging-dir=packaging/ -bb --nodeps
  rm -r .git ~/.rpmmacros
fi