source: spec/trunk/SPECS/LibRaw.spec@ 1719

Last change on this file since 1719 was 1719, checked in by tellie, 5 years ago

spec: jasper: Release version 2.0.22-1.

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