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