commit b778a8f2f8d455051f0d2d8a94221c9f962336ee Author: Elan Ruusamäe <g...@delfi.ee> Date: Mon Feb 3 15:55:03 2014 +0200
add webserver integration apache.conf | 5 +++++ js-excanvas.spec | 34 +++++++++++++++++++++++++++++++++- lighttpd.conf | 3 +++ 3 files changed, 41 insertions(+), 1 deletion(-) --- diff --git a/js-excanvas.spec b/js-excanvas.spec index afc0bad..a6ec3e2 100644 --- a/js-excanvas.spec +++ b/js-excanvas.spec @@ -7,12 +7,17 @@ License: Apache v2.0 Group: Applications/WWW Source0: https://explorercanvas.googlecode.com/files/excanvas_r%{version}.zip # Source0-md5: 81a041b98c477f92ed772f2fac0835ad +Source1: apache.conf +Source2: lighttpd.conf URL: https://code.google.com/p/explorercanvas/ BuildRequires: unzip BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _appdir %{_datadir}/%{pkgname} +%define _webapps /etc/webapps +%define _webapp %{pkgname} +%define _sysconfdir %{_webapps}/%{_webapp} +%define _appdir %{_datadir}/%{_webapp} %description Modern browsers like Firefox, Safari, Chrome and Opera support the @@ -42,15 +47,42 @@ ln -s %{pkgname}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{pkgname}.js cp -p %{pkgname}.js $RPM_BUILD_ROOT%{_appdir}/%{pkgname}-%{version}.src.js ln -s %{pkgname}-%{version}.src.js $RPM_BUILD_ROOT%{_appdir}/%{pkgname}.src.js +install -d $RPM_BUILD_ROOT%{_sysconfdir} +cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf +cp -p %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.conf +cp -p $RPM_BUILD_ROOT%{_sysconfdir}/{apache,httpd}.conf + install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} %clean rm -rf $RPM_BUILD_ROOT +%triggerin -- apache1 < 1.3.37-3, apache1-base +%webapp_register apache %{_webapp} + +%triggerun -- apache1 < 1.3.37-3, apache1-base +%webapp_unregister apache %{_webapp} + +%triggerin -- apache < 2.2.0, apache-base +%webapp_register httpd %{_webapp} + +%triggerun -- apache < 2.2.0, apache-base +%webapp_unregister httpd %{_webapp} + +%triggerin -- lighttpd +%webapp_register lighttpd %{_webapp} + +%triggerun -- lighttpd +%webapp_unregister lighttpd %{_webapp} + %files %defattr(644,root,root,755) %doc README AUTHORS COPYING +%dir %attr(750,root,http) %{_sysconfdir} +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/lighttpd.conf %{_appdir} %files demo diff --git a/apache.conf b/apache.conf new file mode 100644 index 0000000..0a3fc10 --- /dev/null +++ b/apache.conf @@ -0,0 +1,5 @@ +Alias /js/excanvas/ /usr/share/excanvas/ +<Directory /usr/share/excanvas> + Allow from all + Options +FollowSymLinks +</Directory> diff --git a/lighttpd.conf b/lighttpd.conf new file mode 100644 index 0000000..8b271ba --- /dev/null +++ b/lighttpd.conf @@ -0,0 +1,3 @@ +alias.url += ( + "/js/excanvas/" => "/usr/share/excanvas/", +) ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/js-excanvas.git/commitdiff/0be655432bc07970978727a486fac456fd4853e4 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit