1 Summary: JavaScript display engine for mathematics
7 Group: Applications/WWW
8 # https://github.com/mathjax/MathJax/zipball/v1.1a
9 Source0: %{name}-%{version}.zip
10 # Source0-md5: 63a0401cbf84bbeb173072d77c127299
11 URL: http://www.mathjax.org/
12 BuildRequires: rpmbuild(macros) >= 1.268
15 Requires: webserver(access)
16 Requires: webserver(alias)
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.
29 #%description -l pl.UTF-8
32 %setup -q -n mathjax-MathJax-f5cd294
34 cat > apache.conf <<'EOF'
35 Alias /%{name} %{_appdir}
36 <Directory %{_appdir}>
41 cat > lighttpd.conf <<'EOF'
43 "/%{name}" => "%{_appdir}",
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
51 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
53 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
54 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
55 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
57 %triggerin -- apache1 < 1.3.37-3, apache1-base
58 %webapp_register apache %{_webapp}
60 %triggerun -- apache1 < 1.3.37-3, apache1-base
61 %webapp_unregister apache %{_webapp}
63 %triggerin -- apache < 2.2.0, apache-base
64 %webapp_register httpd %{_webapp}
66 %triggerun -- apache < 2.2.0, apache-base
67 %webapp_unregister httpd %{_webapp}
69 %triggerin -- lighttpd
70 %webapp_register lighttpd %{_webapp}
72 %triggerun -- lighttpd
73 %webapp_unregister lighttpd %{_webapp}
76 rm -rf $RPM_BUILD_ROOT
79 %defattr(644,root,root,755)
80 %doc README.* docs test unpacked
81 %dir %attr(750,root,http) %{_sysconfdir}
82 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
83 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
84 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf