]> git.pld-linux.org Git - packages/Apache-Gallery.git/blob - Apache-Gallery.spec
- well, does not fully works :-
[packages/Apache-Gallery.git] / Apache-Gallery.spec
1 #
2 %bcond_with     tests   # Build with tests
3
4 %include        /usr/lib/rpm/macros.perl
5 %define         apxs            /usr/sbin/apxs
6 Summary:        An Apache module for creating an online gallery
7 Summary(pl):    Modu³ Apache'a do tworzenia galerii online
8 Name:           Apache-Gallery
9 Version:        0.9.1
10 Release:        1.9
11 License:        Artistic
12 Group:          Applications/Graphics
13 Source0:        http://apachegallery.dk/download/%{name}-%{version}.tar.gz
14 # Source0-md5:  882e650e6fc3f059e84eca1564b5f32f
15 Source1:        %{name}.conf
16 Patch0:         %{name}-apache2.patch
17 URL:            http://apachegallery.dk/
18 BuildRequires:  apache-mod_perl >= 1.99
19 %{?with_tests:BuildRequires:    apache1-mod_perl}
20 BuildRequires:  perl-CGI >= 2.93
21 BuildRequires:  perl-Image-Imlib2 >= 1.02
22 BuildRequires:  perl-Image-Info
23 BuildRequires:  perl-Image-Size
24 BuildRequires:  perl-Text-Template
25 BuildRequires:  perl-URI >= 1.23
26 BuildRequires:  perl-devel
27 BuildRequires:  perl-libapreq2
28 BuildRequires:  rpm-perlprov >= 3.0.3-16
29 Requires:       apache-mod_perl
30 Conflicts:      apache-mod_autoindex
31 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32
33 %define         _noautoreq      'perl(APR::Table)' 'perl(Apache2)' 'perl(Apache::Const)' 'perl(Apache::RequestIO)' 'perl(Apache::RequestRec)' 'perl(Apache::SubRequest)'
34 %define         _appdir         %{_datadir}/%{name}
35 %define         _apacheicons    %{_appdir}/icons
36
37 %description
38 Apache::Gallery is a mod_perl handler that sits on top of your
39 DocumentRoot and creates an image gallery of the files and directories
40 there. It creates an thumbnail index of each directory and allows
41 viewing of pictures in different resolutions. Pictures are resized on
42 the fly and cached.
43
44 %description -l pl
45 Apache::Gallery to procedura obs³ugi dla modu³u mod_perl po³o¿ona w
46 DocumentRoot, tworz±ca galeriê obrazów z umieszczonych tam plików i
47 katalogów. Tworzy indeks z miniaturkami z ka¿dego katalogu i pozwala
48 na ogl±danie obrazków w ró¿nych rozdzielczo¶ciach. Obrazki s±
49 przeskalowywane w locie i buforowane.
50
51 %prep
52 %setup -q
53 %patch0 -p1
54
55 %build
56 %{__perl} Makefile.PL \
57         INSTALLDIRS=vendor
58
59 %{__make} \
60         OPTIMIZE="%{rpmcflags}"
61
62 %{?with_tests:%{__make} test}
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66 install -d $RPM_BUILD_ROOT{%{_appdir}/templates/{new,default},%{_apacheicons},/etc/httpd/httpd.conf}
67
68 %{__make} install \
69         DESTDIR=$RPM_BUILD_ROOT
70
71 install templates/new/*.{css,tpl} $RPM_BUILD_ROOT%{_appdir}/templates/new/
72 install templates/default/*.{css,tpl} $RPM_BUILD_ROOT%{_appdir}/templates/default/
73 install htdocs/*.png $RPM_BUILD_ROOT%{_apacheicons}
74
75 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/99_%{name}.conf
76
77 %clean
78 rm -rf $RPM_BUILD_ROOT
79
80 %post
81 if [ -f /var/lock/subsys/httpd ]; then
82         /etc/rc.d/init.d/httpd reload 1>&2
83 else
84         echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
85 fi
86
87 %preun
88 if [ "$1" = "0" ]; then
89         if [ -f /var/lock/subsys/httpd ]; then
90                 /etc/rc.d/init.d/httpd reload 1>&2
91         fi
92 fi
93
94 %files
95 %defattr(644,root,root,755)
96 %doc Changes INSTALL README TODO UPGRADE
97 %attr(640,root,http) %config(noreplace) %verify(not size mtime md5) /etc/httpd/httpd.conf/*%{name}.conf
98 %{perl_vendorlib}/Apache/Gallery.pm
99 %dir %{_appdir}
100 %dir %{_appdir}/templates
101 %dir %{_appdir}/templates/new
102 %{_appdir}/templates/new/*.tpl
103 %{_appdir}/templates/new/*.css
104 %dir %{_appdir}/templates/default
105 %{_appdir}/templates/default/*.tpl
106 %{_appdir}/templates/default/*.css
107 %dir %{_apacheicons}
108 %{_apacheicons}/*.png
109 %{_mandir}/man3/*.3*
This page took 0.157876 seconds and 3 git commands to generate.