summaryrefslogtreecommitdiffstats
path: root/php-geshi.spec
blob: 501de3f0247e99476a274b51d3cb900a0aba27e9 (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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# remirepo spec file for php-geshi, from:
#
# Fedora spec file for php-geshi
#
# License: MIT
# http://opensource.org/licenses/MIT
#

Name:           php-geshi
Version:        1.0.9.1
Release:        2%{?dist}
Summary:        Generic syntax highlighter

License:        GPLv2+
URL:            https://github.com/GeSHi/geshi-1.0
Source0:        %{url}/archive/v%{version}/GeSHi-%{version}.tar.gz

BuildArch:      noarch

# from composer.json "require-dev": {
#        "phpunit/phpunit": "^5.7 || ^6.5 || ^7.5 || ^8.2"
%if 0%{?rhel} == 7
%global phpunit %{_bindir}/phpunit
BuildRequires:  %{phpunit}
%endif
%if 0%{?fedora} >= 29 || 0%{?rhel} >= 8
%global phpunit %{_bindir}/phpunit8
BuildRequires:  %{phpunit}
%endif

Requires:       php-mbstring
Requires:       php-pcre

Provides:       php-composer(geshi/geshi) = %{version}

%description
GeSHi aims to be a simple but powerful highlighting class,
with the following goals:
    * Support for a wide range of popular languages
    * Easy to add a new language for highlighting
    * Highly customisable output formats


%prep
%setup -q -n geshi-1.0-%{version}

find docs -type f -exec chmod a-x {} ';'
find . -type f -name "*.php" -exec chmod a-x {} ';'


%build
# Nothing to build


%install
mkdir -p %{buildroot}%{_datadir}/php/
cd src
cp -a geshi geshi.php %{buildroot}%{_datadir}/php/


%if 0%{?phpunit:1}
%check
%{phpunit} --verbose
%endif


%files
%{!?_licensedir:%global license %%doc}
%license LICENSE
%doc BUGS CHANGELOG README.md THANKS
%doc docs/* contrib/
%doc composer.json
%{_datadir}/php/geshi.php
%{_datadir}/php/geshi


%changelog
* Thu Nov 14 2019 Remi Collet <remi@remirepo.net> - 1.0.9.1-2
- provides php-composer(geshi/geshi)
- run upstream test suite

* Mon Oct 21 2019 Artur Iwicki <fedora@svgames.pl> - 1.0.9.1-1
- Update to version 1.0.9.1
- Drop PHP 7.2 deprecation warning patch (merged upstream)

* Fri Oct 04 2019 Xavier Bachelot <xavier@bachelot.org> - 1.0.9.0-1
- Update to 1.0.9.0.
- Clean up specfile.
- Add upstream patch to fix a php 7.2 deprecation warning.
  (Thanks Artur Iwicki)

* Wed Aug 22 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.8.11-1
- Update to 1.0.8.11, CVE-2012-3521

* Tue Aug 21 2012 Xavier Bachelot <xavier@bachelot.org> 1.0.8.11-1
- Update to 1.0.8.11.
- Fix remote directory traversal and information disclosure bug (RHBZ#850425).
- Fix Requires (RHBZ#848699).

* Thu Aug 16 2012 Remi Collet <RPMS@FamilleCollet.com> - 1.0.8.10-2
- drop Requires "php"

* Tue Jul 05 2011 Remi Collet <RPMS@FamilleCollet.com> - 1.0.8.10-1
- rebuild for remi repository

* Tue Jun 28 2011 Xavier Bachelot <xavier@bachelot.org> 1.0.8.10-1
- Update to 1.0.8.10.

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jun 23 2010 Remi Collet <RPMS@FamilleCollet.com> - 1.0.8.8-1
- rebuild for remi repository

* Tue Jun 15 2010 Xavier Bachelot <xavier@bachelot.org> 1.0.8.8-1
- Update to 1.0.8.8.
- Fix Source0: URL, upstream changed tarball name.

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.8.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Apr 15 2009 Xavier Bachelot <xavier@bachelot.org> 1.0.8.3-1
- Update to 1.0.8.3.

* Thu Mar 26 2009 Xavier Bachelot <xavier@bachelot.org> 1.0.8.2-3
- License is actually GPLv2+.
- Remove implicit R: php-common.
- Fix URL:.

* Thu Mar 26 2009 Xavier Bachelot <xavier@bachelot.org> 1.0.8.2-2
- More Requires:.

* Thu Mar 19 2009 Xavier Bachelot <xavier@bachelot.org> 1.0.8.2-1
- Initial build.