2011-11-17 15:36:31 +00:00
#
# spec file for package perl-Image-MetaData-JPEG
#
2024-08-10 21:12:21 +00:00
# Copyright (c) 2024 SUSE LLC
2011-11-17 15:36:31 +00:00
#
# 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.
2024-08-10 21:12:21 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2011-11-17 15:36:31 +00:00
#
2024-08-10 21:12:21 +00:00
%define cpan_name Image-MetaData-JPEG
2010-12-28 20:17:13 +00:00
Name : perl-Image-MetaData-JPEG
2024-08-10 21:12:21 +00:00
Version : 0.159.0
2010-12-28 20:17:13 +00:00
Release : 0
2024-08-10 21:12:21 +00:00
# 0.159 -> normalize -> 0.159.0
%define cpan_version 0.159
2015-04-17 11:40:12 +00:00
#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.
2024-08-10 21:12:21 +00:00
License : Artistic-1.0 OR GPL-1.0-or-later
2010-12-28 20:17:13 +00:00
Summary : Perl extension for showing/modifying JPEG (meta)data
2024-08-10 21:12:21 +00:00
URL : https://metacpan.org/release/%{cpan_name}
Source0 : https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name} -%{cpan_version} .tar.gz
2015-04-17 11:40:12 +00:00
Source1 : cpanspec.yml
2025-08-12 18:14:44 +02:00
Source100 : README.md
2015-04-17 11:40:12 +00:00
BuildArch : noarch
2010-12-28 20:17:13 +00:00
BuildRequires : perl
BuildRequires : perl-macros
2024-08-10 21:12:21 +00:00
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
2015-04-17 11:40:12 +00:00
%{perl_requires}
2010-12-28 20:17:13 +00:00
%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.
2015-04-17 11:40:12 +00:00
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
2024-08-10 21:12:21 +00:00
additional database structures. See the appendix about the structure of
2015-04-17 11:40:12 +00:00
JPEG files|Image::MetaData::JPEG::Structures/THE STRUCTURE OF JPEG PICTURES
2024-08-10 21:12:21 +00:00
for technical details.
2015-04-17 11:40:12 +00:00
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
2024-08-10 21:12:21 +00:00
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.
2015-04-17 11:40:12 +00:00
2024-08-10 21:12:21 +00:00
$Image::MetaData::JPEG::show_warnings = undef;
2015-04-17 11:40:12 +00:00
2010-12-28 20:17:13 +00:00
%prep
2024-08-10 21:12:21 +00:00
%autosetup -n %{cpan_name} -%{cpan_version}
find . -type f ! -path " * / t / * " ! -name " * . p l " ! -path " * / b i n / * " ! -path " * / s c r i p t / * " ! -path " * / s c r i p t s / * " ! -name " c o n f i g u r e " -print0 | xargs -0 chmod 644
2010-12-28 20:17:13 +00:00
%build
2024-08-10 21:12:21 +00:00
perl Makefile.PL INSTALLDIRS=vendor
%make_build
2015-04-17 11:40:12 +00:00
%check
2024-08-10 21:12:21 +00:00
make test
2010-12-28 20:17:13 +00:00
%install
%perl_make_install
%perl_process_packlist
2015-04-17 11:40:12 +00:00
%perl_gen_filelist
2010-12-28 20:17:13 +00:00
2015-04-17 11:40:12 +00:00
%files -f %{name}.files
2024-08-10 21:12:21 +00:00
%doc Changes read_JPEG_metadata README
%license COPYING LICENSE
2010-12-28 20:17:13 +00:00
2011-11-17 15:36:31 +00:00
%changelog