1 Summary: JavaScript display engine for mathematics
7 Group: Applications/WWW
8 Source0: http://downloads.sourceforge.net/mathjax/%{name}-v%{version}.zip
9 # Source0-md5: b93c1f1e26a898faee072ab7aec57251
10 URL: http://www.mathjax.org/
11 BuildRequires: rpmbuild(macros) >= 1.268
14 Requires: webserver(access)
15 Requires: webserver(alias)
17 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19 %define _webapps /etc/webapps
20 %define _webapp %{name}
21 %define _sysconfdir %{_webapps}/%{_webapp}
22 %define _appdir %{_datadir}/%{_webapp}
25 MathJax is an open source JavaScript display engine for mathematics
26 that works in all modern browsers.
28 #%description -l pl.UTF-8
33 cat > apache.conf <<'EOF'
34 Alias /%{name} %{_appdir}
35 <Directory %{_appdir}>
40 cat > lighttpd.conf <<'EOF'
42 "/%{name}" => "%{_appdir}",
47 rm -rf $RPM_BUILD_ROOT
48 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
50 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
52 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
53 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
54 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
56 %triggerin -- apache1 < 1.3.37-3, apache1-base
57 %webapp_register apache %{_webapp}
59 %triggerun -- apache1 < 1.3.37-3, apache1-base
60 %webapp_unregister apache %{_webapp}
62 %triggerin -- apache < 2.2.0, apache-base
63 %webapp_register httpd %{_webapp}
65 %triggerun -- apache < 2.2.0, apache-base
66 %webapp_unregister httpd %{_webapp}
68 %triggerin -- lighttpd
69 %webapp_register lighttpd %{_webapp}
71 %triggerun -- lighttpd
72 %webapp_unregister lighttpd %{_webapp}
75 rm -rf $RPM_BUILD_ROOT
78 %defattr(644,root,root,755)
79 %doc README.txt docs test unpacked
80 %dir %attr(750,root,http) %{_sysconfdir}
81 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
82 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
83 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf