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