blob: 413862d5b06428d5f0447b86332203ff4ed9cf86 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# remirepo/fedora spec file for php-bartlett-sarif-php-sdk
#
# Copyright (c) 2021 Remi Collet
# License: CC-BY-SA
# http://creativecommons.org/licenses/by-sa/4.0/
#
# Please, preserve the changelog entries
#
# See https://github.com/llaville/sarif-php-sdk/releases
%global gh_commit 70aa23a16b36b49a040980ba1061123b88ee0a2c
%global gh_short %(c=%{gh_commit}; echo ${c:0:7})
%global gh_owner llaville
%global gh_project sarif-php-sdk
# Namespace
%global ns_vendor Bartlett
%global ns_project Sarif
# Composer
%global c_vendor bartlett
%global c_project sarif-php-sdk
%bcond_without tests
%global upstream_version 1.0.1
#global upstream_prever RC1
Name: php-%{c_vendor}-%{c_project}
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
Release: 1%{?dist}
Summary: PHP library to create and manipulate SARIF logs
License: MIT
URL: https://github.com/%{gh_owner}/%{gh_project}
Source0: https://github.com/%{gh_owner}/%{gh_project}/archive/%{gh_commit}/%{name}-%{upstream_version}%{?upstream_prever}-%{gh_short}.tar.gz
BuildArch: noarch
BuildRequires: php(language) >= 7.1
BuildRequires: php-cli
BuildRequires: php-json
BuildRequires: php-pcre
BuildRequires: php-spl
# For our patch / autoloader
BuildRequires: php-fedora-autoloader-devel
# From composer.json, "require"
# "php": "^7.1|^8.0",
# "ext-json": "*",
# "ext-pcre": "*",
# "ext-spl": "*"
Requires: php(language) >= 7.1
Requires: php-json
Requires: php-pcre
Requires: php-spl
# Required by autoloader
Requires: php-composer(fedora/autoloader)
Provides: php-composer(%{c_vendor}/%{c_project}) = %{version}
%description
%{summary}.
SARIF, the Static Analysis Results Interchange Format, defines a standard
format for the output of static analysis tools. It is a powerful and
sophisticated format suited to the needs of a wide variety of tools.
Documentation: https://llaville.github.io/sarif-php-sdk/
Autoloader:
%prep
%setup -q -n %{gh_project}-%{gh_commit}
%build
phpab --template fedora --output src/autoload.php src
%install
mkdir -p %{buildroot}%{_datadir}/php/%{ns_vendor}
cp -pr src %{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}
%check
: Ensure our autoloader works
php -r '
require "%{buildroot}%{_datadir}/php/%{ns_vendor}/%{ns_project}/autoload.php";
exit (class_exists("Bartlett\\Sarif\\SarifLog") ? 0 : 1);'
%files
# remirepo:1
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc composer.json
%doc *.md
%dir %{_datadir}/php/%{ns_vendor}
%{_datadir}/php/%{ns_vendor}/%{ns_project}
%changelog
* Mon Dec 20 2021 Remi Collet <remi@remirepo.net> - 1.0.1-1
- update to 1.0.1
* Thu Dec 16 2021 Remi Collet <remi@remirepo.net> - 1.0.0-1
- Initial package
|