libgphoto2/libgphoto2.spec

122 lines
3.5 KiB
RPMSpec
Raw Normal View History

2019-12-14 18:56:45 +08:00
Name: libgphoto2
Summary: library for giving access to literally hundreds of digital cameras
2023-09-28 10:25:57 +08:00
Version: 2.5.31
Release: 1
2021-01-21 15:54:07 +08:00
License: GPL-2.0+ and LGPL-2.1+
2019-12-14 18:56:45 +08:00
URL: http://www.gphoto.org/
Source0: http://downloads.sourceforge.net/gphoto/%{name}-%{version}.tar.bz2
Patch1: gphoto2-pkgcfg.patch
Patch2: gphoto2-device-return.patch
2023-09-28 10:25:57 +08:00
BuildRequires: gcc gcc-c++ make systemd libtool-ltdl-devel libjpeg-devel gd-devel libcurl-devel
2019-12-14 18:56:45 +08:00
BuildRequires: pkgconfig(libxml-2.0) pkgconfig(libexif) lockdev-devel pkgconfig(libusb-1.0)
Requires: lockdev
%description
%{name} is the core of gphoto2 software. It is a portable library
which gives access to literally hundreds of digital cameras.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Provides: gphoto2-devel = %{version}-%{release}
Obsoletes: gphoto2-devel < 2.4.0-11
%description devel
%{name} Library Header Files and Link Libraries
%package_help
%prep
%autosetup -p1
for f in AUTHORS ChangeLog COPYING %{name}_port/AUTHORS %{name}_port/COPYING.LIB `find -name 'README.*'`; do
iconv -f ISO-8859-1 -t UTF-8 $f > $f.conv
mv -f $f.conv $f
done
%build
%configure \
udevscriptdir='%(pkg-config --variable=udevdir udev)' \
--with-drivers=all \
--with-doc-dir=%{_pkgdocdir} \
--disable-rpath \
--disable-static \
%{nil}
%disable_rpath %{name}_port/libtool
make %{?_smp_mflags}
%install
%make_install INSTALL="install -p" mandir=%{_mandir}
2023-09-28 10:25:57 +08:00
pushd packaging/generic/
2019-12-14 18:56:45 +08:00
export LIBDIR=${RPM_BUILD_ROOT}%{_libdir}
export CAMLIBS=${RPM_BUILD_ROOT}%{_libdir}/%{name}/%{version}
export LD_LIBRARY_PATH=${RPM_BUILD_ROOT}%{_libdir}
install -d ${RPM_BUILD_ROOT}%{_udevrulesdir}
2023-09-28 10:25:57 +08:00
%{buildroot}%{_libdir}/%{name}/print-camera-list udev-rules version 201 > %{buildroot}%{_udevrulesdir}/40-%{name}.rules
install -d %{buildroot}%{_udevhwdbdir}
%{buildroot}%{_libdir}/%{name}/print-camera-list hwdb version 201 > %{buildroot}%{_udevhwdbdir}/20-gphoto2.hwdb
2019-12-14 18:56:45 +08:00
popd
find ${RPM_BUILD_ROOT} -type f -name "*.la" -print -delete
%find_lang %{name}-6
%find_lang %{name}_port-12
cat %{name}*.lang >> %{name}.lang
mkdir __doc
2023-09-28 10:25:57 +08:00
rm -rf %{buildroot}%{_pkgdocdir}_port/{AUTHORS,NEWS,README}
2019-12-14 18:56:45 +08:00
cp -a ${RPM_BUILD_ROOT}%{_pkgdocdir}/* __doc
%files -f %{name}.lang
%license COPYING
%dir %{_libdir}/%{name}/
%dir %{_libdir}/%{name}/%{version}/
%dir %{_libdir}/%{name}_port/
2023-09-28 10:25:57 +08:00
%dir %{_libdir}/%{name}_port/0.12.2/
2019-12-14 18:56:45 +08:00
%{_libdir}/%{name}.so.*
%{_libdir}/%{name}_port.so.*
%{_libdir}/%{name}/%{version}/*.so
2023-09-28 10:25:57 +08:00
%{_libdir}/%{name}_port/0.12.2/*.so
2019-12-14 18:56:45 +08:00
%{_udevrulesdir}/40-%{name}.rules
2023-09-28 10:25:57 +08:00
%{_udevhwdbdir}/20-gphoto2.hwdb
2019-12-14 18:56:45 +08:00
%(pkg-config --variable=udevdir udev)/check-ptp-camera
%{_datadir}/%{name}/
%exclude %{_includedir}/gphoto2/gphoto2
%exclude %{_libdir}/%{name}/print-camera-list
%exclude %{_pkgdocdir}
%exclude %{_datadir}/%{name}_port/*/vcamera/
%files devel
%{_bindir}/gphoto2-config
%{_bindir}/gphoto2-port-config
%{_libdir}/%{name}.so
%{_libdir}/%{name}_port.so
%{_libdir}/pkgconfig/%{name}.pc
%{_libdir}/pkgconfig/%{name}_port.pc
%{_includedir}/gphoto2/
%files help
%{_mandir}/man3/%{name}.3*
%{_mandir}/man3/%{name}_port.3*
%doc AUTHORS README.md NEWS
%doc __doc/*
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%changelog
2023-09-28 10:25:57 +08:00
* Thu Sep 28 2023 liyanan <thistleslyn@163.com> - 2.5.31-1
- Update to 2.5.31
2021-01-21 15:54:07 +08:00
* Thu Jan 21 2021 Ge Wang<wangge20@huawei.com> - 2.5.18-4
- Modify license information
2019-12-14 18:56:45 +08:00
* Wed Nov 20 2019 caomeng<caomeng5@huawei.com> - 2.5.18-3
- Package init