summaryrefslogtreecommitdiffstats
path: root/php-oojs-oojs-ui.spec
blob: 4bde898abe1dd43b225b681a6ecbb392839cbf8b (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
# remirepo spec file for php-oojs-oojs-ui, from:
#
# Fedora spec file for php-oojs-oojs-ui
#
# License: MIT
# http://opensource.org/licenses/MIT
#
%global git_tag_rev 847c492f2ae8228a4b9ae866dc21212c60813820

Name:		php-oojs-oojs-ui
Version:	0.21.2
Release:	1%{?dist}
Summary:	Object-Oriented JavaScript – User Interface
Group:		Development/Libraries

License:	MIT
URL:		http://www.mediawiki.org/wiki/OOjs_UI
#Source0:	http://git.wikimedia.org/zip/?r=oojs/ui.git&format=xz&h=%{git_tag_rev}#/%{name}-%{version}.tar.xz
# Wikimedia changed server software and now doesn't support downloads
# https://phabricator.wikimedia.org/T111887
Source0:	https://github.com/wikimedia/oojs-ui/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz

BuildArch:	noarch

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

Requires:	php(language) >= 5.4.0
Requires:	php-json
Requires:	php-pcre
Requires:	php-spl

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

%description
OOjs UI (Object-Oriented JavaScript – User Interface) is a library that allows
developers to rapidly create front-end web applications that operate
consistently across a multitude of browsers.


%prep
%setup -q -n oojs-ui-%{version}


%build
# dirty hack since autoloader isn't working
sed -i '5i require "/usr/share/php/OOUI/mixins/AccessKeyedElement.php";' php/widgets/InputWidget.php
phpab --output php/autoload.php php


%install
mkdir -pm 0755 %{buildroot}%{_datadir}/php/OOUI
cp -rp php/* %{buildroot}%{_datadir}/php/OOUI


%files
%{!?_licensedir:%global license %%doc}
%license LICENSE-MIT
%doc AUTHORS.txt package.json History.md README.md
%{_datadir}/php/OOUI


%changelog
* Mon Jul 17 2017 Michael Cronenworth <mike@cchtml.com> - 0.21.2-1
- version update

* Fri Jun 26 2015 Remi Collet <remi@remirepo.net> - 0.11.6-1
- backport for remirepo

* Thu Jun 25 2015 Michael Cronenworth <mike@cchtml.com> - 0.11.6-1
- Initial package