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.20.2
|
---|
10 | Release: 1%{?dist}
|
---|
11 | License: BSD and (CDDL or LGPLv2)
|
---|
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 |
|
---|
20 | %if !0%{?os2_version}
|
---|
21 | Source0: http://github.com/LibRaw/LibRaw/archive/%{version}.tar.gz
|
---|
22 | %else
|
---|
23 | %scm_source github https://github.com/Tellie/LibRaw-os2 master
|
---|
24 | %endif
|
---|
25 | Patch0: LibRaw-pkgconfig.patch
|
---|
26 | Provides: bundled(dcraw) = 9.25
|
---|
27 |
|
---|
28 | %description
|
---|
29 | LibRaw is a library for reading RAW files obtained from digital photo
|
---|
30 | cameras (CRW/CR2, NEF, RAF, DNG, and others).
|
---|
31 |
|
---|
32 | LibRaw is based on the source codes of the dcraw utility, where part of
|
---|
33 | drawbacks have already been eliminated and part will be fixed in future.
|
---|
34 |
|
---|
35 | %package devel
|
---|
36 | Summary: LibRaw development libraries
|
---|
37 | Requires: %{name}%{?_isa} = %{version}-%{release}
|
---|
38 |
|
---|
39 | %description devel
|
---|
40 | LibRaw development libraries.
|
---|
41 |
|
---|
42 | This package contains libraries that applications can use to build
|
---|
43 | against LibRaw.
|
---|
44 |
|
---|
45 | %package static
|
---|
46 | Summary: LibRaw static development libraries
|
---|
47 | Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
---|
48 |
|
---|
49 | %description static
|
---|
50 | LibRaw static development libraries.
|
---|
51 |
|
---|
52 | %package samples
|
---|
53 | Summary: LibRaw sample programs
|
---|
54 | Requires: %{name} = %{version}-%{release}
|
---|
55 |
|
---|
56 | %description samples
|
---|
57 | LibRaw 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
|
---|
67 | export LDFLAGS="-Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
---|
68 | export LIBS="-lcx -lpthread"
|
---|
69 | autoreconf -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
|
---|
80 | sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
|
---|
81 | sed -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 | make %{?_smp_mflags}
|
---|
87 | %endif
|
---|
88 |
|
---|
89 | %install
|
---|
90 | cp -pr doc manual
|
---|
91 | chmod 644 LICENSE.CDDL LICENSE.LGPL COPYRIGHT Changelog.txt
|
---|
92 | chmod 644 manual/*.html
|
---|
93 |
|
---|
94 | # The Libraries
|
---|
95 | %make_install
|
---|
96 |
|
---|
97 | rm -rfv samples/.deps
|
---|
98 | rm -fv samples/.dirstamp
|
---|
99 | rm -fv samples/*.o
|
---|
100 |
|
---|
101 | rm -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
|
---|