]> git.pld-linux.org Git - packages/MathJax.git/blob - MathJax.spec
- pl
[packages/MathJax.git] / MathJax.spec
1 Summary:        JavaScript display engine for mathematics
2 Summary(pl.UTF-8):      Oparty na JavaScripcie silnik wyświetlania wzorów matematycznych
3 Name:           MathJax
4 Version:        1.1a
5 Release:        3
6 License:        Apache v2.0
7 Group:          Applications/WWW
8 # https://github.com/mathjax/MathJax/zipball/v1.1a
9 Source0:        %{name}-%{version}.zip
10 # Source0-md5:  63a0401cbf84bbeb173072d77c127299
11 URL:            https://www.mathjax.org/
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 BuildRequires:  unzip
14 Requires:       webapps
15 Requires:       webserver(access)
16 Requires:       webserver(alias)
17 Conflicts:      apache-base < 2.4.0-1
18 BuildArch:      noarch
19 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20
21 %define         _webapps        /etc/webapps
22 %define         _webapp         %{name}
23 %define         _sysconfdir     %{_webapps}/%{_webapp}
24 %define         _appdir         %{_datadir}/%{_webapp}
25
26 %description
27 MathJax is an open source JavaScript display engine for mathematics
28 that works in all modern browsers.
29
30 %description -l pl.UTF-8
31 MathJax to mający otwarte źródła, oparty na JavaScripcie silnik
32 wyświetlania wzorów matematycznych, działający we wszystkich
33 współczesnych przeglądarkach.
34
35 %prep
36 %setup -q -n mathjax-MathJax-f5cd294
37
38 cat > apache.conf <<'EOF'
39 Alias /%{name} %{_appdir}
40 <Directory %{_appdir}>
41         Allow from all
42 </Directory>
43 EOF
44
45 cat > httpd.conf <<'EOF'
46 Alias /%{name} %{_appdir}
47 <Directory %{_appdir}>
48         Require all granted
49 </Directory>
50 EOF
51
52 cat > lighttpd.conf <<'EOF'
53 alias.url += (
54     "/%{name}" => "%{_appdir}",
55 )
56 EOF
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
61
62 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
63
64 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
65 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
66 cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
67
68 %triggerin -- apache1 < 1.3.37-3, apache1-base
69 %webapp_register apache %{_webapp}
70
71 %triggerun -- apache1 < 1.3.37-3, apache1-base
72 %webapp_unregister apache %{_webapp}
73
74 %triggerin -- apache-base
75 %webapp_register httpd %{_webapp}
76
77 %triggerun -- apache-base
78 %webapp_unregister httpd %{_webapp}
79
80 %triggerin -- lighttpd
81 %webapp_register lighttpd %{_webapp}
82
83 %triggerun -- lighttpd
84 %webapp_unregister lighttpd %{_webapp}
85
86 %clean
87 rm -rf $RPM_BUILD_ROOT
88
89 %files
90 %defattr(644,root,root,755)
91 %doc README.* docs test unpacked
92 %dir %attr(750,root,http) %{_sysconfdir}
93 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
94 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
95 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
96 %{_appdir}
This page took 0.048233 seconds and 3 git commands to generate.