File libdng.spec of Package libdng

#
# spec file for package libdng
#
# Copyright (c) 2025, Martin Hauke <mardnh@gmx.de>
#
# 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 sover 1
Name:           libdng
Version:        0.2.2
Release:        0
Summary:        Library for generating DNG files
License:        MIT
URL:            https://gitlab.com/megapixels-org/libdng
Source:         https://gitlab.com/megapixels-org/libdng/-/archive/%{version}/%{name}-%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  meson
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(libtiff-4) >= 4.7.0

%description
libdng makes it easier to generate valid DNG files following the
Adobe Digital Negative specification.

Its main features are:
 * Writing DNG 1.4.0 compliant TIFF files
 * Parsing DCP files for extra color processing metadata
 * Some DNG reading support for the `dngmerge` utility
 * Isolating applications from the changing libtiff APIs

%package -n libdng%{sover}
Summary:        Library for generating DNG files
Group:          System/Libraries

%description -n libdng%{sover}
libdng makes it easier to generate valid DNG files following the
Adobe Digital Negative specification.

Its main features are:
 * Writing DNG 1.4.0 compliant TIFF files
 * Parsing DCP files for extra color processing metadata
 * Some DNG reading support for the `dngmerge` utility
 * Isolating applications from the changing libtiff APIs

%package devel
Summary:        Development files for libdng
Group:          Development/Libraries/C and C++
Requires:       libdng%{sover} = %{version}

%description devel
Development and header files for libdng.

%package utils
Summary:        Utility programs for libdng

%description utils
libdng makes it easier to generate valid DNG files following the
Adobe Digital Negative specification.

This package contains the "makedng" utility, allowing one to
generate DNG files from raw sensor dumps.

%prep
%autosetup -p1

%build
%meson -Dman-pages=disabled
%meson_build

%install
%meson_install

%ldconfig_scriptlets -n libdng%{sover}

%check
%meson_test

%files -n libdng%{sover}
%license LICENSE README.md
%{_libdir}/libdng.so.%{sover}*

%files devel
%{_includedir}/libdng.h
%{_libdir}/libdng.so
%{_libdir}/pkgconfig/libdng.pc

%files utils
%{_bindir}/dumpdng
%{_bindir}/makedng

%changelog
openSUSE Build Service is sponsored by