]>
Commit | Line | Data |
---|---|---|
4391dd54 | 1 | Summary: JavaScript display engine for mathematics |
77fee7bf | 2 | Summary(pl.UTF-8): Oparty na JavaScripcie silnik wyświetlania wzorów matematycznych |
4391dd54 | 3 | Name: MathJax |
14b438af | 4 | Version: 1.1a |
48fc5bfb | 5 | Release: 3 |
4391dd54 JR |
6 | License: Apache v2.0 |
7 | Group: Applications/WWW | |
14b438af JR |
8 | # https://github.com/mathjax/MathJax/zipball/v1.1a |
9 | Source0: %{name}-%{version}.zip | |
10 | # Source0-md5: 63a0401cbf84bbeb173072d77c127299 | |
77fee7bf | 11 | URL: https://www.mathjax.org/ |
4391dd54 | 12 | BuildRequires: rpmbuild(macros) >= 1.268 |
d38386b9 | 13 | BuildRequires: unzip |
4391dd54 JR |
14 | Requires: webapps |
15 | Requires: webserver(access) | |
16 | Requires: webserver(alias) | |
48fc5bfb | 17 | Conflicts: apache-base < 2.4.0-1 |
4391dd54 JR |
18 | BuildArch: noarch |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %define _webapps /etc/webapps | |
22 | %define _webapp %{name} | |
23 | %define _sysconfdir %{_webapps}/%{_webapp} | |
24 | %define _appdir %{_datadir}/%{_webapp} | |
25 | ||
26 | %description | |
27 | MathJax is an open source JavaScript display engine for mathematics | |
d38386b9 | 28 | that works in all modern browsers. |
4391dd54 | 29 | |
77fee7bf JB |
30 | %description -l pl.UTF-8 |
31 | MathJax to mający otwarte źródła, oparty na JavaScripcie silnik | |
32 | wyświetlania wzorów matematycznych, działający we wszystkich | |
33 | współczesnych przeglądarkach. | |
34 | ||
4391dd54 | 35 | %prep |
14b438af | 36 | %setup -q -n mathjax-MathJax-f5cd294 |
4391dd54 JR |
37 | |
38 | cat > apache.conf <<'EOF' | |
39 | Alias /%{name} %{_appdir} | |
40 | <Directory %{_appdir}> | |
41 | Allow from all | |
42 | </Directory> | |
43 | EOF | |
44 | ||
ec08939d JR |
45 | cat > httpd.conf <<'EOF' |
46 | Alias /%{name} %{_appdir} | |
47 | <Directory %{_appdir}> | |
48 | Require all granted | |
49 | </Directory> | |
50 | EOF | |
51 | ||
4391dd54 JR |
52 | cat > lighttpd.conf <<'EOF' |
53 | alias.url += ( | |
54 | "/%{name}" => "%{_appdir}", | |
55 | ) | |
56 | EOF | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} | |
61 | ||
62 | cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir} | |
63 | ||
64 | cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf | |
65 | cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
66 | cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
67 | ||
68 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
69 | %webapp_register apache %{_webapp} | |
70 | ||
71 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
72 | %webapp_unregister apache %{_webapp} | |
73 | ||
ec08939d | 74 | %triggerin -- apache-base |
4391dd54 JR |
75 | %webapp_register httpd %{_webapp} |
76 | ||
ec08939d | 77 | %triggerun -- apache-base |
4391dd54 JR |
78 | %webapp_unregister httpd %{_webapp} |
79 | ||
80 | %triggerin -- lighttpd | |
81 | %webapp_register lighttpd %{_webapp} | |
82 | ||
83 | %triggerun -- lighttpd | |
84 | %webapp_unregister lighttpd %{_webapp} | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %files | |
90 | %defattr(644,root,root,755) | |
14b438af | 91 | %doc README.* docs test unpacked |
4391dd54 JR |
92 | %dir %attr(750,root,http) %{_sysconfdir} |
93 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
94 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
95 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
96 | %{_appdir} |