1 Summary: JavaScript display engine for mathematics
7 Group: Applications/WWW
8 Source0: http://dl.sourceforge.net/mathjax/%{name}-v%{version}.zip
9 # Source0-md5: b93c1f1e26a898faee072ab7aec57251
10 URL: http://www.mathjax.org/
11 BuildRequires: rpmbuild(macros) >= 1.268
13 Requires: webserver(access)
14 Requires: webserver(alias)
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _webapps /etc/webapps
19 %define _webapp %{name}
20 %define _sysconfdir %{_webapps}/%{_webapp}
21 %define _appdir %{_datadir}/%{_webapp}
24 MathJax is an open source JavaScript display engine for mathematics
25 that works in all modern browsers.
27 #%description -l pl.UTF-8
32 cat > apache.conf <<'EOF'
33 Alias /%{name} %{_appdir}
34 <Directory %{_appdir}>
39 cat > lighttpd.conf <<'EOF'
41 "/%{name}" => "%{_appdir}",
46 rm -rf $RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
49 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
51 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
52 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
53 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
55 %triggerin -- apache1 < 1.3.37-3, apache1-base
56 %webapp_register apache %{_webapp}
58 %triggerun -- apache1 < 1.3.37-3, apache1-base
59 %webapp_unregister apache %{_webapp}
61 %triggerin -- apache < 2.2.0, apache-base
62 %webapp_register httpd %{_webapp}
64 %triggerun -- apache < 2.2.0, apache-base
65 %webapp_unregister httpd %{_webapp}
67 %triggerin -- lighttpd
68 %webapp_register lighttpd %{_webapp}
70 %triggerun -- lighttpd
71 %webapp_unregister lighttpd %{_webapp}
74 rm -rf $RPM_BUILD_ROOT
77 %defattr(644,root,root,755)
78 %doc README.txt docs test unpacked
79 %dir %attr(750,root,http) %{_sysconfdir}
80 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
81 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
82 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf