]> git.pld-linux.org Git - packages/MathJax.git/blame - MathJax.spec
- initial revision
[packages/MathJax.git] / MathJax.spec
CommitLineData
4391dd54
JR
1Summary: JavaScript display engine for mathematics
2#Summary(pl.UTF-8):
3Name: MathJax
4Version: 1.0.1a
5Release: 1
6License: Apache v2.0
7Group: Applications/WWW
8Source0: http://dl.sourceforge.net/mathjax/%{name}-v%{version}.zip
9# Source0-md5: b93c1f1e26a898faee072ab7aec57251
10URL: http://www.mathjax.org/
11BuildRequires: rpmbuild(macros) >= 1.268
12Requires: webapps
13Requires: webserver(access)
14Requires: webserver(alias)
15BuildArch: noarch
16BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18%define _webapps /etc/webapps
19%define _webapp %{name}
20%define _sysconfdir %{_webapps}/%{_webapp}
21%define _appdir %{_datadir}/%{_webapp}
22
23%description
24MathJax is an open source JavaScript display engine for mathematics
25that works in all modern browsers.
26
27#%description -l pl.UTF-8
28
29%prep
30%setup -q -n %{name}
31
32cat > apache.conf <<'EOF'
33Alias /%{name} %{_appdir}
34<Directory %{_appdir}>
35 Allow from all
36</Directory>
37EOF
38
39cat > lighttpd.conf <<'EOF'
40alias.url += (
41 "/%{name}" => "%{_appdir}",
42)
43EOF
44
45%install
46rm -rf $RPM_BUILD_ROOT
47install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
48
49cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
50
51cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
52cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
53cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
54
55%triggerin -- apache1 < 1.3.37-3, apache1-base
56%webapp_register apache %{_webapp}
57
58%triggerun -- apache1 < 1.3.37-3, apache1-base
59%webapp_unregister apache %{_webapp}
60
61%triggerin -- apache < 2.2.0, apache-base
62%webapp_register httpd %{_webapp}
63
64%triggerun -- apache < 2.2.0, apache-base
65%webapp_unregister httpd %{_webapp}
66
67%triggerin -- lighttpd
68%webapp_register lighttpd %{_webapp}
69
70%triggerun -- lighttpd
71%webapp_unregister lighttpd %{_webapp}
72
73%clean
74rm -rf $RPM_BUILD_ROOT
75
76%files
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
83%{_appdir}
This page took 0.084301 seconds and 4 git commands to generate.