SPECS: jquery.spec - webapps integration; rel 2
glen
glen at pld-linux.org
Tue Sep 30 16:53:26 CEST 2008
Author: glen Date: Tue Sep 30 14:53:26 2008 GMT
Module: SPECS Tag: HEAD
---- Log message:
- webapps integration; rel 2
---- Files affected:
SPECS:
jquery.spec (1.4 -> 1.5)
---- Diffs:
================================================================
Index: SPECS/jquery.spec
diff -u SPECS/jquery.spec:1.4 SPECS/jquery.spec:1.5
--- SPECS/jquery.spec:1.4 Fri Aug 1 10:11:59 2008
+++ SPECS/jquery.spec Tue Sep 30 16:53:20 2008
@@ -2,7 +2,7 @@
Summary: jQuery JavaScript Library
Name: jquery
Version: 1.2.6
-Release: 1
+Release: 2
License: MIT / GPL
Group: Applications/WWW
Source0: http://jqueryjs.googlecode.com/files/%{name}-%{version}-release.zip
@@ -14,10 +14,16 @@
Source3: http://marcgrabanski.com/code/ui-datepicker/core/core.ui.datepicker.zip
# Source3-md5: 46967b9c5ee626697b977e2909fb00b1
URL: http://jquery.com/
+BuildRequires: rpmbuild(macros) > 1.268
+Requires: webserver(access)
+Requires: webserver(alias)
BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define _appdir %{_datadir}/%{name}
+%define _webapps /etc/webapps
+%define _webapp %{name}
+%define _sysconfdir %{_webapps}/%{_webapp}
+%define _appdir %{_datadir}/%{name}
%description
jQuery is a fast, concise, JavaScript Library that simplifies how you
@@ -29,6 +35,21 @@
%prep
%setup -qc -a3
+# apache1/apache2 conf
+cat > apache.conf <<'EOF'
+Alias /%{name} %{_appdir}
+<Directory %{_appdir}>
+ Allow from all
+</Directory>
+EOF
+
+# lighttpd conf
+cat > lighttpd.conf <<'EOF'
+alias.url += (
+ "/%{name}" => "%{_appdir}",
+)
+EOF
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_appdir}/plugins
@@ -43,14 +64,44 @@
# http://plugins.jquery.com/project/form, MIT/GPL v2.04
cp -a %{SOURCE2} $RPM_BUILD_ROOT%{_appdir}/plugins/form.js
+# http://malsup.com/jquery/form/
+# TODO
+
# http://marcgrabanski.com/code/ui-datepicker/, MIT/GPL v3.4.3
cp -a ui.datepicker.{js,css} $RPM_BUILD_ROOT%{_appdir}/plugins
+install -d $RPM_BUILD_ROOT%{_sysconfdir}
+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)
+%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}
%{_appdir}/*.js
%dir %{_appdir}/plugins
@@ -63,6 +114,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.5 2008/09/30 14:53:20 glen
+- webapps integration; rel 2
+
Revision 1.4 2008/08/01 08:11:59 glen
- update to 1.2.6
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/jquery.spec?r1=1.4&r2=1.5&f=u
More information about the pld-cvs-commit
mailing list