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