Add support for building from git snapshots for packit

This commit is contained in:
Davide Cavalca 2021-10-26 09:16:01 -07:00
parent d57538e7d2
commit 1b69c1e456

View File

@ -41,6 +41,10 @@ BuildRequires: elfutils-devel
BuildRequires: libkdumpfile-devel
BuildRequires: zlib-devel
BuildRequires: xz-devel
# These are needed when building from git snapshots
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: libtool
%description %{_description}
@ -70,6 +74,10 @@ sed -r \
-e 's|https://docs.python.org/3|%{_docdir}/python3-docs/html|' \
-i docs/conf.py
%endif
# Ensure version is always set, even when building from git snapshots
if [ ! -f drgn/internal/version.py ]; then
echo '__version__ = "%{version}"' > drgn/internal/version.py
fi
%build
# verbose build