source: projects/specs/trunk/lib/libg/libgphoto2/libgphoto2-vl.spec @ 4100

Revision 4100, 6.7 KB checked in by daisuke, 13 years ago (diff)

libgphoto2: update to 2.4.11, add udev rules, move udev script to correct place.

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