source: spec/trunk/SPECS/LibRaw.spec

Last change on this file was 1839, checked in by tellie, 2 years ago

spec: LibRaw: Release version 0.21.1-2.

File size: 4.0 KB
Line 
1
2# feature macro to enable samples (or not)
3%if 0%{?rhel} != 7
4%global samples 1
5%endif
6
7Summary: Library for reading RAW files obtained from digital photo cameras
8Name: LibRaw
9Version: 0.21.1
10Release: 2%{?dist}
11License: BSD-3-Clause and (CDDL-1.0 or LGPL-2.1-only)
12URL: http://www.libraw.org
13
14BuildRequires: gcc-c++
15BuildRequires: pkgconfig(lcms2)
16BuildRequires: pkgconfig(jasper)
17BuildRequires: pkgconfig(libjpeg)
18BuildRequires: autoconf automake libtool
19BuildRequires: make
20
21%if !0%{?os2_version}
22Source0: 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}
27Patch0: LibRaw-pkgconfig.patch
28Patch1: 9ab70f6dca19229cb5caad7cc31af4e7501bac93.patch
29%endif
30Provides: bundled(dcraw) = 9.25
31
32%description
33LibRaw is a library for reading RAW files obtained from digital photo
34cameras (CRW/CR2, NEF, RAF, DNG, and others).
35
36LibRaw is based on the source codes of the dcraw utility, where part of
37drawbacks have already been eliminated and part will be fixed in future.
38
39%package devel
40Summary: LibRaw development libraries
41Requires: %{name}%{?_isa} = %{version}-%{release}
42
43%description devel
44LibRaw development libraries.
45
46This package contains libraries that applications can use to build
47against LibRaw.
48
49%package static
50Summary: LibRaw static development libraries
51Requires: %{name}-devel%{?_isa} = %{version}-%{release}
52
53%description static
54LibRaw static development libraries.
55
56%package samples
57Summary: LibRaw sample programs
58Requires: %{name} = %{version}-%{release}
59
60%description samples
61LibRaw 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
71autoreconf -ifv
72export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
73export 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
85sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
86sed -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
91make %{?_smp_mflags}
92%endif
93
94%install
95cp -pr doc manual
96chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt
97chmod 644 manual/*.html
98
99# The Libraries
100%make_install
101
102rm -rfv samples/.deps
103rm -fv samples/.dirstamp
104rm -fv samples/*.o
105
106rm -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
Note: See TracBrowser for help on using the repository browser.