]> git.pld-linux.org Git - packages/MathJax.git/blame - MathJax.spec
- C proper package
[packages/MathJax.git] / MathJax.spec
CommitLineData
4391dd54 1Summary: JavaScript display engine for mathematics
4391dd54 2Name: MathJax
14b438af 3Version: 1.1a
48fc5bfb 4Release: 3
4391dd54
JR
5License: Apache v2.0
6Group: Applications/WWW
14b438af
JR
7# https://github.com/mathjax/MathJax/zipball/v1.1a
8Source0: %{name}-%{version}.zip
9# Source0-md5: 63a0401cbf84bbeb173072d77c127299
4391dd54
JR
10URL: http://www.mathjax.org/
11BuildRequires: rpmbuild(macros) >= 1.268
d38386b9 12BuildRequires: unzip
4391dd54
JR
13Requires: webapps
14Requires: webserver(access)
15Requires: webserver(alias)
48fc5bfb 16Conflicts: apache-base < 2.4.0-1
4391dd54
JR
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 28
4391dd54 29%prep
14b438af 30%setup -q -n mathjax-MathJax-f5cd294
4391dd54
JR
31
32cat > apache.conf <<'EOF'
33Alias /%{name} %{_appdir}
34<Directory %{_appdir}>
35 Allow from all
36</Directory>
37EOF
38
ec08939d
JR
39cat > httpd.conf <<'EOF'
40Alias /%{name} %{_appdir}
41<Directory %{_appdir}>
42 Require all granted
43</Directory>
44EOF
45
4391dd54
JR
46cat > lighttpd.conf <<'EOF'
47alias.url += (
48 "/%{name}" => "%{_appdir}",
49)
50EOF
51
52%install
53rm -rf $RPM_BUILD_ROOT
54install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
55
56cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
57
58cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
59cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
60cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
61
62%triggerin -- apache1 < 1.3.37-3, apache1-base
63%webapp_register apache %{_webapp}
64
65%triggerun -- apache1 < 1.3.37-3, apache1-base
66%webapp_unregister apache %{_webapp}
67
ec08939d 68%triggerin -- apache-base
4391dd54
JR
69%webapp_register httpd %{_webapp}
70
ec08939d 71%triggerun -- apache-base
4391dd54
JR
72%webapp_unregister httpd %{_webapp}
73
74%triggerin -- lighttpd
75%webapp_register lighttpd %{_webapp}
76
77%triggerun -- lighttpd
78%webapp_unregister lighttpd %{_webapp}
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%files
84%defattr(644,root,root,755)
14b438af 85%doc README.* docs test unpacked
4391dd54
JR
86%dir %attr(750,root,http) %{_sysconfdir}
87%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
88%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
89%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
90%{_appdir}
This page took 0.075507 seconds and 4 git commands to generate.