1 |
|
---|
2 | # feature macro to enable samples (or not)
|
---|
3 | %if 0%{?rhel} != 7
|
---|
4 | %global samples 1
|
---|
5 | %endif
|
---|
6 |
|
---|
7 | Summary: Library for reading RAW files obtained from digital photo cameras
|
---|
8 | Name: LibRaw
|
---|
9 | Version: 0.21.1
|
---|
10 | Release: 2%{?dist}
|
---|
11 | License: BSD-3-Clause and (CDDL-1.0 or LGPL-2.1-only)
|
---|
12 | URL: http://www.libraw.org
|
---|
13 |
|
---|
14 | BuildRequires: gcc-c++
|
---|
15 | BuildRequires: pkgconfig(lcms2)
|
---|
16 | BuildRequires: pkgconfig(jasper)
|
---|
17 | BuildRequires: pkgconfig(libjpeg)
|
---|
18 | BuildRequires: autoconf automake libtool
|
---|
19 | BuildRequires: make
|
---|
20 |
|
---|
21 | %if !0%{?os2_version}
|
---|
22 | Source0: http://github.com/LibRaw/LibRaw/archive/%{version}.tar.gz
|
---|
23 | %else
|
---|
24 | %scm_source github https://github.com/Tellie//%{name}-os2 %{version}-os2
|
---|
25 | %endif
|
---|
26 | %if !0%{?os2_version}
|
---|
27 | Patch0: LibRaw-pkgconfig.patch
|
---|
28 | Patch1: 9ab70f6dca19229cb5caad7cc31af4e7501bac93.patch
|
---|
29 | %endif
|
---|
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
|
---|
64 | %if !0%{?os2_version}
|
---|
65 | %autosetup -p1 -n %{name}-%{version}
|
---|
66 | %else
|
---|
67 | %scm_setup
|
---|
68 | %endif
|
---|
69 |
|
---|
70 | %build
|
---|
71 | autoreconf -ifv
|
---|
72 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
73 | export LIBS="-lcx -lpthread"
|
---|
74 |
|
---|
75 | %configure \
|
---|
76 | --enable-examples=%{?samples:yes}%{!?samples:no} \
|
---|
77 | --enable-jasper \
|
---|
78 | --enable-jpeg \
|
---|
79 | --enable-lcms
|
---|
80 | %if !0%{?os2_version}
|
---|
81 | --enable-openmp
|
---|
82 | %endif
|
---|
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 |
|
---|
88 | %if !0%{?os2_version}
|
---|
89 | %make_build
|
---|
90 | %else
|
---|
91 | make %{?_smp_mflags}
|
---|
92 | %endif
|
---|
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 |
|
---|
108 | %if !0%{?os2_version}
|
---|
109 | %ldconfig_scriptlets
|
---|
110 | %endif
|
---|
111 |
|
---|
112 | %files
|
---|
113 | %doc Changelog.txt
|
---|
114 | %license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
|
---|
115 | %if !0%{?os2_version}
|
---|
116 | %{_libdir}/libraw.so.23*
|
---|
117 | %{_libdir}/libraw_r.so.23*
|
---|
118 | %else
|
---|
119 | %{_libdir}/*.dll
|
---|
120 | %endif
|
---|
121 |
|
---|
122 | %files static
|
---|
123 | %if !0%{?os2_version}
|
---|
124 | %{_libdir}/libraw.a
|
---|
125 | %{_libdir}/libraw_r.a
|
---|
126 | %else
|
---|
127 | %{_libdir}/raw_r.a
|
---|
128 | %{_libdir}/raw.a
|
---|
129 | %endif
|
---|
130 |
|
---|
131 | %files devel
|
---|
132 | %doc manual
|
---|
133 | %doc samples
|
---|
134 | %{_includedir}/libraw/
|
---|
135 | %if !0%{?os2_version}
|
---|
136 | %{_libdir}/libraw.so
|
---|
137 | %{_libdir}/libraw_r.so
|
---|
138 | %else
|
---|
139 | %{_libdir}/raw_dll.a
|
---|
140 | %{_libdir}/raw23_dll.a
|
---|
141 | %{_libdir}/raw_r_dll.a
|
---|
142 | %{_libdir}/raw_r23_dll.a
|
---|
143 | %endif
|
---|
144 | %{_libdir}/pkgconfig/libraw.pc
|
---|
145 | %{_libdir}/pkgconfig/libraw_r.pc
|
---|
146 | %exclude %{_docdir}/libraw/*
|
---|
147 |
|
---|
148 | %if 0%{?samples}
|
---|
149 | %files samples
|
---|
150 | %{_bindir}/*
|
---|
151 | %endif
|
---|
152 |
|
---|
153 | %changelog
|
---|
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
|
---|
157 |
|
---|
158 | * Wed Sep 13 2023 Elbert Pol <elbert.pol@gmail.com> - 0.21.1-1
|
---|
159 | - Updated to latest version.
|
---|
160 |
|
---|
161 | * Thu Oct 15 2020 Elbert Pol <elbert.pol@gmail.com> - 0.20.2-1
|
---|
162 | - Updated to latest version
|
---|
163 |
|
---|
164 | * Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-5
|
---|
165 | - Remove dll's from the devel package.
|
---|
166 |
|
---|
167 | * Wed Jan 30 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-4
|
---|
168 | - Add the raw_*.a files to devel package.
|
---|
169 |
|
---|
170 | * Sat Dec 29 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-3
|
---|
171 | - Link with newer Lcms2
|
---|
172 |
|
---|
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
|
---|
175 |
|
---|
176 | * Thu Dec 27 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-1
|
---|
177 | - First Rpm version OS/2
|
---|
178 |
|
---|