]> git.pld-linux.org Git - packages/Apache-Gallery.git/blob - Apache-Gallery.spec
- allow access to files bundled with apache
[packages/Apache-Gallery.git] / Apache-Gallery.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # perform "make test" during build
4 #
5 %include        /usr/lib/rpm/macros.perl
6 %define         apxs            /usr/sbin/apxs
7 %define         pdir    Apache
8 %define         pnam    Gallery
9 %define         _rc     RC2
10 Summary:        An Apache module for creating an online gallery
11 Summary(pl):    Modu³ Apache'a do tworzenia galerii online
12 Name:           Apache-Gallery
13 Version:        1.0
14 Release:        0.%{_rc}.1
15 License:        Artistic
16 Group:          Applications/Graphics
17 Source0:        http://apachegallery.dk/download/%{name}-%{version}%{_rc}.tar.gz
18 # Source0-md5:  d195f22377276d00d083b1b3e48847bb
19 Source1:        %{name}.conf
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)
36
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
40
41 %description
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
46 the fly and cached.
47
48 %description -l pl
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.
54
55 %prep
56 %setup -q -n %{name}-%{version}%{_rc}
57
58 %build
59 %{__perl} Makefile.PL \
60         INSTALLDIRS=vendor
61
62 %{__make} \
63         OPTIMIZE="%{rpmcflags}"
64
65 %{?with_tests:%{__make} test}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT{%{_appdir}/templates/{new,default},%{_apacheicons},/etc/httpd/httpd.conf}
70
71 %{__make} install \
72         DESTDIR=$RPM_BUILD_ROOT
73
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}
77
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/09_%{name}.conf
79
80 %clean
81 rm -rf $RPM_BUILD_ROOT
82
83 %post
84 %service -q httpd reload
85
86 %preun
87 if [ "$1" = "0" ]; then
88         %service -q httpd reload
89 fi
90
91 %files
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
96 %dir %{_appdir}
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
104 %dir %{_apacheicons}
105 %{_apacheicons}/*.png
106 %{_mandir}/man3/*.3*
This page took 0.074814 seconds and 3 git commands to generate.