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