2 # - system prototype.js, scriptaculous.js
3 Summary: Simple, unobtrusive script used to overlay images on the webpage
7 License: Creative Commons Attribution 2.5
8 Group: Applications/WWW
9 Source0: http://www.lokeshdhakar.com/projects/lightbox2/releases/%{name}%{version}.zip
10 # Source0-md5: af6efdeba0a51e27b077737889ffb60a
11 Patch0: %{name}-url.patch
12 URL: http://www.lokeshdhakar.com/projects/lightbox2/
13 BuildRequires: rpmbuild(macros) >= 1.268
16 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
18 %define _webapps /etc/webapps
19 %define _webapp %{name}
20 %define _sysconfdir %{_webapps}/%{_webapp}
21 %define _appdir %{_datadir}/%{_webapp}
24 Lightbox is a simple, unobtrusive script used to overlay images on the
25 current page. It's a snap to setup and works on all modern browsers.
29 %{__sed} -i -e 's,\r$,,' *.html
31 mv css images js *.html %{name}
35 cat > apache.conf <<'EOF'
36 Alias /%{name} %{_appdir}
37 <Directory %{_appdir}>
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
45 cp -a %{name}/* $RPM_BUILD_ROOT%{_appdir}
47 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
48 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
51 rm -rf $RPM_BUILD_ROOT
53 %triggerin -- apache1 < 1.3.37-3, apache1-base
54 %webapp_register apache %{_webapp}
56 %triggerun -- apache1 < 1.3.37-3, apache1-base
57 %webapp_unregister apache %{_webapp}
59 %triggerin -- apache < 2.2.0, apache-base
60 %webapp_register httpd %{_webapp}
62 %triggerun -- apache < 2.2.0, apache-base
63 %webapp_unregister httpd %{_webapp}
66 %defattr(644,root,root,755)
67 %dir %attr(750,root,http) %{_sysconfdir}
68 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/apache.conf
69 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf