Author: glen                         Date: Wed Jan 11 13:03:25 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- use own web alias, global /js alias was bad idea. at least at this time

---- Files affected:
packages/js-klass:
   js-klass.spec (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/js-klass/js-klass.spec
diff -u packages/js-klass/js-klass.spec:1.1 packages/js-klass/js-klass.spec:1.2
--- packages/js-klass/js-klass.spec:1.1 Tue Dec 27 13:09:34 2011
+++ packages/js-klass/js-klass.spec     Wed Jan 11 14:03:20 2012
@@ -3,18 +3,23 @@
 Summary:       Utility for creating expressive classes in JavaScript
 Name:          js-%{pkg}
 Version:       1.0
-Release:       1
+Release:       2
 License:       MIT
 Group:         Applications/WWW
 Source0:       https://github.com/ded/klass/tarball/v1.0/%{pkg}-%{version}.tgz
 # Source0-md5: 0bd574d1cfa02ffee98af466b9ec3491
 URL:           http://www.dustindiaz.com/klass
 BuildRequires: rpmbuild(macros) >= 1.461
-Requires:      js-webapps-common >= 1.0-1
+Requires:      webapps
+Requires:      webserver(access)
+Requires:      webserver(alias)
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define                _appdir         %{_datadir}/js/%{pkg}
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
+%define                _appdir         %{_datadir}/%{name}
 
 %description
 An expressive, cross platform JavaScript Class provider with a
@@ -24,19 +29,60 @@
 %setup -qc
 mv *-%{pkg}-*/* .
 
+# apache1/apache2 conf
+cat > apache.conf <<'EOF'
+Alias /js/klass %{_appdir}
+<Directory %{_appdir}>
+       Allow from all
+</Directory>
+EOF
+
+# lighttpd conf
+cat > lighttpd.conf <<'EOF'
+alias.url += (
+    "/js/klass" => "%{_appdir}",
+)
+EOF
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_appdir}
+install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
 cp -p %{pkg}.js $RPM_BUILD_ROOT%{_appdir}/%{pkg}-%{version}.js
 cp -p %{pkg}.min.js $RPM_BUILD_ROOT%{_appdir}/%{pkg}-%{version}.min.js
 ln -s %{pkg}-%{version}.min.js $RPM_BUILD_ROOT%{_appdir}/%{pkg}.js
 
+cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
+cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
+cp -a lighttpd.conf $RPM_BUILD_ROOT%{_sysconfdir}/lighttpd.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)
 %doc README.md
+%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}
 
 %define        date    %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -45,5 +91,8 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.2  2012/01/11 13:03:20  glen
+- use own web alias, global /js alias was bad idea. at least at this time
+
 Revision 1.1  2011/12/27 12:09:34  glen
 - new
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/js-klass/js-klass.spec?r1=1.1&r2=1.2&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to