]> git.pld-linux.org Git - packages/Apache-Gallery.git/blob - Apache-Gallery.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/Apache-Gallery.git] / Apache-Gallery.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # perform "make test" during build
4 #
5 %define         apxs            /usr/sbin/apxs
6 %define         pdir    Apache
7 %define         pnam    Gallery
8 %define         _rc     RC3
9 Summary:        An Apache module for creating an online gallery
10 Summary(pl.UTF-8):      Moduł Apache'a do tworzenia galerii online
11 Name:           Apache-Gallery
12 Version:        1.0
13 Release:        0.%{_rc}.3
14 License:        Artistic
15 Group:          Applications/Graphics
16 Source0:        http://apachegallery.dk/download/%{name}-%{version}%{_rc}.tar.gz
17 # Source0-md5:  a705cbecf2f124d18a3bde3fc36384e8
18 Source1:        %{name}.conf
19 Patch0:         %{name}-cache_dir.patch
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 Requires:       apache-mod_alias
35 Conflicts:      apache-mod_autoindex
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 %define         _noautoreq      'perl(APR::Table)' 'perl(Apache2)' 'perl(Apache::Const)' 'perl(Apache::RequestIO)' 'perl(Apache::RequestRec)' 'perl(Apache::SubRequest)'
39 %define         _appdir         %{_datadir}/%{name}
40 %define         _apacheicons    %{_appdir}/icons
41 %define         _cachedir       /var/cache/%{name}
42
43 %description
44 Apache::Gallery is a mod_perl handler that sits on top of your
45 DocumentRoot and creates an image gallery of the files and directories
46 there. It creates an thumbnail index of each directory and allows
47 viewing of pictures in different resolutions. Pictures are resized on
48 the fly and cached.
49
50 %description -l pl.UTF-8
51 Apache::Gallery to procedura obsługi dla modułu mod_perl położona w
52 DocumentRoot, tworząca galerię obrazów z umieszczonych tam plików i
53 katalogów. Tworzy indeks z miniaturkami z każdego katalogu i pozwala
54 na oglądanie obrazków w różnych rozdzielczościach. Obrazki są
55 przeskalowywane w locie i buforowane.
56
57 %prep
58 %setup -q -n %{name}-%{version}%{_rc}
59 %patch0 -p1
60
61 %build
62 %{__perl} Makefile.PL \
63         INSTALLDIRS=vendor
64
65 %{__make} \
66         OPTIMIZE="%{rpmcflags}"
67
68 %{?with_tests:%{__make} test}
69
70 %install
71 rm -rf $RPM_BUILD_ROOT
72 install -d $RPM_BUILD_ROOT{%{_appdir}/templates/{new,default},%{_apacheicons},/etc/{httpd/httpd.conf,tmpwatch},%{_cachedir}}
73
74 %{__make} install \
75         DESTDIR=$RPM_BUILD_ROOT
76
77 install templates/new/*.{css,tpl} $RPM_BUILD_ROOT%{_appdir}/templates/new/
78 install templates/default/*.{css,tpl} $RPM_BUILD_ROOT%{_appdir}/templates/default/
79 install htdocs/*.png $RPM_BUILD_ROOT%{_apacheicons}
80
81 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/09_%{name}.conf
82
83 echo "%{_cachedir} 720" > $RPM_BUILD_ROOT/etc/tmpwatch/%{name}.conf
84
85 %clean
86 rm -rf $RPM_BUILD_ROOT
87
88 %post
89 %service -q httpd reload
90
91 %triggerpostun -- Apache-Gallery < 1.0-0.RC3.2
92 if [ -d "/var/tmp/Apache-Gallery" ]; then
93         echo "Removing old cache /var/tmp/Apache-Gallery. New location: %{_cachedir}"
94         rm -rf /var/tmp/Apache-Gallery
95 fi
96
97 %preun
98 if [ "$1" = "0" ]; then
99         %service -q httpd reload
100 fi
101
102 %files
103 %defattr(644,root,root,755)
104 %doc Changes INSTALL README TODO UPGRADE
105 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/httpd.conf/*%{name}.conf
106 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/%{name}.conf
107 %{perl_vendorlib}/Apache/Gallery.pm
108 %dir %{_appdir}
109 %dir %{_appdir}/templates
110 %dir %{_appdir}/templates/new
111 %{_appdir}/templates/new/*.tpl
112 %{_appdir}/templates/new/*.css
113 %dir %{_appdir}/templates/default
114 %{_appdir}/templates/default/*.tpl
115 %{_appdir}/templates/default/*.css
116 %dir %{_apacheicons}
117 %{_apacheicons}/*.png
118 %attr(770,root,http) %dir %{_cachedir}
119 %{_mandir}/man3/*.3*
This page took 0.096299 seconds and 3 git commands to generate.