1 Summary: JavaScript display engine for mathematics
2 Summary(pl.UTF-8): Oparty na JavaScripcie silnik wyświetlania wzorów matematycznych
7 Group: Applications/WWW
8 # https://github.com/mathjax/MathJax/zipball/v1.1a
9 Source0: %{name}-%{version}.zip
10 # Source0-md5: 63a0401cbf84bbeb173072d77c127299
11 URL: https://www.mathjax.org/
12 BuildRequires: rpmbuild(macros) >= 1.268
15 Requires: webserver(access)
16 Requires: webserver(alias)
17 Conflicts: apache-base < 2.4.0-1
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _webapps /etc/webapps
22 %define _webapp %{name}
23 %define _sysconfdir %{_webapps}/%{_webapp}
24 %define _appdir %{_datadir}/%{_webapp}
27 MathJax is an open source JavaScript display engine for mathematics
28 that works in all modern browsers.
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.
36 %setup -q -n mathjax-MathJax-f5cd294
38 cat > apache.conf <<'EOF'
39 Alias /%{name} %{_appdir}
40 <Directory %{_appdir}>
45 cat > httpd.conf <<'EOF'
46 Alias /%{name} %{_appdir}
47 <Directory %{_appdir}>
52 cat > lighttpd.conf <<'EOF'
54 "/%{name}" => "%{_appdir}",
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
62 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
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
68 %triggerin -- apache1 < 1.3.37-3, apache1-base
69 %webapp_register apache %{_webapp}
71 %triggerun -- apache1 < 1.3.37-3, apache1-base
72 %webapp_unregister apache %{_webapp}
74 %triggerin -- apache-base
75 %webapp_register httpd %{_webapp}
77 %triggerun -- apache-base
78 %webapp_unregister httpd %{_webapp}
80 %triggerin -- lighttpd
81 %webapp_register lighttpd %{_webapp}
83 %triggerun -- lighttpd
84 %webapp_unregister lighttpd %{_webapp}
87 rm -rf $RPM_BUILD_ROOT
90 %defattr(644,root,root,755)
91 %doc README.* docs test unpacked
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