Author: glen                         Date: Tue Jul 19 12:25:33 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- new

---- Files affected:
packages/js-crypto:
   js-crypto.spec (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/js-crypto/js-crypto.spec
diff -u /dev/null packages/js-crypto/js-crypto.spec:1.1
--- /dev/null   Tue Jul 19 14:25:33 2011
+++ packages/js-crypto/js-crypto.spec   Tue Jul 19 14:25:27 2011
@@ -0,0 +1,96 @@
+# $Revision$, $Date$
+Summary:       JavaScript implementations of standard and secure cryptographic 
algorithms
+Name:          js-crypto
+Version:       2.3.0
+Release:       1
+License:       New BSD License
+Group:         Applications/WWW
+Source0:       
https://crypto-js.googlecode.com/files/Crypto-JS%20v%{version}.zip
+# Source0-md5: c2d35c3611fbb156103590b50eba9d70
+URL:           https://code.google.com/p/crypto-js/
+BuildRequires: rpmbuild(macros) >= 1.553
+BuildRequires: rpmbuild(macros) >= 1.268
+BuildRequires: unzip
+Requires:      webserver(access)
+Requires:      webserver(alias)
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define                _webapps        /etc/webapps
+%define                _webapp         %{name}
+%define                _sysconfdir     %{_webapps}/%{_webapp}
+%define                _appdir         %{_datadir}/%{_webapp}
+
+%description
+Crypto-JS is a growing collection of standard and secure cryptographic
+algorithms implemented in JavaScript using best practices and
+patterns. They are fast, and they have a consistent and simple
+interface.
+
+%prep
+%setup -qc
+%undos -f js
+
+# Apache1/Apache2 config
+cat > apache.conf <<'EOF'
+Alias /js/crypto/ %{_appdir}/
+<Directory %{_appdir}>
+       Allow from all
+</Directory>
+EOF
+
+# Lighttpd config
+cat > lighttpd.conf <<'EOF'
+alias.url += (
+    "/js/crypto/" => "%{_appdir}/",
+)
+EOF
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d $RPM_BUILD_ROOT%{_appdir}
+cp -a . $RPM_BUILD_ROOT%{_appdir}
+
+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}/*/
+
+%define date   %(echo `LC_ALL="C" date +"%a %b %d %Y"`)
+%changelog
+* %{date} PLD Team <[email protected]>
+All persons listed below can be reached at <cvs_login>@pld-linux.org
+
+$Log$
+Revision 1.1  2011/07/19 12:25:27  glen
+- new
================================================================
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to