]> git.pld-linux.org Git - SPECS.git/blob - lightbox.spec
SPECS updated Sun 1 Aug 15:50:02 CEST 2021
[SPECS.git] / lightbox.spec
1 # TODO:
2 # - system prototype.js, scriptaculous.js
3 Summary:        Simple, unobtrusive script used to overlay images on the webpage
4 Name:           lightbox
5 Version:        2.05
6 Release:        0.4
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
14 BuildRequires:  unzip
15 BuildArch:      noarch
16 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
17
18 %define         _webapps        /etc/webapps
19 %define         _webapp         %{name}
20 %define         _sysconfdir     %{_webapps}/%{_webapp}
21 %define         _appdir         %{_datadir}/%{_webapp}
22
23 %description
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.
26
27 %prep
28 %setup -qc
29 %{__sed} -i -e 's,\r$,,' *.html
30 install -d %{name}
31 mv css images js *.html %{name}
32
33 %patch0 -p1
34
35 cat > apache.conf <<'EOF'
36 Alias /%{name} %{_appdir}
37 <Directory %{_appdir}>
38         Allow from all
39 </Directory>
40 EOF
41
42 %install
43 rm -rf $RPM_BUILD_ROOT
44 install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_appdir}}
45 cp -a %{name}/* $RPM_BUILD_ROOT%{_appdir}
46
47 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/apache.conf
48 cp -a apache.conf $RPM_BUILD_ROOT%{_sysconfdir}/httpd.conf
49
50 %clean
51 rm -rf $RPM_BUILD_ROOT
52
53 %triggerin -- apache1 < 1.3.37-3, apache1-base
54 %webapp_register apache %{_webapp}
55
56 %triggerun -- apache1 < 1.3.37-3, apache1-base
57 %webapp_unregister apache %{_webapp}
58
59 %triggerin -- apache < 2.2.0, apache-base
60 %webapp_register httpd %{_webapp}
61
62 %triggerun -- apache < 2.2.0, apache-base
63 %webapp_unregister httpd %{_webapp}
64
65 %files
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
70 %{_appdir}
This page took 0.06784 seconds and 3 git commands to generate.