summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2025-01-14 12:24:09 +0100
committerRemi Collet <remi@php.net>2025-01-14 12:24:09 +0100
commit63f635cb1958f26315edc83aabee4b5500f6b900 (patch)
tree952c68d4d49f42a14796ba79766524a6337d2bb6
parentfe45e61dffa7a2bd542bdff48ac99db9d32fa4dc (diff)
use forge* macros
-rw-r--r--php-solidworx-aspect.spec24
1 files changed, 13 insertions, 11 deletions
diff --git a/php-solidworx-aspect.spec b/php-solidworx-aspect.spec
index 9193837..f389a1a 100644
--- a/php-solidworx-aspect.spec
+++ b/php-solidworx-aspect.spec
@@ -11,27 +11,29 @@
%bcond_without tests
-# PIE / packagist
-%global pie_vend solidworx
-%global pie_proj aspect
-# Github
-%global gh_vend SolidWorx
-%global gh_proj aspect
-%global gh_commit f199ab98496db0d040545ca10d1b7fdc166186e3
-%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
# Extension
%global ext_name aspect
%global ini_name 40-%{ext_name}.ini
%global upstream_version 0.1.0
#global upstream_prever RC1
+# PIE / packagist
+%global pie_vend solidworx
+%global pie_proj aspect
+# Github forge
+%global gh_vend SolidWorx
+%global gh_proj aspect
+%global forgeurl https://github.com/%{gh_vend}/%{gh_proj}
+#global commit f199ab98496db0d040545ca10d1b7fdc166186e3
+%global tag %{upstream_version}%{?upstream_prever}
+%forgemeta
Summary: PHP Aspect Extension
Name: %{?scl_prefix}php-%{pie_vend}-%{pie_proj}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}
License: MIT
-URL: https://github.com/%{gh_vend}/%{gh_proj}
-Source0: %{URL}/archive/%{gh_commit}/%{gh_proj}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz
+URL: %{forgeurl}
+Source0: %{forgesource}
BuildRequires: make
BuildRequires: gcc
@@ -56,7 +58,7 @@ Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSIO
%prep
-%setup -q -n %{gh_proj}-%{gh_commit}
+%forgesetup
: Sanity check, really often broken
extver=$(sed -n '/# define PHP_ASPECT_VERSION/{s/.* "//;s/".*$//;p}' php_aspect.h)