summaryrefslogtreecommitdiffstats
path: root/php-wikimedia-assert.spec
blob: a2ad007fe6a8222e9e7a37318f61e64348eb3e1d (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
# remirepo spec file for php-wikimedia-utfnormal, from Fedora
#
# License: MIT
# http://opensource.org/licenses/MIT
#
# Please preserve changelog entries
#
Name:		php-wikimedia-assert
Version:	0.2.2
Release:	1%{?dist}
Summary:	An alternative to PHP's assert
Group:		Development/Libraries

License:	MIT
URL:		https://github.com/wmde/Assert
Source0:	https://github.com/wmde/Assert/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:	noarch

BuildRequires:	php-phpunit-PHPUnit
BuildRequires:	php-theseer-autoload

Requires:	php(language) >= 5.3.0
Requires:	php-spl

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


%description
This package provides an alternative to PHP's assert() that allows for a
simple and reliable way to check preconditions and postconditions in PHP
code. It was proposed as a MediaWiki RFC, but is completely generic and
can be used by any PHP program or library.


%prep
%setup -qn Assert-%{version}


%build
phpab --output src/autoload.php src


%install
rm -rf %{buildroot}

mkdir -pm 0755 %{buildroot}%{_datadir}/php/Wikimedia/Assert
cp -rp src/* %{buildroot}%{_datadir}/php/Wikimedia/Assert


%check
phpunit -v --bootstrap %{buildroot}%{_datadir}/php/Wikimedia/Assert/autoload.php


%clean
rm -rf %{buildroot}


%files
%defattr(-,root,root,-)
%{!?_licensedir:%global license %%doc}
%license COPYING
%doc composer.json README.md
%{_datadir}/php/Wikimedia


%changelog
* Fri Oct  9 2015 Remi Collet <remi@remirepo.net> - 0.2.2-1
- add backport stuff for remirepo

* Mon Oct 05 2015 Michael Cronenworth <mike@cchtml.com> - 0.2.2-1
- Initial package