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