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

Revision 12005, 7.9 KB checked in by tomop, 5 years ago (diff)

Merge branch 'tomop'

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