]>
Commit | Line | Data |
---|---|---|
4391dd54 | 1 | Summary: JavaScript display engine for mathematics |
77fee7bf | 2 | Summary(pl.UTF-8): Oparty na JavaScripcie silnik wyświetlania wzorów matematycznych |
4391dd54 | 3 | Name: MathJax |
97e1286c JB |
4 | Version: 2.7.8 |
5 | Release: 1 | |
4391dd54 JR |
6 | License: Apache v2.0 |
7 | Group: Applications/WWW | |
97e1286c JB |
8 | #Source0Download: https://github.com/mathjax/MathJax/releases |
9 | Source0: https://github.com/mathjax/MathJax/archive/%{version}/%{name}-%{version}.tar.gz | |
10 | # Source0-md5: 6cea1e2445ba7ab478be07463bca539c | |
77fee7bf | 11 | URL: https://www.mathjax.org/ |
4391dd54 JR |
12 | BuildRequires: rpmbuild(macros) >= 1.268 |
13 | Requires: webapps | |
14 | Requires: webserver(access) | |
15 | Requires: webserver(alias) | |
48fc5bfb | 16 | Conflicts: apache-base < 2.4.0-1 |
4391dd54 JR |
17 | BuildArch: noarch |
18 | BuildRoot: %{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 | |
26 | MathJax is an open source JavaScript display engine for mathematics | |
d38386b9 | 27 | that works in all modern browsers. |
4391dd54 | 28 | |
77fee7bf JB |
29 | %description -l pl.UTF-8 |
30 | MathJax to mający otwarte źródła, oparty na JavaScripcie silnik | |
31 | wyświetlania wzorów matematycznych, działający we wszystkich | |
32 | współczesnych przeglądarkach. | |
33 | ||
97e1286c JB |
34 | %package source |
35 | Summary: Unpacked source code of MathJax engine | |
36 | Summary(pl.UTF-8): Rozpakowany kod źródłowy silnika MathJax | |
37 | Group: Documentation | |
38 | ||
39 | %description source | |
40 | Unpacked source code of MathJax engine. | |
41 | ||
42 | %description source -l pl.UTF-8 | |
43 | Rozpakowany kod źródłowy silnika MathJax. | |
44 | ||
4391dd54 | 45 | %prep |
97e1286c | 46 | %setup -q |
4391dd54 JR |
47 | |
48 | cat > apache.conf <<'EOF' | |
49 | Alias /%{name} %{_appdir} | |
50 | <Directory %{_appdir}> | |
51 | Allow from all | |
52 | </Directory> | |
53 | EOF | |
54 | ||
ec08939d JR |
55 | cat > httpd.conf <<'EOF' |
56 | Alias /%{name} %{_appdir} | |
57 | <Directory %{_appdir}> | |
58 | Require all granted | |
59 | </Directory> | |
60 | EOF | |
61 | ||
4391dd54 JR |
62 | cat > lighttpd.conf <<'EOF' |
63 | alias.url += ( | |
64 | "/%{name}" => "%{_appdir}", | |
65 | ) | |
66 | EOF | |
67 | ||
68 | %install | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}} | |
71 | ||
97e1286c | 72 | cp -pr MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir} |
4391dd54 | 73 | |
97e1286c JB |
74 | cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf |
75 | cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf | |
76 | cp -p lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf | |
77 | ||
78 | install -d $RPM_BUILD_ROOT%{_examplesdir} | |
79 | cp -pr unpacked $RPM_BUILD_ROOT%{_prefix}/src/%{name} | |
80 | cp -pr test $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
81 | ||
82 | %clean | |
83 | rm -rf $RPM_BUILD_ROOT | |
4391dd54 JR |
84 | |
85 | %triggerin -- apache1 < 1.3.37-3, apache1-base | |
86 | %webapp_register apache %{_webapp} | |
87 | ||
88 | %triggerun -- apache1 < 1.3.37-3, apache1-base | |
89 | %webapp_unregister apache %{_webapp} | |
90 | ||
ec08939d | 91 | %triggerin -- apache-base |
4391dd54 JR |
92 | %webapp_register httpd %{_webapp} |
93 | ||
ec08939d | 94 | %triggerun -- apache-base |
4391dd54 JR |
95 | %webapp_unregister httpd %{_webapp} |
96 | ||
97 | %triggerin -- lighttpd | |
98 | %webapp_register lighttpd %{_webapp} | |
99 | ||
100 | %triggerun -- lighttpd | |
101 | %webapp_unregister lighttpd %{_webapp} | |
102 | ||
4391dd54 JR |
103 | %files |
104 | %defattr(644,root,root,755) | |
97e1286c | 105 | %doc README.* docs |
4391dd54 JR |
106 | %dir %attr(750,root,http) %{_sysconfdir} |
107 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf | |
108 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf | |
109 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf | |
110 | %{_appdir} | |
97e1286c JB |
111 | %{_examplesdir}/%{name}-%{version} |
112 | ||
113 | %files source | |
114 | %defattr(644,root,root,755) | |
115 | # move to some common "unpacked" or "js-unpacked", "javascript-unpacked" subdir? | |
116 | %{_prefix}/src/%{name} |