source: projects/specs/tags/6_0_REL/lib/libg/libgphoto2/libgphoto2-vl.spec @ 4101

Revision 4101, 6.9 KB checked in by daisuke, 13 years ago (diff)

add BR: dbus-devel, gd-devel, add --disable-hal

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