summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElan Ruusamäe2011-12-27 11:41:12 (GMT)
committercvs2git2012-06-24 12:13:13 (GMT)
commit16ec6e38558d2b13dbe430f22f28d0c4a9ba3fef (patch)
tree9596a2859eb320612df3d9ff5697464a28eac680
downloadjs-webapps-common-16ec6e38558d2b13dbe430f22f28d0c4a9ba3fef.zip
js-webapps-common-16ec6e38558d2b13dbe430f22f28d0c4a9ba3fef.tar.gz
Changed files: apache.conf -> 1.1 js-webapps-common.spec -> 1.1 lighttpd.conf -> 1.1
-rw-r--r--apache.conf5
-rw-r--r--js-webapps-common.spec62
-rw-r--r--lighttpd.conf3
3 files changed, 70 insertions, 0 deletions
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..b184e8b
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,5 @@
+Alias /js/ /usr/share/js/
+<Directory /usr/share/js/>
+ Allow from all
+ Options +FollowSymLinks
+</Directory>
diff --git a/js-webapps-common.spec b/js-webapps-common.spec
new file mode 100644
index 0000000..d5e5107
--- /dev/null
+++ b/js-webapps-common.spec
@@ -0,0 +1,62 @@
+Summary: Common dirs and webserver aliases for JavaScript libraries
+Summary(pl.UTF-8): Wspólne katalogi dla różnych wersji PHP
+Name: js-webapps-common
+Version: 1.0
+Release: 1
+License: GPL
+Group: Base
+Source1: apache.conf
+Source2: lighttpd.conf
+BuildRequires: rpmbuild(macros) >= 1.461
+Requires: webapps
+Requires: webserver(access)
+Requires: webserver(alias)
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define _webapps /etc/webapps
+%define _webapp js
+%define _sysconfdir %{_webapps}/%{_webapp}
+%define _appdir %{_datadir}/%{_webapp}
+
+%description
+Common dirs and webserver aliases for JavaScript libraries.
+
+%prep
+%setup -qcT
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
+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
+
+%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)
+%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
+%dir %{_appdir}
diff --git a/lighttpd.conf b/lighttpd.conf
new file mode 100644
index 0000000..df56d8a
--- /dev/null
+++ b/lighttpd.conf
@@ -0,0 +1,3 @@
+alias.url += (
+ "/js/" => "/usr/share/js/"
+)