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