1 ########################################################################
3 # $Id: package.spec.in 12088 2009-05-16 22:25:13Z marcusmeissner $
5 # RPM spec file for libgphoto2
7 # TODO list concerning packaging
8 # - review and coordinate RPM packaging for libgphoto2, gphoto2, gtkam
10 ########################################################################
12 %define debug_package %{nil}
14 ####################################
15 Summary: Software for accessing digital cameras
20 Group: Applications/Multimedia
21 BuildRoot: %{_tmppath}/%{name}-%{version}-root
22 # sources only available from sf.net - but not wgettable.
23 # Source: http://www.gphoto.org/dist/libgphoto2-2.4.11.tar.gz
24 Source: http://prdownloads.sourceforge.net/gphoto/libgphoto2-2.4.11.tar.gz
25 Url: http://www.gphoto.org/
26 ExcludeArch: s390 s390x
28 Provides: libgphoto2_port
29 Requires: libgphoto2_port
30 # absolute requirements
31 PreReq: hotplug >= 2001_04_24-13
32 PreReq: /sbin/ldconfig, grep, fileutils
33 BuildRequires: findutils perl
35 # the following requirements are optional
36 #BuildRequires: gtk-doc
37 BuildRequires: libusb-devel >= 0.1.8
39 ####################################
41 The gPhoto2 project is a universal, free application and library
42 framework that lets you download images from several different
43 digital camera models, including the newer models with USB
44 connections. Note that
45 a) for some older camera models you must use the old "gphoto" package.
46 b) for USB mass storage models you must use the driver in the kernel
48 This libgphoto2 package contains only the library that digital
49 camera applications can use.
51 Frontend like the command-line utility gphoto2 and other (GUI)
52 frontends are available seperately.
54 ####################################
56 Summary: Headers and libraries to compile against the libgphoto2 library.
57 Requires: %{name} = %{version}
58 Provides: libgphoto2-devel
59 Provides: libgphoto2_port-devel
60 Group: Development/Libraries
62 ####################################
64 The gPhoto2 project is a universal, free application and library
65 framework that lets you download images from several different
66 digital camera models, including the newer models with USB
67 connections. Note that
68 a) for some older camera models you must use the old "gphoto" package.
69 b) for USB mass storage models you must use the driver in the kernel
71 This libgphoto2-devel package contains the files needed to compile
72 frontends like the command-line utility gphoto2 and other (GUI)
73 frontends, which are available seperately.
76 ########################################################################
77 # Building and installing the beast into %{buildroot}
78 ########################################################################
80 ####################################
82 rm -rf "${RPM_BUILD_DIR}/%{name}-%{version}"
83 %setup -q -n %{name}-%{version}
85 ####################################
87 %define __libtoolize :
88 # FIXME: We should copy the disable- arguments here
89 ##FIXMEPERCENTconfigure --enable-docs --with-docs-dir=%{buildroot}%{_docdir}/%{name}
90 %configure --with-docs-dir=%{buildroot}%{_docdir}/%{name}
93 ####################################
95 rm -rf "${RPM_BUILD_ROOT}"
97 # Convince gphoto2 to be packaged.
98 perl -p -i -e "s|^libdir.*|libdir='$RPM_BUILD_ROOT%{_libdir}'|g" \
99 libgphoto2_port/libgphoto2_port/libgphoto2_port.la
103 # Fix up libtool libraries.
104 find $RPM_BUILD_ROOT -name '*.la' | \
105 xargs perl -p -i -e "s|$RPM_BUILD_ROOT||g"
107 #cp -a %{buildroot}%{_docdir}/%{name}-%{version}/html html
108 #cp -a %{buildroot}%{_docdir}/libgphoto2_port-0.5.1/html/api/gphoto2-port html/api
109 #find html -name '*.sgml' | xargs rm
112 %find_lang libgphoto2-2
113 # FIXME: Update this manually as long as libgphoto2_port has a
114 # different build system.
115 %find_lang libgphoto2_port-0
118 find %{buildroot} -type f -or -type l \
119 | sed 's!^%{buildroot}!!' | sort > %{name}-%{version}.all.files
122 egrep '\.so(\.[0-9]+)*$' \
123 < %{name}-%{version}.all.files > %{name}-%{version}.so.files
124 egrep -v '\.so(\.[0-9]+)*$' \
125 < %{name}-%{version}.all.files > %{name}-%{version}.no-so.files
127 # extract files for devel package
128 egrep '(-config|\.h|\.la|\.a|\.pc|\.3)$' \
129 < %{name}-%{version}.no-so.files > %{name}-%{version}.devel.files
130 egrep -v '(-config|\.h|\.la|\.a|\.pc|\.3)$' \
131 < %{name}-%{version}.no-so.files > %{name}-%{version}.no-devel.files
134 egrep '^%{_docdir}' \
135 < %{name}-%{version}.no-devel.files > %{name}-%{version}.doc.files
136 egrep -v '^%{_docdir}' \
137 < %{name}-%{version}.no-devel.files > %{name}-%{version}.no-doc.files
140 egrep '^%{_datadir}/locale' \
141 < %{name}-%{version}.no-doc.files > %{name}-%{version}.i18n.files
142 egrep -v '^%{_datadir}/locale' \
143 < %{name}-%{version}.no-doc.files > %{name}-%{version}.no-i18n.files
145 # extract misc files for lib package
146 egrep '^(%{_libdir}|%{_datadir})/libgphoto2' \
147 < %{name}-%{version}.no-i18n.files > %{name}-%{version}.misc.files
148 egrep -v '^(%{_libdir}|%{_datadir})/libgphoto2' \
149 < %{name}-%{version}.no-i18n.files > %{name}-%{version}.rest.files \
150 || echo "non-zero exit code is not fatal here"
152 if [ -s %{name}-%{version}.rest.files ]
154 cat %{name}-%{version}.rest.files
157 cat %{name}-%{version}.{so,doc,misc,i18n}.files \
158 > %{name}-%{version}.files
161 touch debugfiles.list
165 ####################################
167 # FIXME: Cleanup deactiveated for debugging
168 # rm -rf "${RPM_BUILD_ROOT}"
170 ########################################################################
171 # file list and installation for main package
172 ########################################################################
174 ####################################
175 %files -f %{name}-%{version}.files
176 %defattr(-,root,root)
177 # FIXME: correct %docxyz markup for doc files
179 ####################################
185 # add supported cameras to /etc/hotplug/usb.usermap
186 grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.tmp
187 %{_libdir}/libgphoto2/print-usb-usermap >> /etc/hotplug/usb.usermap.tmp
188 mv /etc/hotplug/usb.usermap.tmp /etc/hotplug/usb.usermap
190 ####################################
193 # unregister libraries
196 if [ "$1" = 0 ]; then
197 # remove supported cameras from /etc/hotplug/usb.usermap
198 # if erasing the package not as part of a package update
199 grep -v '^usbcam' /etc/hotplug/usb.usermap > /etc/hotplug/usb.usermap.new
200 mv /etc/hotplug/usb.usermap.new /etc/hotplug/usb.usermap
204 ########################################################################
205 # file list and installation for -devel subpackage
206 ########################################################################
208 ####################################
209 %files devel -f %{name}-%{version}.devel.files
210 %defattr(-,root,root)
214 ########################################################################
216 ########################################################################
218 * Thu Jun 20 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.1.4head
219 - hack in correct find_lang arguments
220 - fix misc. nagging little things preventing "rpmbuild -ta" from working
222 * Thu Jun 20 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.1.0rc3-1
223 - only --enable-docs and copy API docs if GTK_DOC found
224 - use --with-doc-formats from local ./configure call
226 * Tue May 28 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.0.1dev8-1
227 - comment out requirements if not used (gtk-doc, transfig)
228 - provide libgphoto2_port - for future compatibility
229 - fixed handling of misc HTML docs (API docs and docbook-generated manual)
230 - install linux-hotplug scripts into a directory of that name
231 - added gphoto2_port(3) man page
233 * Sat May 18 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.0.1dev6-1
234 - added API HTML docs to the -devel package
235 - added man page gphoto2(3), require hotplug >= 2001_04_24-13
237 * Thu May 9 2002 Hans Ulrich Niedermann <gp@n-dimensional.de> 2.0.1dev4-1
238 - merged changes from current Redhat spec file into gphoto2 distribution
239 as they managed to get the beast to build
240 - re-added FAQ to package (Redhat left it out regrettably)
241 - only require hotplug 2001_04_24-11 instead of 2001_04_24-13
243 * Mon Apr 29 2002 Tim Waugh <twaugh@redhat.com> 2.0-6
244 - In fact, don't even build for mainframe.
246 * Mon Apr 29 2002 Florian La Roche <Florian.LaRoche@redhat.de> 2.0-5
247 - do not require hotplug for mainframe
249 * Mon Apr 15 2002 Nalin Dahyabhai <nalin@redhat.com> 2.0-4
250 - Set the owner of the device to the console lock holder, not the owner
251 of /dev/console, in the hotplug agent, fixing access for users who log
252 in at VTs and use startx (#62976).
254 * Fri Apr 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-3
255 - Rebuild (fixed bug #63355).
257 * Sat Apr 06 2002 Hans Ulrich Niedermann <gp@n-dimensional.de>
258 - require libusb >= 0.0.5 and for building require transfig
260 * Wed Feb 27 2002 Tim Waugh <twaugh@redhat.com> 2.0-2
261 - Fix from CVS: close port unconditionally in gp_camera_exit().
263 * Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-1
265 - Ship the .so symlinks in the devel package.
267 * Mon Feb 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc4.1
270 * Fri Feb 22 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc3.1
271 - 2.0rc3. No longer need CVS patch.
272 - Build no longer requires xmlto.
274 * Thu Feb 21 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.2
275 - Fix DC240 hangs (patch from CVS).
276 - Rebuild in new environment.
278 * Tue Feb 19 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.rc2.1
279 - 2.0rc2 (bug #59993). No longer need docs patch or man page.
280 - Really fix up libtool libraries (bug #60002).
282 * Fri Feb 15 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.2
283 - PreReq /sbin/ldconfig, grep, and fileutils (bug #59941).
285 * Tue Feb 12 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta5.1
287 - Fix Makefiles so that documentation can be built.
288 - Ship pkgconfig file.
291 * Thu Feb 7 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta4.1
293 - Build requires transfig, and at least version 0.1.5 of libusb.
294 - Clean up file lists.
295 - Build documentation.
297 * Fri Jan 25 2002 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.2
298 - Rebuild in new environment.
299 - Dump docbook-dtd30-sgml requirement; gtk-doc is sufficient.
301 * Sun Nov 18 2001 Tim Waugh <twaugh@redhat.com> 2.0-0.beta3.1
302 - Adapted for Red Hat Linux.
304 * Sat Oct 27 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
305 - fixed update behaviour for hotplug list (do not erase it when updating)
307 * Thu Oct 25 2001 Tim Waugh <twaugh@redhat.com>
308 - hotplug dependency is a prereq not a requires (the package scripts
311 * Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
312 - integrated spec file into source package
314 * Sun Oct 14 2001 Hans Ulrich Niedermann <gp@n-dimensional.de>
317 * Tue Oct 2 2001 Tim Waugh <twaugh@redhat.com> 2.0beta2-0.1
318 - Adapted for Red Hat Linux.
321 * Mon Aug 6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.2mdk
322 - Corrected "Requires:"
324 * Mon Aug 6 2001 Till Kamppeter <till@mandrakesoft.com> 2.0-0.beta1.1mdk
329 ########################################################################