forked from pool/libgphoto2
Accepting request 530540 from home:jengelh:branches:graphics
- Avoid running fdupes across partitions. Replace old tar options, old RPM shell variables by new constructs. Rectify RPM groups. Make macro style consistent again. OBS-URL: https://build.opensuse.org/request/show/530540 OBS-URL: https://build.opensuse.org/package/show/graphics/libgphoto2?expand=0&rev=179
This commit is contained in:
parent
c061ee4d1b
commit
2849a0c526
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Oct 2 18:07:03 UTC 2017 - jengelh@inai.de
|
||||||
|
|
||||||
|
- Avoid running fdupes across partitions. Replace old tar
|
||||||
|
options, old RPM shell variables by new constructs.
|
||||||
|
Rectify RPM groups. Make macro style consistent again.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Oct 2 16:38:09 UTC 2017 - meissner@suse.com
|
Mon Oct 2 16:38:09 UTC 2017 - meissner@suse.com
|
||||||
|
|
||||||
|
119
libgphoto2.spec
119
libgphoto2.spec
@ -45,40 +45,41 @@ Url: http://gphoto.org/
|
|||||||
Obsoletes: libgphoto2-64bit
|
Obsoletes: libgphoto2-64bit
|
||||||
%endif
|
%endif
|
||||||
#
|
#
|
||||||
%define prefix /usr
|
|
||||||
Summary: A Digital Camera Library
|
Summary: A Digital Camera Library
|
||||||
License: LGPL-2.1+
|
License: LGPL-2.1+
|
||||||
Group: Hardware/Camera
|
Group: Hardware/Camera
|
||||||
Version: 2.5.15
|
Version: 2.5.15
|
||||||
Release: 0
|
Release: 0
|
||||||
Source0: https://downloads.sourceforge.net/project/gphoto/libgphoto/%{version}/%{name}-%{version}.tar.bz2
|
Source0: https://downloads.sourceforge.net/project/gphoto/libgphoto/%version/%name-%version.tar.bz2
|
||||||
Source1: https://downloads.sourceforge.net/project/gphoto/libgphoto/%{version}//%{name}-%{version}.tar.bz2.asc
|
Source1: https://downloads.sourceforge.net/project/gphoto/libgphoto/%version/%name-%version.tar.bz2.asc
|
||||||
Source2: %name.keyring
|
Source2: %name.keyring
|
||||||
Source3: baselibs.conf
|
Source3: baselibs.conf
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
Recommends: %{name}-%{major}-lang = %{version}
|
Recommends: %name-%major-lang = %version
|
||||||
|
|
||||||
%package -n libgphoto2-%{major}
|
%package -n libgphoto2-%major
|
||||||
Summary: A Digital Camera Library
|
Summary: A Digital Camera Library
|
||||||
Group: Hardware/Camera
|
Group: System/Libraries
|
||||||
Recommends: %{name}-%{major}-lang = %{version}
|
Recommends: %name-%major-lang = %version
|
||||||
|
Requires(pre): /sbin/ldconfig
|
||||||
|
Requires(post): /sbin/ldconfig
|
||||||
Requires(post): udev
|
Requires(post): udev
|
||||||
Requires(postun): udev
|
Requires(postun): udev
|
||||||
|
|
||||||
%package doc
|
%package doc
|
||||||
Summary: A Digital Camera Library - documentation
|
Summary: Documentation for libgphoto2
|
||||||
Group: Documentation/Other
|
Group: Documentation/Other
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development headers for libgphoto2
|
Summary: Development headers for libgphoto2
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: libexif-devel
|
Requires: libexif-devel
|
||||||
Requires: libgphoto2-%{major} = %version
|
Requires: libgphoto2-%major = %version
|
||||||
Requires: libusb-1_0-devel
|
Requires: libusb-1_0-devel
|
||||||
|
|
||||||
%package devel-doc
|
%package devel-doc
|
||||||
Summary: Development documentation for libgphoto2
|
Summary: Development documentation for libgphoto2
|
||||||
Group: Documentation/Other
|
Group: Documentation/HTML
|
||||||
Recommends: libgphoto2-devel
|
Recommends: libgphoto2-devel
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -95,7 +96,7 @@ or by running
|
|||||||
|
|
||||||
gphoto2 --list-cameras
|
gphoto2 --list-cameras
|
||||||
|
|
||||||
%description -n libgphoto2-%{major}
|
%description -n libgphoto2-%major
|
||||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||||
and capturing images from a range of supported digital cameras to your
|
and capturing images from a range of supported digital cameras to your
|
||||||
local hard drive. It does not support digital cameras based on the USB
|
local hard drive. It does not support digital cameras based on the USB
|
||||||
@ -114,7 +115,7 @@ gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
|||||||
and capturing images from a range of supported digital cameras to your
|
and capturing images from a range of supported digital cameras to your
|
||||||
local hard drive.
|
local hard drive.
|
||||||
|
|
||||||
This is the user documentation
|
This is the user documentation.
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
gPhoto (GNU Photo) is a set of libraries for previewing, retrieving,
|
||||||
@ -130,17 +131,17 @@ local hard drive.
|
|||||||
|
|
||||||
This is its API documentation in HTML format.
|
This is its API documentation in HTML format.
|
||||||
|
|
||||||
%lang_package -n libgphoto2-%{major}
|
%lang_package -n libgphoto2-%major
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
(cd doc; tar xaf libgphoto2-api.html.tar.gz)
|
(cd doc && tar -xaf libgphoto2-api.html.tar.gz)
|
||||||
|
|
||||||
%build
|
%build
|
||||||
#AUTOPOINT=true autoreconf -fi
|
#AUTOPOINT=true autoreconf -fi
|
||||||
PATH="/usr/X11R6/bin:$PATH" \
|
PATH="/usr/X11R6/bin:$PATH" \
|
||||||
%configure \
|
%configure \
|
||||||
--with-doc-dir=%{_defaultdocdir}/%{name} \
|
--with-doc-dir=%_defaultdocdir/%name \
|
||||||
--without-hal \
|
--without-hal \
|
||||||
--with-drivers=all
|
--with-drivers=all
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
@ -150,83 +151,83 @@ make check
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
# skip-check-libtool-deps
|
# skip-check-libtool-deps
|
||||||
export LIBRARY_PATH=$RPM_BUILD_ROOT%{_libdir}
|
export LIBRARY_PATH="%buildroot/%_libdir"
|
||||||
%makeinstall
|
%make_install
|
||||||
|
|
||||||
# .la files are not needed
|
# .la files are not needed
|
||||||
rm $RPM_BUILD_ROOT/%_libdir/*.la
|
rm %buildroot/%_libdir/*.la
|
||||||
rm $RPM_BUILD_ROOT/%_libdir/libgphoto2/%version/*.la
|
rm %buildroot/%_libdir/libgphoto2/%version/*.la
|
||||||
rm $RPM_BUILD_ROOT/%_libdir/libgphoto2_port/0.12.0/*.la
|
rm %buildroot/%_libdir/libgphoto2_port/0.12.0/*.la
|
||||||
|
|
||||||
rm $RPM_BUILD_ROOT/%_defaultdocdir/%{name}/README.packaging
|
rm %buildroot/%_defaultdocdir/%name/README.packaging
|
||||||
rm -R $RPM_BUILD_ROOT/%_defaultdocdir/%{name}/linux-hotplug
|
rm -R %buildroot/%_defaultdocdir/%name/linux-hotplug
|
||||||
|
|
||||||
%{find_lang} libgphoto2-%{major}
|
%find_lang libgphoto2-%major
|
||||||
%{find_lang} libgphoto2_port-12
|
%find_lang libgphoto2_port-12
|
||||||
cat libgphoto2-%{major}.lang libgphoto2_port-12.lang > libgphoto2-all.lang
|
cat libgphoto2-%major.lang libgphoto2_port-12.lang >libgphoto2-all.lang
|
||||||
pushd packaging/generic
|
pushd packaging/generic
|
||||||
export CAMLIBS=$RPM_BUILD_ROOT/%_libdir/libgphoto2/%version/
|
export CAMLIBS="%buildroot/%_libdir/libgphoto2/%version/"
|
||||||
# new style UDEV rules (gudev) which will obsolete HAL fdi files
|
# new style UDEV rules (gudev) which will obsolete HAL fdi files
|
||||||
if [ ! -d %{_udevrulesdir} ] ; then
|
if [ ! -d "%_udevrulesdir" ] ; then
|
||||||
echo "*** The udev rules file location has changed. Fix the build."
|
echo "*** The udev rules file location has changed. Fix the build."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
%if 0%{?suse_version} > 1230
|
%if 0%{?suse_version} > 1230
|
||||||
install -m 0755 -d $RPM_BUILD_ROOT/%{_udevhwdbdir}
|
install -m 0755 -d %buildroot/%_udevhwdbdir
|
||||||
./print-camera-list hwdb > $RPM_BUILD_ROOT/%{_udevhwdbdir}/20-gphoto.hwdb
|
./print-camera-list hwdb >%buildroot/%_udevhwdbdir/20-gphoto.hwdb
|
||||||
# We still need UDEV rules for /dev/sg* and /dev/sd* for picture frames.
|
# We still need UDEV rules for /dev/sg* and /dev/sd* for picture frames.
|
||||||
# We also need it for PTP cameras that we do not know to appear in GVFS.
|
# We also need it for PTP cameras that we do not know to appear in GVFS.
|
||||||
install -m 0755 -d $RPM_BUILD_ROOT%{_udevrulesdir}
|
install -m 0755 -d %buildroot/%_udevrulesdir
|
||||||
./print-camera-list udev-rules version 201 > $RPM_BUILD_ROOT%{_udevrulesdir}/40-libgphoto2.rules
|
./print-camera-list udev-rules version 201 >%buildroot/%_udevrulesdir/40-libgphoto2.rules
|
||||||
%else
|
%else
|
||||||
install -m 0755 -d $RPM_BUILD_ROOT%{_udevrulesdir}
|
install -m 0755 -d %buildroot/%_udevrulesdir
|
||||||
./print-camera-list udev-rules version 175 > $RPM_BUILD_ROOT%{_udevrulesdir}/40-libgphoto2.rules
|
./print-camera-list udev-rules version 175 >%buildroot/%_udevrulesdir/40-libgphoto2.rules
|
||||||
%endif
|
%endif
|
||||||
popd
|
popd
|
||||||
# udev helpers not used here.
|
# udev helpers not used here.
|
||||||
rm $RPM_BUILD_ROOT/usr/%_lib/udev/check-ptp-camera
|
rm %buildroot/usr/%_lib/udev/check-ptp-camera
|
||||||
mv doc/libgphoto2-api.html apidocs
|
mv doc/libgphoto2-api.html apidocs
|
||||||
mv doc/README.apidocs .
|
mv doc/README.apidocs .
|
||||||
find apidocs -type f -name "*.md5" -delete
|
find apidocs -type f -name "*.md5" -delete
|
||||||
fn=$RPM_BUILD_ROOT/%{_libdir}/pkgconfig/libgphoto2_port.pc
|
fn="%buildroot/%_libdir/pkgconfig/libgphoto2_port.pc"
|
||||||
grep -v driverdir= $fn > $fn.new
|
grep -v driverdir= $fn > $fn.new
|
||||||
mv $fn.new $fn
|
mv $fn.new $fn
|
||||||
|
|
||||||
find "%buildroot/%_libdir" -type f -name "*.la" -delete
|
find "%buildroot/%_libdir" -type f -name "*.la" -delete
|
||||||
%fdupes $RPM_BUILD_ROOT
|
%fdupes %buildroot/%_prefix
|
||||||
|
|
||||||
%files -n libgphoto2-%{major}
|
%files -n libgphoto2-%major
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{_libdir}/libgphoto2
|
%_libdir/libgphoto2
|
||||||
%{_libdir}/libgphoto2_port
|
%_libdir/libgphoto2_port
|
||||||
# support files for konica camlib
|
# support files for konica camlib
|
||||||
%{prefix}/share/%{name}
|
%_datadir/%name
|
||||||
%{_libdir}/libgphoto2.so.*
|
%_libdir/libgphoto2.so.*
|
||||||
%{_libdir}/libgphoto2_port.so.*
|
%_libdir/libgphoto2_port.so.*
|
||||||
%if 0%{?suse_version} > 1230
|
%if 0%{?suse_version} > 1230
|
||||||
%{_udevhwdbdir}/20-gphoto.hwdb
|
%_udevhwdbdir/20-gphoto.hwdb
|
||||||
%endif
|
%endif
|
||||||
%{_udevrulesdir}/40-libgphoto2.rules
|
%_udevrulesdir/40-libgphoto2.rules
|
||||||
%{_datadir}/libgphoto2_port
|
%_datadir/libgphoto2_port
|
||||||
|
|
||||||
%files -n libgphoto2-doc
|
%files -n libgphoto2-doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%dir %{_defaultdocdir}/%{name}
|
%dir %_defaultdocdir/%name
|
||||||
%{_defaultdocdir}/%{name}/*
|
%_defaultdocdir/%name/*
|
||||||
%{_mandir}/man3/libgphoto2.3*
|
%_mandir/man3/libgphoto2.3*
|
||||||
%{_mandir}/man3/libgphoto2_port.3*
|
%_mandir/man3/libgphoto2_port.3*
|
||||||
|
|
||||||
%files -n libgphoto2-%{major}-lang -f libgphoto2-all.lang
|
%files -n libgphoto2-%major-lang -f libgphoto2-all.lang
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
%{prefix}/include/gphoto2
|
%_includedir/gphoto2
|
||||||
%{prefix}/bin/gphoto2-config
|
%_bindir/gphoto2-config
|
||||||
%{prefix}/bin/gphoto2-port-config
|
%_bindir/gphoto2-port-config
|
||||||
%{_libdir}/libgphoto2.so
|
%_libdir/libgphoto2.so
|
||||||
%{_libdir}/libgphoto2_port.so
|
%_libdir/libgphoto2_port.so
|
||||||
%{_libdir}/pkgconfig/libgphoto2.pc
|
%_libdir/pkgconfig/libgphoto2.pc
|
||||||
%{_libdir}/pkgconfig/libgphoto2_port.pc
|
%_libdir/pkgconfig/libgphoto2_port.pc
|
||||||
|
|
||||||
%files devel-doc
|
%files devel-doc
|
||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
@ -237,7 +238,7 @@ find "%buildroot/%_libdir" -type f -name "*.la" -delete
|
|||||||
%if 0%{?suse_version} > 1230
|
%if 0%{?suse_version} > 1230
|
||||||
%udev_hwdb_update
|
%udev_hwdb_update
|
||||||
%endif
|
%endif
|
||||||
udevadm control --reload 2>&1 > /dev/null || :
|
udevadm control --reload >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%postun -n %name-%major
|
%postun -n %name-%major
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
@ -249,6 +250,4 @@ if [ $1 -eq 0 ]; then
|
|||||||
udevadm control --reload 2>&1 > /dev/null || :
|
udevadm control --reload 2>&1 > /dev/null || :
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%{nil}
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
Reference in New Issue
Block a user