[1717] | 1 |
|
---|
| 2 | # feature macro to enable samples (or not)
|
---|
| 3 | %if 0%{?rhel} != 7
|
---|
| 4 | %global samples 1
|
---|
| 5 | %endif
|
---|
| 6 |
|
---|
[1543] | 7 | Summary: Library for reading RAW files obtained from digital photo cameras
|
---|
| 8 | Name: LibRaw
|
---|
[1829] | 9 | Version: 0.21.1
|
---|
[1839] | 10 | Release: 2%{?dist}
|
---|
| 11 | License: BSD-3-Clause and (CDDL-1.0 or LGPL-2.1-only)
|
---|
[1543] | 12 | URL: http://www.libraw.org
|
---|
| 13 |
|
---|
[1717] | 14 | BuildRequires: gcc-c++
|
---|
| 15 | BuildRequires: pkgconfig(lcms2)
|
---|
| 16 | BuildRequires: pkgconfig(jasper)
|
---|
| 17 | BuildRequires: pkgconfig(libjpeg)
|
---|
[1543] | 18 | BuildRequires: autoconf automake libtool
|
---|
[1829] | 19 | BuildRequires: make
|
---|
[1543] | 20 |
|
---|
[1717] | 21 | %if !0%{?os2_version}
|
---|
| 22 | Source0: http://github.com/LibRaw/LibRaw/archive/%{version}.tar.gz
|
---|
| 23 | %else
|
---|
[1829] | 24 | %scm_source github https://github.com/Tellie//%{name}-os2 %{version}-os2
|
---|
[1717] | 25 | %endif
|
---|
[1839] | 26 | %if !0%{?os2_version}
|
---|
[1717] | 27 | Patch0: LibRaw-pkgconfig.patch
|
---|
[1839] | 28 | Patch1: 9ab70f6dca19229cb5caad7cc31af4e7501bac93.patch
|
---|
| 29 | %endif
|
---|
[1543] | 30 | Provides: bundled(dcraw) = 9.25
|
---|
| 31 |
|
---|
| 32 | %description
|
---|
| 33 | LibRaw is a library for reading RAW files obtained from digital photo
|
---|
| 34 | cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
---|
| 35 |
|
---|
| 36 | LibRaw is based on the source codes of the dcraw utility, where part of
|
---|
| 37 | drawbacks have already been eliminated and part will be fixed in future.
|
---|
| 38 |
|
---|
| 39 | %package devel
|
---|
| 40 | Summary: LibRaw development libraries
|
---|
| 41 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
---|
| 42 |
|
---|
| 43 | %description devel
|
---|
| 44 | LibRaw development libraries.
|
---|
| 45 |
|
---|
| 46 | This package contains libraries that applications can use to build
|
---|
| 47 | against LibRaw.
|
---|
| 48 |
|
---|
| 49 | %package static
|
---|
| 50 | Summary: LibRaw static development libraries
|
---|
| 51 | Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
---|
| 52 |
|
---|
| 53 | %description static
|
---|
| 54 | LibRaw static development libraries.
|
---|
| 55 |
|
---|
| 56 | %package samples
|
---|
| 57 | Summary: LibRaw sample programs
|
---|
| 58 | Requires: %{name} = %{version}-%{release}
|
---|
| 59 |
|
---|
| 60 | %description samples
|
---|
| 61 | LibRaw sample programs
|
---|
| 62 |
|
---|
| 63 | %prep
|
---|
[1717] | 64 | %if !0%{?os2_version}
|
---|
| 65 | %autosetup -p1 -n %{name}-%{version}
|
---|
| 66 | %else
|
---|
[1543] | 67 | %scm_setup
|
---|
[1717] | 68 | %endif
|
---|
[1543] | 69 |
|
---|
| 70 | %build
|
---|
[1839] | 71 | autoreconf -ifv
|
---|
[1543] | 72 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
| 73 | export LIBS="-lcx -lpthread"
|
---|
[1839] | 74 |
|
---|
[1543] | 75 | %configure \
|
---|
[1717] | 76 | --enable-examples=%{?samples:yes}%{!?samples:no} \
|
---|
[1543] | 77 | --enable-jasper \
|
---|
| 78 | --enable-jpeg \
|
---|
[1829] | 79 | --enable-lcms
|
---|
[1717] | 80 | %if !0%{?os2_version}
|
---|
| 81 | --enable-openmp
|
---|
| 82 | %endif
|
---|
[1543] | 83 |
|
---|
| 84 | # https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
|
---|
| 85 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
---|
| 86 | sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
|
---|
| 87 |
|
---|
[1717] | 88 | %if !0%{?os2_version}
|
---|
| 89 | %make_build
|
---|
| 90 | %else
|
---|
[1719] | 91 | make %{?_smp_mflags}
|
---|
[1717] | 92 | %endif
|
---|
[1543] | 93 |
|
---|
| 94 | %install
|
---|
| 95 | cp -pr doc manual
|
---|
| 96 | chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt
|
---|
| 97 | chmod 644 manual/*.html
|
---|
| 98 |
|
---|
| 99 | # The Libraries
|
---|
| 100 | %make_install
|
---|
| 101 |
|
---|
| 102 | rm -rfv samples/.deps
|
---|
| 103 | rm -fv samples/.dirstamp
|
---|
| 104 | rm -fv samples/*.o
|
---|
| 105 |
|
---|
| 106 | rm -fv %{buildroot}%{_libdir}/lib*.la
|
---|
| 107 |
|
---|
[1717] | 108 | %if !0%{?os2_version}
|
---|
| 109 | %ldconfig_scriptlets
|
---|
| 110 | %endif
|
---|
[1543] | 111 |
|
---|
| 112 | %files
|
---|
| 113 | %doc Changelog.txt
|
---|
| 114 | %license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
|
---|
[1717] | 115 | %if !0%{?os2_version}
|
---|
[1829] | 116 | %{_libdir}/libraw.so.23*
|
---|
| 117 | %{_libdir}/libraw_r.so.23*
|
---|
[1717] | 118 | %else
|
---|
| 119 | %{_libdir}/*.dll
|
---|
| 120 | %endif
|
---|
[1543] | 121 |
|
---|
| 122 | %files static
|
---|
[1717] | 123 | %if !0%{?os2_version}
|
---|
| 124 | %{_libdir}/libraw.a
|
---|
| 125 | %{_libdir}/libraw_r.a
|
---|
| 126 | %else
|
---|
[1581] | 127 | %{_libdir}/raw_r.a
|
---|
[1839] | 128 | %{_libdir}/raw.a
|
---|
[1717] | 129 | %endif
|
---|
[1543] | 130 |
|
---|
| 131 | %files devel
|
---|
| 132 | %doc manual
|
---|
| 133 | %doc samples
|
---|
| 134 | %{_includedir}/libraw/
|
---|
[1717] | 135 | %if !0%{?os2_version}
|
---|
| 136 | %{_libdir}/libraw.so
|
---|
| 137 | %{_libdir}/libraw_r.so
|
---|
| 138 | %else
|
---|
[1829] | 139 | %{_libdir}/raw_dll.a
|
---|
| 140 | %{_libdir}/raw23_dll.a
|
---|
[1839] | 141 | %{_libdir}/raw_r_dll.a
|
---|
| 142 | %{_libdir}/raw_r23_dll.a
|
---|
[1717] | 143 | %endif
|
---|
[1543] | 144 | %{_libdir}/pkgconfig/libraw.pc
|
---|
| 145 | %{_libdir}/pkgconfig/libraw_r.pc
|
---|
| 146 | %exclude %{_docdir}/libraw/*
|
---|
| 147 |
|
---|
[1717] | 148 | %if 0%{?samples}
|
---|
[1543] | 149 | %files samples
|
---|
| 150 | %{_bindir}/*
|
---|
[1717] | 151 | %endif
|
---|
[1543] | 152 |
|
---|
[1544] | 153 | %changelog
|
---|
[1839] | 154 | * Tue Sep 19 2023 Elbert Pol <elbert.pol@gmail.com> - 0.21.1-2
|
---|
| 155 | - Set the static files to the right section
|
---|
| 156 | - Remove defattr frpm spec file
|
---|
[1717] | 157 |
|
---|
[1839] | 158 | * Wed Sep 13 2023 Elbert Pol <elbert.pol@gmail.com> - 0.21.1-1
|
---|
| 159 | - Updated to latest version.
|
---|
[1582] | 160 |
|
---|
[1839] | 161 | * Thu Oct 15 2020 Elbert Pol <elbert.pol@gmail.com> - 0.20.2-1
|
---|
| 162 | - Updated to latest version
|
---|
[1581] | 163 |
|
---|
[1839] | 164 | * Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-5
|
---|
| 165 | - Remove dll's from the devel package.
|
---|
[1546] | 166 |
|
---|
[1839] | 167 | * Wed Jan 30 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-4
|
---|
| 168 | - Add the raw_*.a files to devel package.
|
---|
[1543] | 169 |
|
---|
[1839] | 170 | * Sat Dec 29 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-3
|
---|
| 171 | - Link with newer Lcms2
|
---|
[1829] | 172 |
|
---|
[1839] | 173 | * Fri Dec 28 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-2
|
---|
| 174 | - Add patch to source as thats better if have own repo
|
---|
[1829] | 175 |
|
---|
[1839] | 176 | * Thu Dec 27 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-1
|
---|
| 177 | - First Rpm version OS/2
|
---|
[1829] | 178 |
|
---|