98 lines
3.9 KiB
RPMSpec
98 lines
3.9 KiB
RPMSpec
#
|
|
# spec file for package perl-Image-MetaData-JPEG
|
|
#
|
|
# 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 Image-MetaData-JPEG
|
|
Name: perl-Image-MetaData-JPEG
|
|
Version: 0.159.0
|
|
Release: 0
|
|
# 0.159 -> normalize -> 0.159.0
|
|
%define cpan_version 0.159
|
|
#Upstream: This library is free software; you can redistribute it and/or modify it under the terms of the GNU perlgpl. See the COPYING and LICENSE file for the license terms.
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Perl extension for showing/modifying JPEG (meta)data
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
Provides: perl(Image::MetaData::JPEG) = %{version}
|
|
Provides: perl(Image::MetaData::JPEG::Backtrace)
|
|
Provides: perl(Image::MetaData::JPEG::Record)
|
|
Provides: perl(Image::MetaData::JPEG::Segment)
|
|
Provides: perl(Image::MetaData::JPEG::data::Tables)
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
The purpose of this module is to read/modify/rewrite meta-data segments in
|
|
JPEG (Joint Photographic Experts Group format) files, which can contain
|
|
comments, thumbnails, Exif information (photographic parameters), IPTC
|
|
information (editorial parameters) and similar data.
|
|
|
|
Each JPEG file is made of consecutive _segments_ (tagged data blocks), and
|
|
the actual row picture data. Most of these segments specify parameters for
|
|
decoding the picture data into a bitmap; some of them, namely the _COM_ment
|
|
and _APP_lication segments, contain instead meta-data, i.e., information
|
|
about how the photo was shot (usually added by a digital camera) and
|
|
additional notes from the photograph. These additional pieces of
|
|
information are especially valuable for picture databases, since the
|
|
meta-data can be saved together with the picture without resorting to
|
|
additional database structures. See the appendix about the structure of
|
|
JPEG files|Image::MetaData::JPEG::Structures/THE STRUCTURE OF JPEG PICTURES
|
|
for technical details.
|
|
|
|
This module works by breaking a JPEG file into individual segments. Each
|
|
file is associated to an _Image::MetaData::JPEG_ structure object, which
|
|
contains one _Image::MetaData::JPEG::Segment_ object for each segment.
|
|
Segments with a known format are then parsed, and their content can be
|
|
accessed in a structured way for display. Some of them can even be modified
|
|
and then rewritten to disk.
|
|
|
|
* $JPEG::show_warnings
|
|
|
|
This package variable must be used to inhibit the printing of warnings: if
|
|
it is false, warnings are silently ignored. Otherwise, warning messages
|
|
come with a detailed back-trace and description of the warning location.
|
|
|
|
$Image::MetaData::JPEG::show_warnings = undef;
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
|
|
|
|
%build
|
|
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 read_JPEG_metadata README
|
|
%license COPYING LICENSE
|
|
|
|
%changelog
|