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

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

spec: LibRaw: Release version 0.20.2-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
86%endif
87
88%install
89cp -pr doc manual
90chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt
91chmod 644 manual/*.html
92
93# The Libraries
94%make_install
95
96rm -rfv samples/.deps
97rm -fv samples/.dirstamp
98rm -fv samples/*.o
99
100rm -fv %{buildroot}%{_libdir}/lib*.la
101
102%if !0%{?os2_version}
103%ldconfig_scriptlets
104%endif
105
106%files
107%defattr(-,root,root)
108%doc Changelog.txt
109%license LICENSE.CDDL LICENSE.LGPL COPYRIGHT
110%if !0%{?os2_version}
111%{_libdir}/libraw.so.20*
112%{_libdir}/libraw_r.so.20*
113%else
114%{_libdir}/*.dll
115%endif
116
117%files static
118%defattr(-,root,root)
119%if !0%{?os2_version}
120%{_libdir}/libraw.a
121%{_libdir}/libraw_r.a
122%else
123%{_libdir}/raw.a
124%{_libdir}/raw_r.a
125%endif
126
127%files devel
128%defattr(-,root,root)
129%doc manual
130%doc samples
131%{_includedir}/libraw/
132%if !0%{?os2_version}
133%{_libdir}/libraw.so
134%{_libdir}/libraw_r.so
135%else
136%{_libdir}/raw*_dll.a
137%endif
138%{_libdir}/pkgconfig/libraw.pc
139%{_libdir}/pkgconfig/libraw_r.pc
140%exclude %{_docdir}/libraw/*
141
142%if 0%{?samples}
143%defattr(-,root,root)
144%files samples
145%{_bindir}/*
146%endif
147
148%changelog
149* Thu Oct 15 2020 Elbert Pol <elbert.pol@gmail.com> - 0.20.2-1
150- Updated to latest version
151
152* Thu Jan 31 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-5
153- Remove dll's from the devel package.
154
155* Wed Jan 30 2019 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-4
156- Add the raw_*.a files to devel package.
157
158* Sat Dec 29 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-3
159- Link with newer Lcms2
160
161* Fri Dec 28 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-2
162- Add patch to source as thats better if have own repo
163
164* Thu Dec 27 2018 Elbert Pol <elbert.pol@gmail.com> - 0.19.2-1
165- First Rpm version OS/2
Note: See TracBrowser for help on using the repository browser.