1 Summary: dojo - the JavaScript Toolkit
5 License: AFL 2.1 or BSD
6 Group: Applications/WWW
7 Source0: http://download.dojotoolkit.org/release-0.4.1/%{name}-%{version}-core.tar.gz
8 # Source0-md5: 90ff4443c6fca40663ee44edd3761373
9 URL: http://www.dojotoolkit.org/
10 BuildRequires: rpmbuild(macros) >= 1.268
13 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
15 %define _webapps /etc/webapps
16 %define _webapp %{name}
17 %define _sysconfdir %{_webapps}/%{_webapp}
18 %define _appdir %{_datadir}/%{_webapp}
21 Dojo is a portable JavaScript toolkit for web application developers
22 and JavaScript professionals. Dojo solves real-world problems by
23 providing powerful abstractions and solid, tested implementations.
26 %setup -q -n %{name}-%{version}-core
28 cat > apache.conf <<'EOF'
29 Alias /%{name} %{_appdir}
30 <Directory %{_appdir}>
36 rm -rf $RPM_BUILD_ROOT
37 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
39 cp -a dojo.js $RPM_BUILD_ROOT%{_appdir}
41 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
42 install apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
44 %triggerin -- apache1 < 1.3.37-3, apache1-base
45 %webapp_register apache %{_webapp}
47 %triggerun -- apache1 < 1.3.37-3, apache1-base
48 %webapp_unregister apache %{_webapp}
50 %triggerin -- apache < 2.2.0, apache-base
51 %webapp_register httpd %{_webapp}
53 %triggerun -- apache < 2.2.0, apache-base
54 %webapp_unregister httpd %{_webapp}
57 rm -rf $RPM_BUILD_ROOT
60 %defattr(644,root,root,755)
62 %dir %attr(750,root,http) %{_sysconfdir}
63 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
64 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf