Files
perl-CAM-PDF/perl-CAM-PDF.spec
2025-08-12 18:12:04 +02:00

106 lines
4.1 KiB
RPMSpec

#
# spec file for package perl-CAM-PDF
#
# 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 CAM-PDF
Name: perl-CAM-PDF
Version: 1.600.0
Release: 0
# 1.60 -> normalize -> 1.600.0
%define cpan_version 1.60
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: PDF manipulation library
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/C/CD/CDOLAN/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Crypt::RC4) >= 2.02
BuildRequires: perl(Module::Build) >= 0.40
BuildRequires: perl(Text::PDF) >= 0.290.0
Requires: perl(Crypt::RC4) >= 2.02
Requires: perl(Text::PDF) >= 0.290.0
Provides: perl(CAM::PDF) = %{version}
Provides: perl(CAM::PDF::Content) = %{version}
Provides: perl(CAM::PDF::Decrypt) = %{version}
Provides: perl(CAM::PDF::GS) = %{version}
Provides: perl(CAM::PDF::GS::NoText) = %{version}
Provides: perl(CAM::PDF::Node) = %{version}
Provides: perl(CAM::PDF::PageText) = %{version}
Provides: perl(CAM::PDF::Renderer::Dump) = %{version}
Provides: perl(CAM::PDF::Renderer::Images) = %{version}
Provides: perl(CAM::PDF::Renderer::Text) = %{version}
Provides: perl(CAM::PDF::Renderer::TextFB) = %{version}
%undefine __perllib_provides
Recommends: perl(Test::Memory::Cycle) >= 1.02
Recommends: perl(Test::Pod)
Recommends: perl(Test::Pod::Coverage)
%{perl_requires}
%description
This package reads and writes any document that conforms to the PDF
specification generously provided by Adobe at
http://partners.adobe.com/public/developer/pdf/index_reference.html (link
last checked Oct 2005).
The file format through PDF 1.5 is well-supported, with the exception of
the "linearized" or "optimized" output format, which this module can read
but not write. Many specific aspects of the document model are not
manipulable with this package (like fonts), but if the input document is
correctly written, then this module will preserve the model integrity.
The PDF writing feature saves as PDF 1.4-compatible. That means that we
cannot write compressed object streams. The consequence is that reading and
then writing a PDF 1.5+ document may enlarge the resulting file by a fair
margin.
This library grants you some power over the PDF security model. Note that
applications editing PDF documents via this library MUST respect the
security preferences of the document. Any violation of this respect is
contrary to Adobe's intellectual property position, as stated in the
reference manual at the above URL.
Technical detail regarding corrupt PDFs: This library adheres strictly to
the PDF specification. Adobe's Acrobat Reader is more lenient, allowing
some corrupted PDFs to be viewable. Therefore, it is possible that some
PDFs may be readable by Acrobat that are illegible to this library. In
particular, files which have had line endings converted to or from
DOS/Windows style (i.e. CR-NL) may be rendered unusable even though Acrobat
does not complain. Future library versions may relax the parser, but not
yet.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Build.PL --installdirs=vendor
./Build build --flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install --destdir=%{buildroot} --create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%doc CHANGES README
%license LICENSE
%changelog