]> git.pld-linux.org Git - packages/MathJax.git/blame - MathJax.spec
- BR: unzip
[packages/MathJax.git] / MathJax.spec
CommitLineData
4391dd54 1Summary: JavaScript display engine for mathematics
d38386b9 2#Summary(pl.UTF-8):
4391dd54
JR
3Name: MathJax
4Version: 1.0.1a
5Release: 1
6License: Apache v2.0
7Group: Applications/WWW
d38386b9 8Source0: http://downloads.sourceforge.net/mathjax/%{name}-v%{version}.zip
4391dd54
JR
9# Source0-md5: b93c1f1e26a898faee072ab7aec57251
10URL: http://www.mathjax.org/
11BuildRequires: rpmbuild(macros) >= 1.268
d38386b9 12BuildRequires: unzip
4391dd54
JR
13Requires: webapps
14Requires: webserver(access)
15Requires: webserver(alias)
16BuildArch: noarch
17BuildRoot: %{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
25MathJax is an open source JavaScript display engine for mathematics
d38386b9 26that works in all modern browsers.
4391dd54
JR
27
28#%description -l pl.UTF-8
29
30%prep
31%setup -q -n %{name}
32
33cat > apache.conf <<'EOF'
34Alias /%{name} %{_appdir}
35<Directory %{_appdir}>
36 Allow from all
37</Directory>
38EOF
39
40cat > lighttpd.conf <<'EOF'
41alias.url += (
42 "/%{name}" => "%{_appdir}",
43)
44EOF
45
46%install
47rm -rf $RPM_BUILD_ROOT
48install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
49
50cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
51
52cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
53cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
54cp -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
75rm -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.099533 seconds and 4 git commands to generate.