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