From d60df79d2acc8836460e2fc6124fbb4102902c1f Mon Sep 17 00:00:00 2001 From: Konrad Kleine Date: Jun 08 2022 13:32:02 +0000 Subject: Use new llvm-snapshot-builder macro --- diff --git a/python-lit.spec b/python-lit.spec index 5c73c47..11065dd 100644 --- a/python-lit.spec +++ b/python-lit.spec @@ -1,5 +1,11 @@ -%global srcname lit +%bcond_with snapshot_build +%if %{with snapshot_build} +# Unlock LLVM Snapshot LUA functions +%{llvm_sb} +%endif + +%global srcname lit %global lit_version 13.0.0 #global rc_ver 1 @@ -9,15 +15,19 @@ %if %{with snapshot_build} %undefine rc_ver -%global lit_version %{llvm_snapshot_version_major}.%{llvm_snapshot_version_minor}.%{llvm_snapshot_version_patch} -%global python_lit_srcdir llvm-%{lit_version}.src/utils/lit +%global lit_version %{lua:print(llvm_sb_version())} +lobal python_lit_srcdir llvm-%{lit_version}.src/utils/lit %endif %bcond_without check Name: python-%{srcname} -Version: %{lit_version}%{?rc_ver:~rc%{rc_ver}}%{?llvm_snapshot_version_suffix:~%{llvm_snapshot_version_suffix}} -Release: 3%{?dist} +%if %{with snapshot_build} +Version: %{lit_version}%{lua:print(llvm_sb_version_suffix())} +%else +Version: %{lit_version}%{?rc_ver:~rc%{rc_ver}} +%endif +Release: 4%{?dist} BuildArch: noarch License: NCSA @@ -26,7 +36,7 @@ URL: https://pypi.python.org/pypi/lit %if %{without snapshot_build} Source0: %{pypi_source %{srcname} %{lit_version}%{?rc_ver:rc%{rc_ver}}%{?post_ver:.post%{post_ver}}} %else -Source0: %{llvm_snapshot_source_prefix}llvm-%{llvm_snapshot_yyyymmdd}.src.tar.xz +Source0: %{lua:print(llvm_sb_url_base())}llvm-%{lua:print(llvm_sb_yyyymmdd())}.src.tar.xz %endif # for file check @@ -76,7 +86,9 @@ sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{srcna %{_bindir}/lit %changelog -%{?llvm_snapshot_changelog_entry} +%if %{with snapshot_build} +%{lua:print(llvm_sb_changelog_entry())} +%endif * Tue Jan 11 2022 Nikita Popov - 13.0.0-3 - Backport patch 46c947af7 for build reproducibility