Skip to content

Commit 1073a91

Browse files
committed
php-wikimedia-utfnormal: fix packaging
1 parent 4f30faf commit 1073a91

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

php/php-wikimedia-utfnormal/php-wikimedia-utfnormal.spec

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ Source1: gpl-2.0.txt
1919

2020
Buildarch: noarch
2121
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
22+
BuildRequires: %{_bindir}/phpunit
23+
BuildRequires: %{_bindir}/phpab
2224

2325
Requires: php(language) >= 5.3.3
26+
# From phpcompatinfo report for 1.0.2
27+
Requires: php-intl
28+
Requires: php-pcre
29+
Requires: php-spl
2430

2531
Provides: php-composer(wikimedia/utfnormal) = %{version}
2632

@@ -33,17 +39,30 @@ split out of MediaWiki core during the 1.25 development cycle.
3339
%prep
3440
%setup -qc %{name}-%{version}
3541

42+
cp -p %{SOURCE1} COPYING
43+
3644

3745
%build
46+
: Generate an simple "classmap" autoloader
47+
%{_bindir}/phpab \
48+
--output src/autoload.php \
49+
src
3850

3951

4052
%install
4153
rm -rf %{buildroot}
42-
cp -p %{SOURCE1} COPYING
54+
4355
mkdir -pm 0755 %{buildroot}%{_datadir}/php/UtfNormal
4456
cp -rp src/* %{buildroot}%{_datadir}/php/UtfNormal
4557

4658

59+
%check
60+
: Run upstream test suite
61+
%{_bindir}/phpunit \
62+
--bootstrap=%{buildroot}%{_datadir}/php/UtfNormal/autoload.php \
63+
--verbose
64+
65+
4766
%clean
4867
rm -rf %{buildroot}
4968

@@ -59,6 +78,7 @@ rm -rf %{buildroot}
5978
%changelog
6079
* Tue Jun 16 2015 Remi Collet <remi@remirepo.net> - 1.0.2-1
6180
- add backport stuff for remirepo
81+
- run test suite during build
6282

6383
* Mon Jun 15 2015 Michael Cronenworth <mike@cchtml.com> - 1.0.2-1
6484
- Initial package

0 commit comments

Comments
 (0)