]>
Commit | Line | Data |
---|---|---|
defe6c78 | 1 | # |
06586aa9 | 2 | # Conditional build: |
87ba6f4c | 3 | %bcond_with apidocs # API documentation (currently broken) |
defe6c78 | 4 | %bcond_without baudboy # use lockdev library instead of baudboy |
38e66986 JB |
5 | %bcond_with canonupload # Canon upload experimental code |
6 | %bcond_without static_libs # static libraries | |
06586aa9 | 7 | # |
c9b52df7 | 8 | Summary: Libraries for digital cameras |
d7ce8ce8 ER |
9 | Summary(es.UTF-8): Foto GNU (gphoto) Release 2 |
10 | Summary(pl.UTF-8): Biblioteki obsługi kamer cyfrowych | |
11 | Summary(pt_BR.UTF-8): GNU Photo - programa GNU para câmeras digitais | |
c9b52df7 | 12 | Name: libgphoto2 |
38e66986 | 13 | Version: 2.4.0 |
c0d0b582 | 14 | Release: 4 |
38e66986 JB |
15 | License: LGPL v2+ |
16 | Group: Libraries | |
33b760f8 | 17 | Source0: http://dl.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2 |
38e66986 JB |
18 | # Source0-md5: a60154772635b693ff08b4f34dea7f61 |
19 | Patch0: %{name}-link.patch | |
20 | Patch1: %{name}-pl.po-update.patch | |
41f32e57 | 21 | URL: http://www.gphoto.org/ |
a56e41c9 | 22 | BuildRequires: autoconf >= 2.59 |
87ba6f4c | 23 | BuildRequires: automake >= 1:1.9 |
befe4d63 JB |
24 | BuildRequires: avahi-compat-libdns_sd-devel |
25 | BuildRequires: dbus-devel >= 0.31 | |
a56e41c9 | 26 | BuildRequires: gettext-devel >= 0.14.1 |
6dfc050f | 27 | %{?with_apidocs:BuildRequires: gtk-doc >= 0.10} |
befe4d63 | 28 | BuildRequires: hal-devel >= 0.5.0 |
9faddc76 | 29 | BuildRequires: libexif-devel >= 1:0.6.13 |
98433778 | 30 | BuildRequires: libltdl-devel |
c9b52df7 | 31 | BuildRequires: libtool >= 1:1.4.2-9 |
befe4d63 | 32 | BuildRequires: libusb-devel >= 0.1.5 |
defe6c78 JB |
33 | %{?with_baudboy:BuildRequires: lockdev-baudboy-devel} |
34 | %{!?with_baudboy:BuildRequires: lockdev-devel >= 1.0.2} | |
c9b52df7 | 35 | BuildRequires: pkgconfig |
60ab3b00 | 36 | BuildRequires: sed >= 4.0 |
9faddc76 | 37 | Requires: libexif >= 1:0.6.13 |
c9b52df7 JB |
38 | Provides: gphoto2-lib |
39 | Obsoletes: gphoto2-lib | |
40 | Conflicts: gphoto2 < 2.1.1 | |
5ad7e4be | 41 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
c9b52df7 | 42 | |
9d75e5d7 | 43 | %define _noautoreq libtool(.*) |
a5d14a19 | 44 | |
0e5afa13 ER |
45 | # PKGCONFIG changed during configures |
46 | %undefine configure_cache | |
47 | ||
c9b52df7 JB |
48 | %description |
49 | Libraries for digital cameras. | |
50 | ||
39969905 | 51 | %description -l es.UTF-8 |
c9b52df7 JB |
52 | Foto GNU (gphoto). |
53 | ||
39969905 JR |
54 | %description -l pl.UTF-8 |
55 | Biblioteki obsługi kamer cyfrowych. | |
c9b52df7 | 56 | |
39969905 JR |
57 | %description -l pt_BR.UTF-8 |
58 | O programa gphoto faz parte do projeto GNOME e é uma interface para | |
59 | uma grande variedade de câmeras fotográficas digitais. | |
c9b52df7 JB |
60 | |
61 | %package devel | |
62 | Summary: Header files for libgphoto2 | |
d7ce8ce8 ER |
63 | Summary(es.UTF-8): Archivos de deserrolo de libgphoto2 |
64 | Summary(pl.UTF-8): Pliki nagłówkowe dla libgphoto2 | |
65 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento do libgphoto2 | |
c9b52df7 | 66 | Group: Development/Libraries |
c564284c | 67 | Requires: %{name} = %{version}-%{release} |
6dfc050f | 68 | %{?with_apidocs:Requires: gtk-doc-common} |
9faddc76 | 69 | Requires: libexif-devel >= 1:0.6.13 |
75a821bc | 70 | Requires: libltdl-devel |
e30a03f2 | 71 | Requires: libusb-devel |
defe6c78 | 72 | %{!?with_baudboy:Requires: lockdev-devel} |
c9b52df7 JB |
73 | Obsoletes: gphoto2-lib-devel |
74 | Obsoletes: gphoto2-devel | |
75 | ||
76 | %description devel | |
77 | Header files for libgphoto2. | |
78 | ||
39969905 | 79 | %description devel -l es.UTF-8 |
c9b52df7 JB |
80 | Archivos de desarrolo de libgphoto2. |
81 | ||
39969905 JR |
82 | %description devel -l pl.UTF-8 |
83 | Pliki nagłówkowe dla libgphoto2. | |
c9b52df7 | 84 | |
39969905 | 85 | %description devel -l pt_BR.UTF-8 |
c9b52df7 JB |
86 | Arquivos de desenvolvimento do libgphoto2. |
87 | ||
88 | %package static | |
89 | Summary: Static version of libgphoto2 | |
d7ce8ce8 ER |
90 | Summary(es.UTF-8): Archivos de deserrolo de libgphoto2 |
91 | Summary(pl.UTF-8): Statyczna wersja libgphoto2 | |
92 | Summary(pt_BR.UTF-8): Arquivos de desenvolvimento do libgphoto2 | |
c9b52df7 | 93 | Group: Development/Libraries |
c564284c | 94 | Requires: %{name}-devel = %{version}-%{release} |
c9b52df7 JB |
95 | Obsoletes: gphoto2-lib-static |
96 | Obsoletes: gphoto2-static | |
97 | ||
98 | %description static | |
99 | Static version of libgphoto2. | |
100 | ||
39969905 | 101 | %description static -l es.UTF-8 |
c9b52df7 JB |
102 | Archivos de desarrolo de libgphoto2. |
103 | ||
39969905 | 104 | %description static -l pl.UTF-8 |
c9b52df7 JB |
105 | Statyczna wersja libgphoto2. |
106 | ||
39969905 | 107 | %description static -l pt_BR.UTF-8 |
c9b52df7 JB |
108 | Arquivos de desenvolvimento do libgphoto2. |
109 | ||
df7f48aa JB |
110 | %package port-serial |
111 | Summary: Serial port plugin for libgphoto2 | |
d7ce8ce8 | 112 | Summary(pl.UTF-8): Wtyczka obsługi portu szeregowego dla libgphoto2 |
df7f48aa JB |
113 | Group: Libraries |
114 | Requires: %{name} = %{version}-%{release} | |
115 | %{?with_baudboy:Requires: lockdev-baudboy} | |
116 | ||
117 | %description port-serial | |
118 | Serial port plugin for libgphoto2, needed to access cameras connected | |
119 | through serial port. | |
120 | ||
39969905 JR |
121 | %description port-serial -l pl.UTF-8 |
122 | Wtyczka obsługi portu szeregowego dla libgphoto2, potrzebna do | |
123 | współpracy z aparatami podłączonymi przez port szeregowy. | |
df7f48aa | 124 | |
c0d0b582 AM |
125 | %package -n hal-libgphoto2 |
126 | Summary: Userspace support for digital cameras | |
127 | Summary(pl.UTF-8): Wsparcie dla kamer cyfrowych w przestrzeni użytkownika | |
128 | Group: Applications/System | |
129 | Requires: hal >= 0.5.9-2 | |
130 | Requires: libusb >= 0.1.10a | |
131 | Requires: udev >= 1:089 | |
132 | Provides: udev-digicam | |
133 | Obsoletes: hotplug-digicam | |
134 | Obsoletes: udev-digicam | |
135 | Obsoletes: hal-gphoto | |
136 | ||
137 | %description -n hal-libgphoto2 | |
138 | Set of Udev rules and HAL device information file to handle digital | |
139 | cameras in userspace. | |
140 | ||
141 | %description -n hal-libgphoto2 -l pl.UTF-8 | |
142 | Zestaw reguł Udev i plik z informacjami o urządzeniach HAL-a do | |
143 | obsługi kamer cyfrowych w przestrzeni użytkownika. | |
144 | ||
c9b52df7 JB |
145 | %prep |
146 | %setup -q | |
9c44e314 | 147 | %patch0 -p1 |
38e66986 JB |
148 | %patch1 -p1 |
149 | ||
150 | rm -f po/stamp-po libgphoto2_port/po/stamp-po | |
60ab3b00 | 151 | |
c9b52df7 JB |
152 | %build |
153 | # supplied libtool is broken (relink) | |
c9b52df7 | 154 | %{__libtoolize} |
38e66986 JB |
155 | %{__aclocal} -I auto-m4 -I m4m |
156 | # -I libgphoto2_port/m4 | |
c9b52df7 JB |
157 | %{__autoconf} |
158 | %{__automake} | |
159 | cd libgphoto2_port | |
c9b52df7 | 160 | %{__libtoolize} |
38e66986 | 161 | %{__aclocal} -I auto-m4 -I m4 |
c9b52df7 JB |
162 | %{__autoconf} |
163 | %{__automake} | |
164 | cd .. | |
165 | ||
38e66986 | 166 | CFLAGS="%{rpmcflags}%{?with_canonupload: -DCANON_EXPERIMENTAL_UPLOAD}" |
c9b52df7 | 167 | %configure \ |
a56e41c9 | 168 | %{!?with_baudboy:--disable-baudboy} \ |
169 | --disable-resmgr \ | |
170 | --disable-ttylock \ | |
6dfc050f | 171 | %{?with_apidocs:--enable-docs} \ |
38e66986 | 172 | %{?with_static_libs:--enable-static} \ |
6dfc050f | 173 | %{?with_apidocs:--with-html-dir=%{_gtkdocdir}} |
c9b52df7 JB |
174 | |
175 | %{__make} | |
176 | ||
177 | %install | |
178 | rm -rf $RPM_BUILD_ROOT | |
c0d0b582 | 179 | install -d $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/ |
c9b52df7 JB |
180 | |
181 | %{__make} install \ | |
182 | DESTDIR=$RPM_BUILD_ROOT \ | |
183 | pkgconfigdir=%{_pkgconfigdir} \ | |
6b265df3 | 184 | udevscriptdir=/%{_lib}/udev \ |
6dfc050f | 185 | %{?with_apidocs:apidocdir=%{_gtkdocdir}} |
c9b52df7 | 186 | |
7e20d8b1 | 187 | %find_lang %{name} --all-name |
c9b52df7 JB |
188 | |
189 | # prepare docs | |
7e20d8b1 | 190 | install -d docs |
c9b52df7 | 191 | cp --parents \ |
87ba6f4c JB |
192 | camlibs/adc65/{Changelog,README.adc65,TODO} \ |
193 | camlibs/agfa-cl20/{ChangeLog,RANDOM,README.agfa-cl20,STATUS} \ | |
38e66986 JB |
194 | camlibs/aox/README.aox \ |
195 | camlibs/barbie/Protocol.txt \ | |
196 | camlibs/canon/{ChangeLog,README.canon} \ | |
197 | camlibs/casio/PROTOCOL.txt \ | |
87ba6f4c | 198 | camlibs/clicksmart310/README.clicksmart310 \ |
38e66986 JB |
199 | camlibs/digigr8/README.digigr8 \ |
200 | camlibs/dimera/{CREDITS,Protocol.txt} \ | |
201 | camlibs/enigma13/{README.enigma13,STATUS,protocol.txt} \ | |
202 | camlibs/fuji/PROTOCOL \ | |
203 | camlibs/gsmart300/README.gsmart300 \ | |
204 | camlibs/iclick/README.iclick \ | |
205 | camlibs/jamcam/README.jamcam \ | |
206 | camlibs/jd11/jd11.html \ | |
a56e41c9 | 207 | camlibs/kodak/CAMERAS \ |
a56e41c9 | 208 | camlibs/kodak/ez200/Protocol.txt \ |
38e66986 JB |
209 | camlibs/konica/{EXPERTS,README.konica,qm150.txt} \ |
210 | camlibs/largan/lmini/README.largan-lmini \ | |
211 | camlibs/lg_gsm/README.lg_gsm \ | |
212 | camlibs/mars/{README.mars,protocol.txt} \ | |
a56e41c9 | 213 | camlibs/minolta/NEWER_MINOLTAS \ |
87ba6f4c | 214 | camlibs/minolta/dimagev/README.minolta-dimagev \ |
38e66986 JB |
215 | camlibs/mustek/{AUTHOR,README.mustek} \ |
216 | camlibs/panasonic/README.panasonic \ | |
217 | camlibs/panasonic/coolshot/README.panasonic-coolshot \ | |
218 | camlibs/panasonic/l859/README.panasonic-l859 \ | |
219 | camlibs/pccam300/README.pccam300 \ | |
220 | camlibs/pccam600/README.pccam600 \ | |
221 | camlibs/polaroid/*.html \ | |
87ba6f4c | 222 | camlibs/ptp2/{ChangeLog,PTPIP.TXT,README.ptp2,TODO,ptpip.html} \ |
38e66986 JB |
223 | camlibs/ricoh/g3.txt \ |
224 | camlibs/sierra/PROTOCOL \ | |
225 | camlibs/sipix/{*.txt,web2.html} \ | |
226 | camlibs/smal/README.smal \ | |
227 | camlibs/sonix/README.sonix \ | |
228 | camlibs/sonydscf1/{README.sonydscf1,todo} \ | |
229 | camlibs/soundvision/README.soundvision \ | |
87ba6f4c | 230 | camlibs/spca50x/{ChangeLog*,README.spca50x} \ |
38e66986 | 231 | camlibs/sq905/{README.913C,README.sq905} \ |
a56e41c9 | 232 | camlibs/stv0674/{Changelog,Protocol} \ |
38e66986 | 233 | camlibs/stv0680/{680_comm*,CREDITS,README.pdf} \ |
87ba6f4c | 234 | camlibs/toshiba/pdrm11/README.toshiba-pdrm11 \ |
a56e41c9 | 235 | libgphoto2_port/{AUTHORS,ChangeLog} \ |
236 | libgphoto2_port/disk/ChangeLog \ | |
c9b52df7 JB |
237 | docs |
238 | ||
c66904f1 AM |
239 | # hal |
240 | export LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} | |
241 | cd packaging/linux-hotplug | |
61fe3c0f | 242 | install -d $RPM_BUILD_ROOT%{_datadir}/hal/fdi/information/20thirdparty |
c66904f1 AM |
243 | export LIBDIR=$RPM_BUILD_ROOT%{_libdir} |
244 | export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} | |
245 | export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} | |
246 | ||
247 | $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \ | |
248 | grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi | |
249 | ||
c0d0b582 AM |
250 | $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list \ |
251 | udev-rules version 0.98 group usb mode 0660 > $RPM_BUILD_ROOT%{_sysconfdir}/udev/rules.d/52-udev-gphoto.rules | |
252 | ||
38e66986 | 253 | %if %{with static_libs} |
71e4af28 AM |
254 | rm -f $RPM_BUILD_ROOT%{_libdir}/libgphoto2/*/*.a |
255 | rm -f $RPM_BUILD_ROOT%{_libdir}/libgphoto2_port/*/*.a | |
38e66986 | 256 | %endif |
ef542cac | 257 | # kill unpackaged files |
258 | rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libgphoto{2,2_port} | |
0c0af462 | 259 | |
c9b52df7 JB |
260 | %clean |
261 | rm -rf $RPM_BUILD_ROOT | |
262 | ||
263 | %post -p /sbin/ldconfig | |
264 | %postun -p /sbin/ldconfig | |
265 | ||
c0d0b582 AM |
266 | %post -n hal-libgphoto2 |
267 | %service -q haldaemon restart | |
268 | ||
7e20d8b1 | 269 | %files -f %{name}.lang |
c9b52df7 | 270 | %defattr(644,root,root,755) |
87ba6f4c | 271 | %doc AUTHORS ChangeLog MAINTAINERS NEWS README TESTERS docs/* |
38e66986 JB |
272 | %attr(755,root,root) %{_libdir}/libgphoto2.so.*.*.* |
273 | %attr(755,root,root) %{_libdir}/libgphoto2_port.so.*.*.* | |
7e20d8b1 | 274 | |
0c0af462 | 275 | # camera plugins |
a56e41c9 | 276 | %dir %{_libdir}/libgphoto2 |
277 | %dir %{_libdir}/libgphoto2/%{version} | |
278 | %attr(755,root,root) %{_libdir}/libgphoto2/%{version}/*.so | |
a5d14a19 | 279 | %{_libdir}/libgphoto2/%{version}/*.la |
7e20d8b1 | 280 | |
0c0af462 | 281 | # port plugins |
a56e41c9 | 282 | %dir %{_libdir}/libgphoto2_port |
283 | %dir %{_libdir}/libgphoto2_port/* | |
284 | %attr(755,root,root) %{_libdir}/libgphoto2_port/*/disk.so | |
2dae33f1 | 285 | %attr(755,root,root) %{_libdir}/libgphoto2_port/*/ptpip.so |
a56e41c9 | 286 | %attr(755,root,root) %{_libdir}/libgphoto2_port/*/usb.so |
a5d14a19 AM |
287 | %{_libdir}/libgphoto2_port/*/disk.la |
288 | %{_libdir}/libgphoto2_port/*/ptpip.la | |
289 | %{_libdir}/libgphoto2_port/*/usb.la | |
7e20d8b1 | 290 | |
2dae33f1 | 291 | # utilities |
2dae33f1 | 292 | %attr(755,root,root) %{_libdir}/libgphoto2/print-camera-list |
7e20d8b1 | 293 | |
c9b52df7 | 294 | %dir %{_datadir}/libgphoto2 |
a56e41c9 | 295 | %dir %{_datadir}/libgphoto2/%{version} |
296 | %dir %{_datadir}/libgphoto2/%{version}/konica | |
297 | %{_datadir}/libgphoto2/%{version}/konica/english | |
298 | %lang(fr) %{_datadir}/libgphoto2/%{version}/konica/french | |
299 | %lang(de) %{_datadir}/libgphoto2/%{version}/konica/german | |
300 | %lang(ja) %{_datadir}/libgphoto2/%{version}/konica/japanese | |
301 | %lang(ko) %{_datadir}/libgphoto2/%{version}/konica/korean | |
302 | %lang(es) %{_datadir}/libgphoto2/%{version}/konica/spanish | |
c9b52df7 JB |
303 | |
304 | %files devel | |
305 | %defattr(644,root,root,755) | |
38e66986 JB |
306 | %attr(755,root,root) %{_bindir}/gphoto2-config |
307 | %attr(755,root,root) %{_bindir}/gphoto2-port-config | |
308 | %attr(755,root,root) %{_libdir}/libgphoto2.so | |
309 | %attr(755,root,root) %{_libdir}/libgphoto2_port.so | |
310 | %{_libdir}/libgphoto2.la | |
311 | %{_libdir}/libgphoto2_port.la | |
c9b52df7 | 312 | %{_includedir}/gphoto2 |
38e66986 JB |
313 | %{_pkgconfigdir}/libgphoto2.pc |
314 | %{_pkgconfigdir}/libgphoto2_port.pc | |
315 | %{_mandir}/man3/libgphoto2.3* | |
316 | %{_mandir}/man3/libgphoto2_port.3* | |
6dfc050f | 317 | %{?with_apidocs:%{_gtkdocdir}/*} |
c9b52df7 | 318 | |
38e66986 | 319 | %if %{with static_libs} |
c9b52df7 JB |
320 | %files static |
321 | %defattr(644,root,root,755) | |
38e66986 JB |
322 | %{_libdir}/libgphoto2.a |
323 | %{_libdir}/libgphoto2_port.a | |
324 | %endif | |
df7f48aa JB |
325 | |
326 | %files port-serial | |
327 | %defattr(644,root,root,755) | |
a56e41c9 | 328 | %attr(755,root,root) %{_libdir}/libgphoto2_port/*/serial.so |
a5d14a19 | 329 | %{_libdir}/libgphoto2_port/*/serial.la |
c0d0b582 AM |
330 | |
331 | %files -n hal-libgphoto2 | |
332 | %defattr(644,root,root,755) | |
333 | %{_sysconfdir}/udev/rules.d/52-udev-gphoto.rules | |
334 | %{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi | |
335 | %attr(755,root,root) /%{_lib}/udev/check-mtp-device | |
336 | %attr(755,root,root) /%{_lib}/udev/check-ptp-camera |