]> git.pld-linux.org Git - packages/libraw.git/blob - libraw.spec
- updated to 0.17.2 (strncpy bounds fix)
[packages/libraw.git] / libraw.spec
1 #
2 # Conditional build:
3 %bcond_without  openmp  # OpenMP support
4 %bcond_without  gpl2    # GPL v2+ demosaic pack
5 %bcond_without  gpl3    # GPL v3+ demosaic pack
6 #
7 %if %{without gpl2}
8 %undefine       gpl3
9 %endif
10 Summary:        LibRaw - a library for reading RAW files
11 Summary(pl.UTF-8):      LibRaw - biblioteka do odczytu plików RAW
12 Name:           libraw
13 Version:        0.17.2
14 Release:        1
15 %if %{with gpl3}
16 License:        GPL v3+
17 %else
18 %if %{with gpl2}
19 License:        GPL v2+
20 %else
21 License:        LGPL v2.1 or CDDL v1.0 or LibRaw Software License
22 %endif
23 %endif
24 Group:          Libraries
25 #Source0Download: http://www.libraw.org/download#stable
26 Source0:        http://www.libraw.org/data/LibRaw-%{version}.tar.gz
27 # Source0-md5:  456626300777209def1ea784910f326a
28 Source1:        http://www.libraw.org/data/LibRaw-demosaic-pack-GPL2-%{version}.tar.gz
29 # Source1-md5:  ec783ebbef29721935525169b1eb51f7
30 Source2:        http://www.libraw.org/data/LibRaw-demosaic-pack-GPL3-%{version}.tar.gz
31 # Source2-md5:  a1100769a0b29af114e38cd4fe080717
32 URL:            http://www.libraw.org/
33 BuildRequires:  autoconf >= 2.50
34 BuildRequires:  automake
35 %{?with_openmp:BuildRequires:   gcc >= 6:4.2}
36 BuildRequires:  jasper-devel
37 BuildRequires:  lcms2-devel >= 2
38 %{?with_openmp:BuildRequires:   libgomp-devel}
39 BuildRequires:  libjpeg-devel
40 BuildRequires:  libstdc++-devel
41 BuildRequires:  libtool
42 BuildRequires:  pkgconfig
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %description
46 LibRaw is a library for reading RAW files obtained from digital photo
47 cameras (CRW/CR2, NEF, RAF, DNG, and others).
48
49 LibRaw is based on the source codes of the dcraw utility, where part
50 of drawbacks have already been eliminated and part will be fixed in
51 future. The users of the library are provided with API to be built
52 into their software programs.
53
54 %description -l pl.UTF-8
55 LibRaw to biblioteka do odczytu plików RAW uzyskanych z cyfrowych
56 aparatów fotograficznych (w formacie CRW/CR2, NEF, RAF, DNG i innych).
57
58 LibRaw jest oparty na kodzie źródłowym dcraw, z którego część wad
59 została już wyeliminowana, a część zostanie poprawiona w przyszłości.
60
61 %package samples
62 Summary:        LibRaw sample programs
63 Summary(pl.UTF-8):      Programy przykładowe do LibRaw
64 Group:          Applications/Graphics
65
66 %description samples
67 LibRaw sample programs.
68
69 %description samples -l pl.UTF-8
70 Programy przykładowe do LibRaw.
71
72 %package devel
73 Summary:        Header files for LibRaw
74 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki LibRaw
75 Group:          Development/Libraries
76 Requires:       %{name} = %{version}-%{release}
77 Requires:       jasper-devel
78 Requires:       lcms2-devel >= 2
79 %{?with_openmp:Requires:        libgomp-devel}
80 Requires:       libjpeg-devel
81 Requires:       libstdc++-devel
82
83 %description devel
84 Header files for LibRaw.
85
86 %description devel -l pl.UTF-8
87 Pliki nagłówkowe biblioteki LibRaw.
88
89 %package static
90 Summary:        Static LibRaw library
91 Summary(pl.UTF-8):      Statyczna biblioteka LibRaw
92 Group:          Development/Libraries
93 Requires:       %{name}-devel = %{version}-%{release}
94
95 %description static
96 Static LibRaw library.
97
98 %description static -l pl.UTF-8
99 Statyczna biblioteka LibRaw.
100
101 %prep
102 %setup -q -n LibRaw-%{version} %{?with_gpl2:-a1} %{?with_gpl3:-a2}
103
104 %if %{with gpl2}
105 for f in LibRaw-demosaic-pack-GPL2-%{version}/{COPYRIGHT,Changelog,README} ; do
106         cp -p $f $(basename $f).demosaic-pack-GPL2
107 done
108 %endif
109 %if %{with gpl3}
110 for f in LibRaw-demosaic-pack-GPL3-%{version}/{COPYRIGHT,Changelog,README} ; do
111         cp -p $f $(basename $f).demosaic-pack-GPL3
112 done
113 %endif
114
115 %build
116 %{__libtoolize}
117 %{__aclocal} -I m4
118 %{__autoconf}
119 %{__automake}
120 %configure \
121         --enable-demosaic-pack-gpl2=%{?with_gpl2:LibRaw-demosaic-pack-GPL2-%{version}}%{!?with_gpl2:no} \
122         --enable-demosaic-pack-gpl3=%{?with_gpl3:LibRaw-demosaic-pack-GPL3-%{version}}%{!?with_gpl3:no} \
123         %{!?with_openmp:--disable-openmp}
124
125 %{__make} \
126         %{?with_openmp:lib_libraw_la_LIBADD=-lgomp lib_libraw_r_la_LIBADD=-lgomp}
127
128 %install
129 rm -rf $RPM_BUILD_ROOT
130
131 %{__make} install \
132         DESTDIR=$RPM_BUILD_ROOT
133
134 # packaged as %doc
135 %{__rm} -r $RPM_BUILD_ROOT%{_docdir}/%{name}
136
137 %clean
138 rm -rf $RPM_BUILD_ROOT
139
140 %post   -p /sbin/ldconfig
141 %postun -p /sbin/ldconfig
142
143 %files
144 %defattr(644,root,root,755)
145 %doc COPYRIGHT Changelog.txt LICENSE.LibRaw.pdf README README.demosaic-packs %{?with_gpl2:*.demosaic-pack-GPL2} %{?with_gpl3:*.demosaic-pack-GPL3}
146 %attr(755,root,root) %{_libdir}/libraw.so.*.*.*
147 %attr(755,root,root) %ghost %{_libdir}/libraw.so.15
148 %attr(755,root,root) %{_libdir}/libraw_r.so.*.*.*
149 %attr(755,root,root) %ghost %{_libdir}/libraw_r.so.15
150
151 %files samples
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_bindir}/4channels
154 %attr(755,root,root) %{_bindir}/dcraw_emu
155 %attr(755,root,root) %{_bindir}/dcraw_half
156 %attr(755,root,root) %{_bindir}/half_mt
157 %attr(755,root,root) %{_bindir}/mem_image
158 %attr(755,root,root) %{_bindir}/multirender_test
159 %attr(755,root,root) %{_bindir}/postprocessing_benchmark
160 %attr(755,root,root) %{_bindir}/raw-identify
161 %attr(755,root,root) %{_bindir}/simple_dcraw
162 %attr(755,root,root) %{_bindir}/unprocessed_raw
163
164 %files devel
165 %defattr(644,root,root,755)
166 %doc doc/*.html
167 %attr(755,root,root) %{_libdir}/libraw.so
168 %attr(755,root,root) %{_libdir}/libraw_r.so
169 %{_libdir}/libraw.la
170 %{_libdir}/libraw_r.la
171 %{_includedir}/libraw
172 %{_pkgconfigdir}/libraw.pc
173 %{_pkgconfigdir}/libraw_r.pc
174
175 %files static
176 %defattr(644,root,root,755)
177 %{_libdir}/libraw.a
178 %{_libdir}/libraw_r.a
This page took 0.076137 seconds and 4 git commands to generate.