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

Revision 3735, 6.4 KB checked in by Takemikaduchi, 13 years ago (diff)

clutter,gthumb,babl,gegl:new upstream release, others: rebuild

Line 
1Summary: Library for accessing digital cameras
2Summary(ja): デジタルカメラにアクセスするためのライブラリ
3Name: libgphoto2
4Version: 2.4.5
5Release: 2%{?_dist_release}
6# GPLV2+ for the main lib (due to exif.c) and most plugins, some plugins GPLv2
7License: GPLv2+ and GPLv2
8Group: System Environment/Libraries
9Source0: http://downloads.sourceforge.net/gphoto/libgphoto2-%{version}.tar.bz2
10Patch1: gphoto2-pkgcfg.patch
11Patch2: gphoto2-storage.patch
12Patch3: gphoto2-ixany.patch
13URL: http://www.gphoto.org/
14
15BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
16BuildRequires: libusb-devel >= 0.1.5
17BuildRequires: libexif-devel
18BuildRequires: libjpeg-devel
19BuildRequires: pkgconfig, sharutils
20BuildRequires: libtool-ltdl-devel >= 2.2.6a
21BuildRequires: popt-devel
22# we run autoreconf:
23BuildRequires: autoconf, automake, libtool, gettext, cvs
24Obsoletes: gphoto2 < 2.4.0
25Obsoletes: gphoto2-devel < 2.4.0
26
27%description
28libgphoto2 is a library that can be used by applications to access
29various digital cameras. libgphoto2 itself is not a GUI application,
30opposed to gphoto. There are GUI frontends for the gphoto2 library,
31however, such as gtkam for example.
32
33%package devel
34Summary: Headers and links to compile against the libgphoto2 library
35Group: Development/Libraries
36Requires: %{name} = %{version}-%{release}
37Requires: pkgconfig, libusb-devel >= 0.1.5, libexif-devel
38Obsoletes: gphoto2 < 2.4.0-11
39Obsoletes: gphoto2-devel < 2.4.0-11
40Provides: gphoto2-devel = %{version}-%{release}
41
42%description devel
43libgphoto2 is a library that can be used by applications to access
44various digital cameras. libgphoto2 itself is not a GUI application,
45opposed to gphoto. There are GUI frontends for the gphoto2 library,
46however, such as gtkam for example.
47
48This package contains files needed to compile applications that
49use 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?
59cat > gphoto2.pc.in << \EOF
60prefix=@prefix@
61exec_prefix=@exec_prefix@
62libdir=@libdir@
63includedir=@includedir@
64VERSION=@VERSION@
65
66Name: gphoto2
67Description: Library for easy access to digital cameras
68Requires:
69Version: @VERSION@
70Libs: -L${libdir} -lgphoto2 -lgphoto2_port -lm
71Cflags: -I${includedir} -I${includedir}/gphoto2
72EOF
73sed '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:
79sed -i 's/\(AC_SUBST([^,]*\)}/\1/' {m4m,libgphoto2_port/m4}/gp-documentation.m4
80sed -i 's/\(m4_pattern_\)disallow/\1forbid/g' {m4m,libgphoto2_port/m4}/gp-check-library.m4
81autoreconf -i --force
82export 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
89make %{?_smp_mflags}
90
91%install
92rm -rf "${RPM_BUILD_ROOT}"
93
94make mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT install
95
96pushd packaging/linux-hotplug/
97install -d -m755 %{buildroot}/usr/share/hal/fdi/information/20thirdparty/
98export LIBDIR=$RPM_BUILD_ROOT%{_libdir}
99export CAMLIBS=$RPM_BUILD_ROOT%{_libdir}/%{name}/%{version}
100export LD_LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
101$RPM_BUILD_ROOT%{_libdir}/%{name}/print-camera-list hal-fdi | \
102grep -v "<!-- This file was generated" > $RPM_BUILD_ROOT/%{_datadir}/hal/fdi/information/20thirdparty/10-camera-libgphoto2.fdi
103popd
104
105for 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
110done
111
112rm -rf %{buildroot}%{_libdir}/libgphoto2/*/*a
113rm -rf %{buildroot}%{_libdir}/libgphoto2_port/*/*a
114rm -rf %{buildroot}%{_libdir}/*.a
115rm -rf %{buildroot}%{_libdir}/*.la
116
117%find_lang %{name}-2
118%find_lang %{name}_port-0
119cat libgphoto2*.lang >> %{name}.lang
120
121%clean
122rm -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
154%changelog
155* Thu Sep 23 2010 Yoji TOYODA <bsyamato@sea.plala.or.jp> 2.4.5-2
156- rebuild with rpm-4.8.1 for pkg-config file
157
158* Wed Apr 15 2009 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.5-1
159- new upstream release
160- build with libtool-2.2.6a
161
162* Sat Mar  7 2009 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 2.4.4-1
163- new upstream release
164- dropped Patch6
165- changed Group to System Environment/Libraries
166- added BuildRequires: popt-devel instead of popt
167- added BuildRequires: cvs
168
169* Thu Jul 03 2008 Daisuke SUZUKI <daisuke@linux.or.jp> 2.4.1-1
170- initial build for Vine Linux
171
172* Fri Jun 20 2008 Kevin Kofler <Kevin@tigcc.ticalc.org> 2.4.1-5
173- fix pkgcfg patch to match actual .pc file names (fixes kdegraphics build)
174
175* Thu Jun 12 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-3
176- libgphoto2-devel requires libusb-devel and libexif-devel for
177  pkgconfig
178
179* Wed Jun 04 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-2
180- fix obsoletes
181- workaround problem with coreutils-6.12 and RHEL5-xen kernels
182  what prevents libgphoto2 koji build
183
184* Mon Jun 02 2008 Jindrich Novy <jnovy@redhat.com> 2.4.1-1
185- update to 2.4.1 (#443515, #436138)
186
187* Thu May 29 2008 Stepan Kasal <skasal@redhat.com> 2.4.0-3
188- drop gphoto2-norpath.patch
189- use quoted here-document in %%prep
190- fix some typos in m4 sources
191- run autoreconf to get autotools right
192
193* Mon Apr 21 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-2
194- apply patch to fix build with libusb
195
196* Fri Apr 18 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-1
197- backport patch from upstream to avoid segfault when
198  data phase is skipped for certain devices (#435413)
199- initial build
200
201* Mon Apr 14 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.2
202- review fixes, thanks to Hans de Goede: (#437285)
203  - remove unused macro
204  - don't exclude s390/s390x
205  - preserve timestamps
206  - fix license
207
208* Thu Mar 13 2008 Jindrich Novy <jnovy@redhat.com> 2.4.0-0.1
209- initial libgphoto2 packaging
Note: See TracBrowser for help on using the repository browser.