1 Summary: JavaScript display engine for mathematics
6 Group: Applications/WWW
7 # https://github.com/mathjax/MathJax/zipball/v1.1a
8 Source0: %{name}-%{version}.zip
9 # Source0-md5: 63a0401cbf84bbeb173072d77c127299
10 URL: http://www.mathjax.org/
11 BuildRequires: rpmbuild(macros) >= 1.268
14 Requires: webserver(access)
15 Requires: webserver(alias)
16 Conflicts: apache < 2.4.0-1
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _webapps /etc/webapps
21 %define _webapp %{name}
22 %define _sysconfdir %{_webapps}/%{_webapp}
23 %define _appdir %{_datadir}/%{_webapp}
26 MathJax is an open source JavaScript display engine for mathematics
27 that works in all modern browsers.
30 %setup -q -n mathjax-MathJax-f5cd294
32 cat > apache.conf <<'EOF'
33 Alias /%{name} %{_appdir}
34 <Directory %{_appdir}>
39 cat > httpd.conf <<'EOF'
40 Alias /%{name} %{_appdir}
41 <Directory %{_appdir}>
46 cat > lighttpd.conf <<'EOF'
48 "/%{name}" => "%{_appdir}",
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
56 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
58 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
59 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
60 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
62 %triggerin -- apache1 < 1.3.37-3, apache1-base
63 %webapp_register apache %{_webapp}
65 %triggerun -- apache1 < 1.3.37-3, apache1-base
66 %webapp_unregister apache %{_webapp}
68 %triggerin -- apache-base
69 %webapp_register httpd %{_webapp}
71 %triggerun -- apache-base
72 %webapp_unregister httpd %{_webapp}
74 %triggerin -- lighttpd
75 %webapp_register lighttpd %{_webapp}
77 %triggerun -- lighttpd
78 %webapp_unregister lighttpd %{_webapp}
81 rm -rf $RPM_BUILD_ROOT
84 %defattr(644,root,root,755)
85 %doc README.* docs test unpacked
86 %dir %attr(750,root,http) %{_sysconfdir}
87 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
88 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
89 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf