97 lines
3.3 KiB
RPMSpec
97 lines
3.3 KiB
RPMSpec
#
|
|
# spec file for package perl-Apache-Gallery
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
Name: perl-Apache-Gallery
|
|
Version: 1.0.2
|
|
Release: 0
|
|
%define cpan_name Apache-Gallery
|
|
Summary: A mod_perl handler to create an image gallery
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Group: Development/Libraries/Perl
|
|
URL: http://search.cpan.org/~legart/Apache-Gallery/
|
|
Source0: http://search.cpan.org/CPAN/authors/id/L/LE/LEGART/%{cpan_name}-%{version}-withoutworldwriteables.tar.gz
|
|
Source100: README.md
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: perl
|
|
#BuildRequires: perl(Apache::FakeRequest)
|
|
BuildRequires: perl(Image::Imlib2) >= 1.02
|
|
BuildRequires: apache2-mod_perl
|
|
BuildRequires: perl(CGI)
|
|
BuildRequires: perl(Image::Info)
|
|
BuildRequires: perl(Image::Size)
|
|
BuildRequires: perl(Test::MockObject)
|
|
BuildRequires: perl(Test::Pod) >= 0.95
|
|
BuildRequires: perl(Text::Template)
|
|
Requires: apache2-mod_perl
|
|
Requires: perl(CGI)
|
|
Requires: perl(Image::Imlib2) >= 1.02
|
|
Requires: perl(Image::Info)
|
|
Requires: perl(Image::Size)
|
|
Requires: perl(Text::Template)
|
|
#PATCH-FIX-OPENSUSE make mod_perl2 the default choice
|
|
Patch1: Apache-Gallery-1.0.2_modperl2_default.patch
|
|
#PATCH-FIX-OPENSUSE change expected cache path
|
|
Patch2: Apache-Gallery-1.0.2_cachepath.patch
|
|
#PATCH-FIX-UPSTREAM cleanup charset and style
|
|
Patch3: Apache-Gallery-1.0.2_stylefixes.patch
|
|
#PATCH-FIX-UPSTREAM proper support gif and tiff files
|
|
Patch4: Apache-Gallery-1.0.2_gif_tiff.patch
|
|
#PATCH-FIX-UPSTREAM silence the error log from debug texts
|
|
Patch5: Apache-Gallery-1.0.2_silence.patch
|
|
%{perl_requires}
|
|
|
|
%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.
|
|
The gallery can be configured and customized in many ways and a custom copyright
|
|
image can be added to all the images without modifying the original.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{version} -p1
|
|
|
|
%build
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
%check
|
|
%{__make} test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
mkdir -p %{buildroot}/var/cache/www
|
|
if [ ! -f "templates/new/navdirectory.tpl" ]; then
|
|
cp templates/bright/navdirectory.tpl templates/new/navdirectory.tpl
|
|
fi
|
|
if [ ! -f "templates/default/navdirectory.tpl" ]; then
|
|
cp templates/bright/navdirectory.tpl templates/default/navdirectory.tpl
|
|
fi
|
|
|
|
%files -f %{name}.files
|
|
%defattr(-,root,root,755)
|
|
%license LICENSE
|
|
%doc Changes README TODO UPGRADE
|
|
%doc templates
|
|
%doc htdocs
|
|
%dir /var/cache/www
|
|
# empty directory
|
|
%exclude %{perl_vendorarch}
|
|
|
|
%changelog
|