1 | Summary: Library for accessing digital cameras |
---|
2 | Summary(ja): デジタルカメラにアクセスするためのライブラリ |
---|
3 | Name: libgphoto2 |
---|
4 | Version: 2.4.5 |
---|
5 | Release: 1%{?_dist_release} |
---|
6 | # GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2 |
---|
7 | License: GPLv2+ and GPLv2 |
---|
8 | Group: System Environment/Libraries |
---|
9 | Source0: http://downloads.sourceforge.net/gphoto/libgphoto2-%{version}.tar.bz2 |
---|
10 | Patch1: gphoto2-pkgcfg.patch |
---|
11 | Patch2: gphoto2-storage.patch |
---|
12 | Patch3: gphoto2-ixany.patch |
---|
13 | URL: http://www.gphoto.org/ |
---|
14 | |
---|
15 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
---|
16 | BuildRequires: libusb-devel >= 0.1.5 |
---|
17 | BuildRequires: libexif-devel |
---|
18 | BuildRequires: libjpeg-devel |
---|
19 | BuildRequires: pkgconfig, sharutils |
---|
20 | BuildRequires: libtool-ltdl-devel >= 2.2.6a |
---|
21 | BuildRequires: popt-devel |
---|
22 | # we run autoreconf: |
---|
23 | BuildRequires: autoconf, automake, libtool, gettext, cvs |
---|
24 | Obsoletes: gphoto2 < 2.4.0 |
---|
25 | Obsoletes: gphoto2-devel < 2.4.0 |
---|
26 | |
---|
27 | %description |
---|
28 | libgphoto2 is a library that can be used by applications to access |
---|
29 | various digital cameras. libgphoto2 itself is not a GUI application, |
---|
30 | opposed to gphoto. There are GUI frontends for the gphoto2 library, |
---|
31 | however, such as gtkam for example. |
---|
32 | |
---|
33 | %package devel |
---|
34 | Summary: Headers and links to compile against the libgphoto2 library |
---|
35 | Group: Development/Libraries |
---|
36 | Requires: %{name} = %{version}-%{release} |
---|
37 | Requires: pkgconfig, libusb-devel >= 0.1.5, libexif-devel |
---|
38 | Obsoletes: gphoto2 < 2.4.0-11 |
---|
39 | Obsoletes: gphoto2-devel < 2.4.0-11 |
---|
40 | Provides: gphoto2-devel = %{version}-%{release} |
---|
41 | |
---|
42 | %description devel |
---|
43 | libgphoto2 is a library that can be used by applications to access |
---|
44 | various digital cameras. libgphoto2 itself is not a GUI application, |
---|
45 | opposed to gphoto. There are GUI frontends for the gphoto2 library, |
---|
46 | however, such as gtkam for example. |
---|
47 | |
---|
48 | This package contains files needed to compile applications that |
---|
49 | use libgphoto2. |
---|
50 | |
---|
51 | %prep |
---|
52 | %setup -q |
---|
53 | %patch1 -p1 -b .pkgcfg |
---|
54 | %patch2 -p1 -b .storage |
---|
55 | %patch3 -p1 -b .ixany |
---|
56 | #patch6 -p1 -b .libusb-build |
---|
57 | |
---|
58 | # FIXME: These .pc.in files aren't actually being installed? |
---|
59 | cat > gphoto2.pc.in << \EOF |
---|
60 | prefix=@prefix@ |
---|
61 | exec_prefix=@exec_prefix@ |
---|
62 | libdir=@libdir@ |
---|
63 | includedir=@includedir@ |
---|
64 | VERSION=@VERSION@ |
---|
65 | |
---|
66 | Name: gphoto2 |
---|
67 | Description: Library for easy access to digital cameras |
---|
68 | Requires: |
---|
69 | Version: @VERSION@ |
---|
70 | Libs: -L${libdir} -lgphoto2 -lgphoto2_port -lm |
---|
71 | Cflags: -I${includedir} -I${includedir}/gphoto2 |
---|
72 | EOF |
---|
73 | sed 's/Name: gphoto2/Name: gphoto2-port/' < gphoto2.pc.in > gphoto2-port.pc.in |
---|
74 | |
---|
75 | %build |
---|
76 | # Patch6 changes configure.ac, so we run autoreconf. |
---|
77 | # This also installs our patched libtool.m4, avoiding the rpath problem. |
---|
78 | # But fix a typo first: |
---|
79 | sed -i 's/\(AC_SUBST([^,]*\)}/\1/' {m4m,libgphoto2_port/m4}/gp-documentation.m4 |
---|
80 | sed -i 's/\(m4_pattern_\)disallow/\1forbid/g' {m4m,libgphoto2_port/m4}/gp-check-library.m4 |
---|
81 | autoreconf -i --force |
---|
82 | export CFLAGS=$RPM_OPT_FLAGS |
---|
83 | %configure \ |
---|
84 | --with-drivers=all \ |
---|
85 | --with-doc-dir=%{_docdir}/%{name} \ |
---|
86 | --disable-static \ |
---|
87 | --disable-rpath \ |
---|
88 | --without-aalib |
---|
89 | make %{?_smp_mflags} |
---|
90 | |
---|
91 | %install |
---|
92 | rm -rf "${RPM_BUILD_ROOT}" |
---|
93 | |
---|
94 | make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install |
---|
95 | |
---|
96 | pushd packaging/linux-hotplug/ |
---|
97 | install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/ |
---|
98 | export LIBDIR=$RPM_BUILD_ROOT%{_libdir} |
---|
99 | export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version} |
---|
100 | export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir} |
---|
101 | $RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \ |
---|
102 | grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi |
---|
103 | popd |
---|
104 | |
---|
105 | for i in AUTHORS COPYING; do |
---|
106 | mv ${i} ${i}.old |
---|
107 | iconv -f cp1250 -t utf-8 < ${i}.old > ${i} |
---|
108 | touch -r ${i}.old ${i} || : |
---|
109 | rm -f ${i}.old |
---|
110 | done |
---|
111 | |
---|
112 | rm -rf %{buildroot}%{_libdir}/libgphoto2/*/*a |
---|
113 | rm -rf %{buildroot}%{_libdir}/libgphoto2_port/*/*a |
---|
114 | rm -rf %{buildroot}%{_libdir}/*.a |
---|
115 | rm -rf %{buildroot}%{_libdir}/*.la |
---|
116 | |
---|
117 | %find_lang %{name}-2 |
---|
118 | %find_lang %{name}_port-0 |
---|
119 | cat libgphoto2*.lang >> %{name}.lang |
---|
120 | |
---|
121 | %clean |
---|
122 | rm -rf "${RPM_BUILD_ROOT}" |
---|
123 | |
---|
124 | %files -f %{name}.lang |
---|
125 | %defattr(-,root,root) |
---|
126 | %doc AUTHORS COPYING README NEWS |
---|
127 | %dir %{_libdir}/libgphoto2_port |
---|
128 | %dir %{_libdir}/libgphoto2_port/* |
---|
129 | %dir %{_libdir}/libgphoto2 |
---|
130 | %dir %{_libdir}/libgphoto2/* |
---|
131 | %{_libdir}/libgphoto2_port/*/*.so |
---|
132 | %{_libdir}/libgphoto2/*/*.so |
---|
133 | %{_libdir}/*.so.* |
---|
134 | %{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi |
---|
135 | %{_libdir}/udev/check-ptp-camera |
---|
136 | %{_libdir}/udev/check-mtp-device |
---|
137 | |
---|
138 | %post -p /sbin/ldconfig |
---|
139 | |
---|
140 | %postun -p /sbin/ldconfig |
---|
141 | |
---|
142 | %files devel |
---|
143 | %defattr(-,root,root) |
---|
144 | %doc %{_docdir}/%{name} |
---|
145 | %{_datadir}/libgphoto2 |
---|
146 | %{_bindir}/gphoto2-config* |
---|
147 | %{_bindir}/gphoto2-port-config |
---|
148 | %{_includedir}/gphoto2 |
---|
149 | %{_libdir}/*.so |
---|
150 | %{_libdir}/pkgconfig/* |
---|
151 | %{_mandir}/man3/* |
---|
152 | |
---|
153 | %changelog |
---|
154 | * Wed Apr 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.5-1 |
---|
155 | - new upstream release |
---|
156 | - build with libtool-2.2.6a |
---|
157 | |
---|
158 | * Sat Mar 7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1 |
---|
159 | - new upstream release |
---|
160 | - dropped Patch6 |
---|
161 | - changed Group to System Environment/Libraries |
---|
162 | - added BuildRequires: popt-devel instead of popt |
---|
163 | - added BuildRequires: cvs |
---|
164 | |
---|
165 | * Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-1 |
---|
166 | - initial build for Vine Linux |
---|
167 | |
---|
168 | * Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5 |
---|
169 | - fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build) |
---|
170 | |
---|
171 | * Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3 |
---|
172 | - libgphoto2-devel requires libusb-devel and libexif-devel for |
---|
173 | pkgconfig |
---|
174 | |
---|
175 | * Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2 |
---|
176 | - fix obsoletes |
---|
177 | - workaround problem with coreutils-6.12 and RHEL5-xen kernels |
---|
178 | what prevents libgphoto2 koji build |
---|
179 | |
---|
180 | * Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1 |
---|
181 | - update to 2.4.1 (#443515, #436138) |
---|
182 | |
---|
183 | * Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3 |
---|
184 | - drop gphoto2-norpath.patch |
---|
185 | - use quoted here-document in %%prep |
---|
186 | - fix some typos in m4 sources |
---|
187 | - run autoreconf to get autotools right |
---|
188 | |
---|
189 | * Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2 |
---|
190 | - apply patch to fix build with libusb |
---|
191 | |
---|
192 | * Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1 |
---|
193 | - backport patch from upstream to avoid segfault when |
---|
194 | data phase is skipped for certain devices (#435413) |
---|
195 | - initial build |
---|
196 | |
---|
197 | * Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2 |
---|
198 | - review fixes, thanks to Hans de Goede: (#437285) |
---|
199 | - remove unused macro |
---|
200 | - don't exclude s390/s390x |
---|
201 | - preserve timestamps |
---|
202 | - fix license |
---|
203 | |
---|
204 | * Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1 |
---|
205 | - initial libgphoto2 packaging |
---|