source: spec/trunk/SPECS/libraw.spec@ 1843

Last change on this file since 1843 was 1838, checked in by tellie, 2 years ago

spec: libraw: Release version 0.21.1-1.

File size: 3.9 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: 1%{?dist}
11License: BSD and (CDDL-1.0 or LGPLv2)
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
26Patch0: LibRaw-pkgconfig.patch
27
28Provides: bundled(dcraw) = 9.25
29
30%description
31LibRaw is a library for reading RAW files obtained from digital photo
32cameras (CRW/CR2, NEF, RAF, DNG, and others).
33
34LibRaw is based on the source codes of the dcraw utility, where part of
35drawbacks have already been eliminated and part will be fixed in future.
36
37%package devel
38Summary: LibRaw development libraries
39Requires: %{name}%{?_isa} = %{version}-%{release}
40
41%description devel
42LibRaw development libraries.
43
44This package contains libraries that applications can use to build
45against LibRaw.
46
47%package static
48Summary: LibRaw static development libraries
49Requires: %{name}-devel%{?_isa} = %{version}-%{release}
50
51%description static
52LibRaw static development libraries.
53
54%package samples
55Summary: LibRaw sample programs
56Requires: %{name} = %{version}-%{release}
57
58%description samples
59LibRaw sample programs
60
61%prep
62%if !0%{?os2_version}
63%autosetup -p1 -n %{name}-%{version}
64%else
65%scm_setup
66%endif
67
68%build
69export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
70export LIBS="-lcx -lpthread"
71autoreconf -ifv
72%configure \
73 --enable-examples=%{?samples:yes}%{!?samples:no} \
74 --enable-jasper \
75 --enable-jpeg \
76 --enable-lcms
77%if !0%{?os2_version}
78 --enable-openmp
79%endif
80
81# https://fedoraproject.org/wiki/Packaging:Guidelines#Beware_of_Rpath
82sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
83sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
84
85%if !0%{?os2_version}
86%make_build
87%else
88make %{?_smp_mflags}
89%endif
90
91%install
92cp -pr doc manual
93chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt
94chmod 644 manual/*.html
95
96# The Libraries
97%make_install
98
99rm -rfv samples/.deps
100rm -fv samples/.dirstamp
101rm -fv samples/*.o
102
103rm -fv %{buildroot}%{_libdir}/lib*.la
104
105%if !0%{?os2_version}
106%ldconfig_scriptlets
107%endif
108
109%files
110%defattr(-,root,root)
111%doc Changelog.txt
112%license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
113%if !0%{?os2_version}
114%{_libdir}/libraw.so.23*
115%{_libdir}/libraw_r.so.23*
116%else
117%{_libdir}/*.dll
118%endif
119
120%files static
121%defattr(-,root,root)
122%if !0%{?os2_version}
123%{_libdir}/libraw.a
124%{_libdir}/libraw_r.a
125%else
126%{_libdir}/raw_r.a
127%{_libdir}/raw_r_dll.a
128%{_libdir}/raw_r23_dll.a
129%endif
130
131%files devel
132%defattr(-,root,root)
133%doc manual
134%doc samples
135%{_includedir}/libraw/
136%if !0%{?os2_version}
137%{_libdir}/libraw.so
138%{_libdir}/libraw_r.so
139%else
140%{_libdir}/raw.a
141%{_libdir}/raw_dll.a
142%{_libdir}/raw23_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%defattr(-,root,root)
150%files samples
151%{_bindir}/*
152%endif
153
154%changelog
155* Wed Sep 14 2023 Elbert Pol <elbert.pol@gmail.com> - 0.21.1-1
156- Updated to latest version.
157
158* Thu Oct 15 2020 Elbert Pol <elbert.pol@gmail.com> - 0.20.2-1
159- Updated to latest version
160
161* Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-5
162- Remove dll's from the devel package.
163
164* Wed Jan 30 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-4
165- Add the raw_*.a files to devel package.
166
167* Sat Dec 29 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-3
168- Link with newer Lcms2
169
170* Fri Dec 28 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-2
171- Add patch to source as thats better if have own repo
172
173* Thu Dec 27 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-1
174- First Rpm version OS/2
Note: See TracBrowser for help on using the repository browser.