]> git.pld-linux.org Git - packages/MathJax.git/blob - MathJax.spec
- 1.1a
[packages/MathJax.git] / MathJax.spec
1 Summary:        JavaScript display engine for mathematics
2 #Summary(pl.UTF-8):
3 Name:           MathJax
4 Version:        1.1a
5 Release:        1
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:            http://www.mathjax.org/
12 BuildRequires:  rpmbuild(macros) >= 1.268
13 BuildRequires:  unzip
14 Requires:       webapps
15 Requires:       webserver(access)
16 Requires:       webserver(alias)
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
27 that works in all modern browsers.
28
29 #%description -l pl.UTF-8
30
31 %prep
32 %setup -q -n mathjax-MathJax-f5cd294
33
34 cat > apache.conf <<'EOF'
35 Alias /%{name} %{_appdir}
36 <Directory %{_appdir}>
37         Allow from all
38 </Directory>
39 EOF
40
41 cat > lighttpd.conf <<'EOF'
42 alias.url += (
43     "/%{name}" => "%{_appdir}",
44 )
45 EOF
46
47 %install
48 rm -rf $RPM_BUILD_ROOT
49 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
50
51 cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
52
53 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
54 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
55 cp -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
76 rm -rf $RPM_BUILD_ROOT
77
78 %files
79 %defattr(644,root,root,755)
80 %doc README.* docs test unpacked
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.075097 seconds and 3 git commands to generate.