2010-09-03 16:24:55 +02:00
|
|
|
#
|
2011-03-14 16:51:53 +01:00
|
|
|
# spec file for package libraw
|
2010-09-03 16:24:55 +02:00
|
|
|
#
|
2023-01-04 13:32:40 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2010-09-03 16:24:55 +02: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.
|
|
|
|
|
2018-12-11 09:56:25 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2010-09-03 16:24:55 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-01-08 14:23:50 +01:00
|
|
|
%define debug_build 0
|
|
|
|
%define asan_build 0
|
|
|
|
|
2011-08-10 13:17:01 +02:00
|
|
|
%define tar_name LibRaw
|
2023-01-04 13:32:40 +01:00
|
|
|
%define lver 23
|
2017-01-30 16:16:16 +01:00
|
|
|
%define lname libraw%{lver}
|
2018-01-24 08:59:34 +01:00
|
|
|
Name: libraw
|
2024-01-02 10:33:58 +01:00
|
|
|
Version: 0.21.2
|
2012-03-15 17:38:33 +01:00
|
|
|
Release: 0
|
2010-09-03 16:24:55 +02:00
|
|
|
Summary: Library for reading RAW files obtained from digital photo cameras
|
2018-04-30 11:43:09 +02:00
|
|
|
License: CDDL-1.0 OR LGPL-2.1-only
|
2013-06-11 15:52:33 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2019-12-20 10:49:25 +01:00
|
|
|
URL: https://www.libraw.org/
|
2013-01-10 22:51:04 +01:00
|
|
|
#Git-Clone: git://github.com/LibRaw/LibRaw
|
2021-02-19 08:41:57 +01:00
|
|
|
Source0: https://www.libraw.org/data/%tar_name-%version.tar.gz
|
|
|
|
Source1: baselibs.conf
|
2024-01-02 10:33:58 +01:00
|
|
|
# CVE-2020-22628 [bsc#1215308], stretch() function in librawsrcpostprocessing
|
|
|
|
Patch0: libraw-CVE-2020-22628.patch
|
2018-12-31 16:38:58 +01:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2013-01-10 22:51:04 +01:00
|
|
|
BuildRequires: fdupes
|
2010-09-03 16:24:55 +02:00
|
|
|
BuildRequires: gcc-c++
|
2011-08-10 13:17:01 +02:00
|
|
|
BuildRequires: libjpeg-devel
|
2011-01-07 15:16:57 +01:00
|
|
|
BuildRequires: liblcms2-devel
|
2018-12-31 16:38:58 +01:00
|
|
|
BuildRequires: libtool
|
2018-01-24 08:59:34 +01:00
|
|
|
BuildRequires: pkgconfig
|
2017-01-11 11:42:44 +01:00
|
|
|
# zlib for deflate DNG support
|
|
|
|
BuildRequires: zlib-devel
|
2010-09-03 16:24:55 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
LibRaw is a library for reading RAW files obtained from digital photo
|
|
|
|
cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
|
|
|
|
|
|
|
LibRaw is based on the source codes of the dcraw utility, where part of
|
|
|
|
drawbacks have already been eliminated and part will be fixed in future.
|
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%package tools
|
2017-01-11 11:48:03 +01:00
|
|
|
Summary: Tools for reading RAW files obtained from digital photo cameras
|
2015-06-06 21:12:46 +02:00
|
|
|
Group: Productivity/Graphics/Other
|
2010-11-16 15:24:23 +01:00
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%description tools
|
2010-11-16 15:24:23 +01:00
|
|
|
LibRaw is a library for reading RAW files obtained from digital photo
|
|
|
|
cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
|
|
|
|
|
|
|
LibRaw is based on the source codes of the dcraw utility, where part of
|
|
|
|
drawbacks have already been eliminated and part will be fixed in future.
|
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%package -n %lname
|
2011-03-14 09:57:30 +01:00
|
|
|
Summary: Library for reading RAW files obtained from digital photo cameras
|
|
|
|
Group: System/Libraries
|
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%description -n %lname
|
2011-03-14 09:57:30 +01:00
|
|
|
LibRaw is a library for reading RAW files obtained from digital photo
|
|
|
|
cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
|
|
|
|
|
|
|
LibRaw is based on the source codes of the dcraw utility, where part of
|
|
|
|
drawbacks have already been eliminated and part will be fixed in future.
|
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development files for libraw
|
2013-06-11 15:52:33 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-06-06 21:12:46 +02:00
|
|
|
Requires: %lname = %version
|
2010-09-03 16:24:55 +02:00
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%description devel
|
2010-09-03 16:24:55 +02:00
|
|
|
LibRaw is a library for reading RAW files obtained from digital photo
|
|
|
|
cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
|
|
|
|
|
|
|
LibRaw is based on the source codes of the dcraw utility, where part of
|
|
|
|
drawbacks have already been eliminated and part will be fixed in future.
|
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%package devel-static
|
2010-09-03 16:24:55 +02:00
|
|
|
Summary: Library for reading RAW files obtained from digital photo cameras
|
2013-06-11 15:52:33 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2015-06-06 21:12:46 +02:00
|
|
|
Requires: %name-devel = %version
|
2010-09-03 16:24:55 +02:00
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%description devel-static
|
2010-09-03 16:24:55 +02:00
|
|
|
LibRaw is a library for reading RAW files obtained from digital photo
|
|
|
|
cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
|
|
|
|
|
|
|
LibRaw is based on the source codes of the dcraw utility, where part of
|
|
|
|
drawbacks have already been eliminated and part will be fixed in future.
|
|
|
|
|
|
|
|
This package contains static libraries that applications can use to build
|
|
|
|
against LibRaw. LibRaw does not provide dynamic libraries.
|
|
|
|
|
|
|
|
%prep
|
2023-05-02 15:50:12 +02:00
|
|
|
%autosetup -p1 -n %{tar_name}-%{version}
|
2010-12-13 00:30:34 +01:00
|
|
|
|
2010-09-03 16:24:55 +02:00
|
|
|
%build
|
2019-08-05 10:18:35 +02:00
|
|
|
%global _lto_cflags %{_lto_cflags} -ffat-lto-objects
|
2019-01-08 14:23:50 +01:00
|
|
|
export CXXFLAGS="%{optflags} -fPIC -DUSE_ZLIB"
|
2021-04-22 14:27:22 +02:00
|
|
|
export LDFLAGS="$LDFLAGS -pie"
|
2019-01-08 14:23:50 +01:00
|
|
|
%if %{debug_build}
|
|
|
|
export CXXFLAGS="$CXXFLAGS -O0"
|
|
|
|
%endif
|
2017-01-11 11:48:03 +01:00
|
|
|
export LIBS="$LIBS -lz"
|
2018-12-31 16:38:58 +01:00
|
|
|
autoreconf -fi
|
2010-12-13 00:23:38 +01:00
|
|
|
%configure
|
2019-01-08 14:23:50 +01:00
|
|
|
%if %{asan_build}
|
|
|
|
sed -i -e 's/\(^CXXFLAGS =.*\)/\1 -fsanitize=address/' \
|
|
|
|
-e 's/\(^LIBS =.*\)/\1 -lasan/' \
|
|
|
|
Makefile
|
|
|
|
%endif
|
2012-07-11 18:21:03 +02:00
|
|
|
make %{?_smp_mflags}
|
2010-09-03 16:24:55 +02:00
|
|
|
|
|
|
|
%install
|
2015-11-13 17:31:18 +01:00
|
|
|
find doc -type f -name "*.html" -exec chmod a-x "{}" "+"
|
2010-09-03 16:24:55 +02:00
|
|
|
mv doc manual
|
|
|
|
# The source tree has these with execute permissions for some reason
|
2018-01-24 08:59:34 +01:00
|
|
|
chmod -x Changelog.txt LICENSE.CDDL LICENSE.LGPL COPYRIGHT
|
2011-08-10 13:17:01 +02:00
|
|
|
chmod -x manual/index.html
|
2010-09-03 16:24:55 +02:00
|
|
|
# The Libraries
|
2018-01-24 08:59:34 +01:00
|
|
|
%make_install
|
|
|
|
find %buildroot -type f -name "*.la" -delete -print
|
2011-01-07 23:01:23 +01:00
|
|
|
# duplicated files
|
2015-06-06 21:12:46 +02:00
|
|
|
rm -rf %buildroot%_datadir/doc
|
2013-01-10 22:51:04 +01:00
|
|
|
%fdupes %buildroot/%_prefix
|
2010-12-14 11:38:11 +01:00
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%post -n %lname -p /sbin/ldconfig
|
|
|
|
%postun -n %lname -p /sbin/ldconfig
|
2010-09-03 16:24:55 +02:00
|
|
|
|
2010-11-16 15:24:23 +01:00
|
|
|
%files tools
|
2015-06-06 21:12:46 +02:00
|
|
|
%_bindir/*
|
2010-12-13 15:11:12 +01:00
|
|
|
|
2010-09-03 16:24:55 +02:00
|
|
|
%files devel
|
2018-08-03 14:14:16 +02:00
|
|
|
%doc Changelog.txt
|
|
|
|
%license COPYRIGHT LICENSE.CDDL LICENSE.LGPL
|
2010-09-03 16:24:55 +02:00
|
|
|
%doc manual
|
2015-06-06 21:12:46 +02:00
|
|
|
%_includedir/%name/
|
|
|
|
%_libdir/pkgconfig/*.pc
|
|
|
|
%_libdir/libraw.so
|
|
|
|
%_libdir/libraw_r.so
|
2011-03-14 09:57:30 +01:00
|
|
|
|
2015-06-06 21:12:46 +02:00
|
|
|
%files -n %lname
|
2017-01-30 16:16:16 +01:00
|
|
|
%_libdir/libraw.so.%{lver}*
|
|
|
|
%_libdir/libraw_r.so.%{lver}*
|
2010-09-03 16:24:55 +02:00
|
|
|
|
|
|
|
%files devel-static
|
2015-06-06 21:12:46 +02:00
|
|
|
%_libdir/libraw.a
|
|
|
|
%_libdir/libraw_r.a
|
2010-09-03 16:24:55 +02:00
|
|
|
|
|
|
|
%changelog
|