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