fix(davs2): use %nil

This commit is contained in:
sadlerm4
2025-02-14 19:11:53 +11:00
parent 8868186c62
commit 629a31b09b
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -1,15 +1,15 @@
%global commit0 %global commit0 b41cf117452e2d73d827f02d3e30aa20f1c721ac
%global date 20220903 %global date 20220903
%global shortcommit %(c=%{commit0}; echo ${c:0:7}) %global shortcommit %(c=%{commit0}; echo ${c:0:7})
Name: davs2 Name: davs2
Version: 1.7 Version: 1.7
Release: 1%?dist Release: 1%{?shortcommit:.%{date}git%{shortcommit}}%{?dist}
Summary: An open-source decoder of AVS2-P2/IEEE1857.4 video coding standard Summary: An open-source decoder of AVS2-P2/IEEE1857.4 video coding standard
URL: https://github.com/pkuvcl/%{name} URL: https://github.com/pkuvcl/%{name}
License: GPLv2 License: GPLv2
%if "%len %{commit0}" != 0 %if %{commit0} != %nil
Source0: https://github.com/pkuvcl/%{name}/archive/%{commit0}/%{name}-%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz Source0: https://github.com/pkuvcl/%{name}/archive/%{commit0}/%{name}-%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz
%else %else
Source0: https://github.com/pkuvcl/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source0: https://github.com/pkuvcl/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
@@ -44,7 +44,7 @@ This package contains the shared library development files.
%prep %prep
# Use flat condition or it fails on EPEL 7 # Use flat condition or it fails on EPEL 7
%if "%len %{commit0}" != 0 %if %{commit0} != %nil
%autosetup -n %{name}-%{commit0} %autosetup -n %{name}-%{commit0}
%else %else
%autosetup %autosetup
+1 -1
View File
@@ -1,5 +1,5 @@
rpm.version(gh_tag("pkuvcl/davs2")); rpm.version(gh_tag("pkuvcl/davs2"));
if rpm.changed() { if rpm.changed() {
rpm.global("commit0", ""); rpm.global("commit0", "%nil");
rpm.release(); rpm.release();
} }