3 %bcond_with tests # perform "make test" during build
5 %include /usr/lib/rpm/macros.perl
6 %define apxs /usr/sbin/apxs
10 Summary: An Apache module for creating an online gallery
11 Summary(pl): Modu³ Apache'a do tworzenia galerii online
16 Group: Applications/Graphics
17 Source0: http://apachegallery.dk/download/%{name}-%{version}%{_rc}.tar.gz
18 # Source0-md5: d195f22377276d00d083b1b3e48847bb
20 URL: http://apachegallery.dk/
21 BuildRequires: apache-mod_perl-devel >= 1:1.99
22 %{?with_tests:BuildRequires: apache1-mod_perl}
23 BuildRequires: perl-CGI >= 3.08
24 BuildRequires: perl-Image-Imlib2 >= 1.02
25 BuildRequires: perl-Image-Info
26 BuildRequires: perl-Image-Size
27 BuildRequires: perl-Text-Template
28 BuildRequires: perl-URI >= 1.23
29 BuildRequires: perl-devel
30 BuildRequires: perl-libapreq2
31 BuildRequires: rpm-perlprov >= 3.0.3-16
32 BuildRequires: rpmbuild(macros) >= 1.268
33 Requires: apache-mod_perl >= 1:2.0.0
34 Conflicts: apache-mod_autoindex
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _noautoreq 'perl(APR::Table)' 'perl(Apache2)' 'perl(Apache::Const)' 'perl(Apache::RequestIO)' 'perl(Apache::RequestRec)' 'perl(Apache::SubRequest)'
38 %define _appdir %{_datadir}/%{name}
39 %define _apacheicons %{_appdir}/icons
42 Apache::Gallery is a mod_perl handler that sits on top of your
43 DocumentRoot and creates an image gallery of the files and directories
44 there. It creates an thumbnail index of each directory and allows
45 viewing of pictures in different resolutions. Pictures are resized on
49 Apache::Gallery to procedura obs³ugi dla modu³u mod_perl po³o¿ona w
50 DocumentRoot, tworz±ca galeriê obrazów z umieszczonych tam plików i
51 katalogów. Tworzy indeks z miniaturkami z ka¿dego katalogu i pozwala
52 na ogl±danie obrazków w ró¿nych rozdzielczo¶ciach. Obrazki s±
53 przeskalowywane w locie i buforowane.
56 %setup -q -n %{name}-%{version}%{_rc}
59 %{__perl} Makefile.PL \
63 OPTIMIZE="%{rpmcflags}"
65 %{?with_tests:%{__make} test}
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_appdir}/templates/{new,default},%{_apacheicons},/etc/httpd/httpd.conf}
72 DESTDIR=$RPM_BUILD_ROOT
74 install templates/new/*.{css,tpl} $RPM_BUILD_ROOT%{_appdir}/templates/new/
75 install templates/default/*.{css,tpl} $RPM_BUILD_ROOT%{_appdir}/templates/default/
76 install htdocs/*.png $RPM_BUILD_ROOT%{_apacheicons}
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/09_%{name}.conf
81 rm -rf $RPM_BUILD_ROOT
84 %service -q httpd reload
87 if [ "$1" = "0" ]; then
88 %service -q httpd reload
92 %defattr(644,root,root,755)
93 %doc Changes INSTALL README TODO UPGRADE
94 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/httpd.conf/*%{name}.conf
95 %{perl_vendorlib}/Apache/Gallery.pm
97 %dir %{_appdir}/templates
98 %dir %{_appdir}/templates/new
99 %{_appdir}/templates/new/*.tpl
100 %{_appdir}/templates/new/*.css
101 %dir %{_appdir}/templates/default
102 %{_appdir}/templates/default/*.tpl
103 %{_appdir}/templates/default/*.css
105 %{_apacheicons}/*.png