%define module Apache-Gallery Summary: A mod_perl handler to create an image gallery Name: apache-gallery Version: 1.0.2 Release: 8 License: GPL or Artistic Group: Networking/WWW Url: http://apachegallery.dk/ Source0: http://apachegallery.dk/download/%{module}-%{version}.tar.gz BuildRequires: apache-mod_perl BuildRequires: perl-devel # (tv) for testsuite: BuildRequires: perl(CGI) BuildRequires: perl(URI::Escape) BuildRequires: perl(Image::Imlib2) BuildRequires: perl(Image::Info) BuildRequires: perl(Image::Size) BuildRequires: perl(Text::Template) #BuildRequires: perl(Test::MockObject) BuildRequires: perl(Test::Pod) Requires: apache-mod_perl Requires(pre): user(apache) Provides: perl-Apache-gallery = %{EVRD} BuildArch: noarch %description Apache::Gallery creates an thumbnail index of each directory and allows viewing pictures in different resolutions. Pictures are resized on the fly and cached. %files %doc README Changes INSTALL LICENSE TODO UPGRADE %config(noreplace) %{_webappconfdir}/%{name}.conf %{perl_vendorlib}/Apache %{_datadir}/%{name} %attr(-,apache,apache) /var/cache/%{name} %{_var}/www/%{name} %{_mandir}/*/* #---------------------------------------------------------------------------- %prep %setup -q -n %{module}-%{version} %build %__perl Makefile.PL INSTALLDIRS=vendor %make %install %makeinstall_std install -d -m 755 %{buildroot}%{_datadir}/apache-gallery/default install -d -m 755 %{buildroot}/var/www/apache-gallery/static for template in default new; do install -d -m 755 %{buildroot}%{_datadir}/apache-gallery/$template install -m 644 templates/$template/*.tpl %{buildroot}%{_datadir}/apache-gallery/$template install -m 644 templates/$template/gallery.css %{buildroot}/var/www/apache-gallery/static/$template.css done install -m 644 htdocs/* %{buildroot}/var/www/apache-gallery/static install -d -m 755 %{buildroot}/var/www/apache-gallery/photos install -d -m 755 %{buildroot}/var/cache/apache-gallery # apache configuration install -d -m 755 %{buildroot}%{_webappconfdir} cat > %{buildroot}%{_webappconfdir}/%{name}.conf < PerlSetVar GalleryTemplateDir '/usr/share/apache-gallery/default' PerlSetVar GalleryCacheDir '/var/cache/apache-gallery' PerlSetVar GalleryURLBase '/apache-gallery/static' PerlOptions +GlobalRequest Require all granted SetHandler modperl PerlResponseHandler Apache::Gallery Require all granted EOF