]> git.pld-linux.org Git - packages/MathJax.git/blame_incremental - MathJax.spec
- C proper package
[packages/MathJax.git] / MathJax.spec
... / ...
CommitLineData
1Summary: JavaScript display engine for mathematics
2Name: MathJax
3Version: 1.1a
4Release: 3
5License: Apache v2.0
6Group: Applications/WWW
7# https://github.com/mathjax/MathJax/zipball/v1.1a
8Source0: %{name}-%{version}.zip
9# Source0-md5: 63a0401cbf84bbeb173072d77c127299
10URL: http://www.mathjax.org/
11BuildRequires: rpmbuild(macros) >= 1.268
12BuildRequires: unzip
13Requires: webapps
14Requires: webserver(access)
15Requires: webserver(alias)
16Conflicts: apache-base < 2.4.0-1
17BuildArch: noarch
18BuildRoot: %{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
26MathJax is an open source JavaScript display engine for mathematics
27that works in all modern browsers.
28
29%prep
30%setup -q -n mathjax-MathJax-f5cd294
31
32cat > apache.conf <<'EOF'
33Alias /%{name} %{_appdir}
34<Directory %{_appdir}>
35 Allow from all
36</Directory>
37EOF
38
39cat > httpd.conf <<'EOF'
40Alias /%{name} %{_appdir}
41<Directory %{_appdir}>
42 Require all granted
43</Directory>
44EOF
45
46cat > lighttpd.conf <<'EOF'
47alias.url += (
48 "/%{name}" => "%{_appdir}",
49)
50EOF
51
52%install
53rm -rf $RPM_BUILD_ROOT
54install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
55
56cp -a MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
57
58cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
59cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
60cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
61
62%triggerin -- apache1 < 1.3.37-3, apache1-base
63%webapp_register apache %{_webapp}
64
65%triggerun -- apache1 < 1.3.37-3, apache1-base
66%webapp_unregister apache %{_webapp}
67
68%triggerin -- apache-base
69%webapp_register httpd %{_webapp}
70
71%triggerun -- apache-base
72%webapp_unregister httpd %{_webapp}
73
74%triggerin -- lighttpd
75%webapp_register lighttpd %{_webapp}
76
77%triggerun -- lighttpd
78%webapp_unregister lighttpd %{_webapp}
79
80%clean
81rm -rf $RPM_BUILD_ROOT
82
83%files
84%defattr(644,root,root,755)
85%doc README.* docs test unpacked
86%dir %attr(750,root,http) %{_sysconfdir}
87%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
88%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
89%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
90%{_appdir}
This page took 0.05347 seconds and 4 git commands to generate.