]> git.pld-linux.org Git - packages/MathJax.git/blame - MathJax.spec
- updated to 2.7.8
[packages/MathJax.git] / MathJax.spec
CommitLineData
4391dd54 1Summary: JavaScript display engine for mathematics
77fee7bf 2Summary(pl.UTF-8): Oparty na JavaScripcie silnik wyświetlania wzorów matematycznych
4391dd54 3Name: MathJax
97e1286c
JB
4Version: 2.7.8
5Release: 1
4391dd54
JR
6License: Apache v2.0
7Group: Applications/WWW
97e1286c
JB
8#Source0Download: https://github.com/mathjax/MathJax/releases
9Source0: https://github.com/mathjax/MathJax/archive/%{version}/%{name}-%{version}.tar.gz
10# Source0-md5: 6cea1e2445ba7ab478be07463bca539c
77fee7bf 11URL: https://www.mathjax.org/
4391dd54
JR
12BuildRequires: rpmbuild(macros) >= 1.268
13Requires: webapps
14Requires: webserver(access)
15Requires: webserver(alias)
48fc5bfb 16Conflicts: apache-base < 2.4.0-1
4391dd54
JR
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
d38386b9 27that works in all modern browsers.
4391dd54 28
77fee7bf
JB
29%description -l pl.UTF-8
30MathJax to mający otwarte źródła, oparty na JavaScripcie silnik
31wyświetlania wzorów matematycznych, działający we wszystkich
32współczesnych przeglądarkach.
33
97e1286c
JB
34%package source
35Summary: Unpacked source code of MathJax engine
36Summary(pl.UTF-8): Rozpakowany kod źródłowy silnika MathJax
37Group: Documentation
38
39%description source
40Unpacked source code of MathJax engine.
41
42%description source -l pl.UTF-8
43Rozpakowany kod źródłowy silnika MathJax.
44
4391dd54 45%prep
97e1286c 46%setup -q
4391dd54
JR
47
48cat > apache.conf <<'EOF'
49Alias /%{name} %{_appdir}
50<Directory %{_appdir}>
51 Allow from all
52</Directory>
53EOF
54
ec08939d
JR
55cat > httpd.conf <<'EOF'
56Alias /%{name} %{_appdir}
57<Directory %{_appdir}>
58 Require all granted
59</Directory>
60EOF
61
4391dd54
JR
62cat > lighttpd.conf <<'EOF'
63alias.url += (
64 "/%{name}" => "%{_appdir}",
65)
66EOF
67
68%install
69rm -rf $RPM_BUILD_ROOT
70install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
71
97e1286c 72cp -pr MathJax.js config extensions fonts jax $RPM_BUILD_ROOT%{_appdir}
4391dd54 73
97e1286c
JB
74cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
75cp -p apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
76cp -p lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf
77
78install -d $RPM_BUILD_ROOT%{_examplesdir}
79cp -pr unpacked $RPM_BUILD_ROOT%{_prefix}/src/%{name}
80cp -pr test $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
81
82%clean
83rm -rf $RPM_BUILD_ROOT
4391dd54
JR
84
85%triggerin -- apache1 < 1.3.37-3, apache1-base
86%webapp_register apache %{_webapp}
87
88%triggerun -- apache1 < 1.3.37-3, apache1-base
89%webapp_unregister apache %{_webapp}
90
ec08939d 91%triggerin -- apache-base
4391dd54
JR
92%webapp_register httpd %{_webapp}
93
ec08939d 94%triggerun -- apache-base
4391dd54
JR
95%webapp_unregister httpd %{_webapp}
96
97%triggerin -- lighttpd
98%webapp_register lighttpd %{_webapp}
99
100%triggerun -- lighttpd
101%webapp_unregister lighttpd %{_webapp}
102
4391dd54
JR
103%files
104%defattr(644,root,root,755)
97e1286c 105%doc README.* docs
4391dd54
JR
106%dir %attr(750,root,http) %{_sysconfdir}
107%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
108%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf
109%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf
110%{_appdir}
97e1286c
JB
111%{_examplesdir}/%{name}-%{version}
112
113%files source
114%defattr(644,root,root,755)
115# move to some common "unpacked" or "js-unpacked", "javascript-unpacked" subdir?
116%{_prefix}/src/%{name}
This page took 0.103248 seconds and 4 git commands to generate.