92 lines
2.9 KiB
RPMSpec
92 lines
2.9 KiB
RPMSpec
#
|
|
# spec file for package perl-Catalyst-Plugin-Compress
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define cpan_name Catalyst-Plugin-Compress
|
|
Name: perl-Catalyst-Plugin-Compress
|
|
Version: 0.6.0
|
|
Release: 0
|
|
# 0.006 -> normalize -> 0.6.0
|
|
%define cpan_version 0.006
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Compress response
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/J/JJ/JJNAPIORK/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Catalyst::Runtime) >= 5.800.10
|
|
BuildRequires: perl(Compress::Zlib)
|
|
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.36
|
|
BuildRequires: perl(HTTP::Request::Common)
|
|
BuildRequires: perl(MRO::Compat)
|
|
Requires: perl(Catalyst::Runtime) >= 5.800.10
|
|
Requires: perl(Compress::Zlib)
|
|
Requires: perl(MRO::Compat)
|
|
Provides: perl(Catalyst::Plugin::Compress) = %{version}
|
|
%undefine __perllib_provides
|
|
Recommends: perl(Compress::Bzip2) >= 2
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module combines Catalyst::Plugin::Deflate Catalyst::Plugin::Gzip
|
|
Catalyst::Plugin::Zlib into one.
|
|
|
|
It compress response to [gzip bzip2 zlib deflate] if client supports it. In
|
|
other works the client should send the Accept-Encoding HTTP header with a
|
|
supported compression like 'gzip'.
|
|
|
|
*NOTE*: If you are using an older version of Catalyst that requires the
|
|
Unicode plugin and if you want to use this module with
|
|
Catalyst::Plugin::Unicode, You *MUST* load this plugin *AFTER*
|
|
Catalyst::Plugin::Unicode.
|
|
|
|
use Catalyst qw/
|
|
Unicode
|
|
Compress
|
|
/;
|
|
|
|
If you don't, You'll get error which is like:
|
|
|
|
[error] Caught exception in engine "Wide character in subroutine entry at
|
|
/usr/lib/perl5/site_perl/5.8.8/Compress/Zlib.pm line xxx."
|
|
|
|
If you upgrade to any version of Catalyst 5.90080+ the unicode support has
|
|
been integrated into core code and this plugin is designed to work with
|
|
that.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%build
|
|
PERL_USE_UNSAFE_INC=1 perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes
|
|
|
|
%changelog
|