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