forked from pool/opencv
Accepting request 185439 from KDE:Distro:Factory
Forward OBS-URL: https://build.opensuse.org/request/show/185439 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=44
This commit is contained in:
parent
dc5873b4ca
commit
6ca799f387
@ -1,3 +1,10 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Jul 14 16:54:56 UTC 2013 - asterios.dramis@gmail.com
|
||||||
|
|
||||||
|
- Use eigen3 instead of eigen2 as build requirement for openSUSE > 12.3.
|
||||||
|
- Enable compilation with libucil and libunicap.
|
||||||
|
- Removed dos2unix build requirement (not needed anymore).
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 12 11:22:31 EEST 2013 - koprok@nand.bg
|
Fri Jul 12 11:22:31 EEST 2013 - koprok@nand.bg
|
||||||
|
|
||||||
|
97
opencv.spec
97
opencv.spec
@ -18,44 +18,53 @@
|
|||||||
|
|
||||||
%bcond_with ffmpeg
|
%bcond_with ffmpeg
|
||||||
|
|
||||||
Name: opencv
|
|
||||||
%define libname lib%{name}
|
%define libname lib%{name}
|
||||||
%define soname 2_4
|
%define soname 2_4
|
||||||
|
|
||||||
|
Name: opencv
|
||||||
Version: 2.4.6.1
|
Version: 2.4.6.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Collection of algorithms for computer vision
|
Summary: Collection of algorithms for computer vision
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Url: http://%{name}.willowgarage.com/wiki/
|
Url: http://opencv.org/
|
||||||
Source0: http://downloads.sourceforge.net/project/%{name}library/%{name}-unix/%{version}/%{name}-%{version}.tar.gz
|
Source0: http://downloads.sourceforge.net/project/%{name}library/%{name}-unix/%{version}/%{name}-%{version}.tar.gz
|
||||||
# PATCH-FIX-UPSTREAM opencv-samples.patch koprok@nand.bg -- Improve samples installation.
|
# PATCH-FIX-UPSTREAM opencv-samples.patch koprok@nand.bg -- Improve samples installation.
|
||||||
Patch1: %{name}-samples.patch
|
Patch1: %{name}-samples.patch
|
||||||
# PATCH-FIX-UPSTREAM opencv-underlinking.patch koprok@nand.bg -- Make libopencv_highgui.so link to libv4l2 since it's using symbols defined there.
|
# PATCH-FIX-UPSTREAM opencv-underlinking.patch koprok@nand.bg -- Make libopencv_highgui.so link to libv4l2 since it's using symbols defined there.
|
||||||
Patch2: %{name}-underlinking.patch
|
Patch2: %{name}-underlinking.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
||||||
BuildRequires: OpenEXR-devel
|
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: dos2unix
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: gstreamer-0_10-plugins-base-devel
|
BuildRequires: gstreamer-0_10-plugins-base-devel
|
||||||
BuildRequires: libdc1394-devel
|
BuildRequires: libdc1394-devel
|
||||||
|
%if 0%{?suse_version} > 1230
|
||||||
|
BuildRequires: libeigen3-devel
|
||||||
|
%else
|
||||||
BuildRequires: libeigen2-devel
|
BuildRequires: libeigen2-devel
|
||||||
BuildRequires: libjasper-devel
|
%endif
|
||||||
BuildRequires: libqt4-devel
|
|
||||||
#BuildRequires: libucil-devel
|
|
||||||
#BuildRequires: libunicap-devel
|
|
||||||
BuildRequires: libilmbase-devel
|
|
||||||
BuildRequires: libjpeg-devel
|
|
||||||
BuildRequires: libtiff-devel
|
|
||||||
BuildRequires: python-devel
|
|
||||||
BuildRequires: python-numpy-devel
|
|
||||||
BuildRequires: zlib-devel
|
|
||||||
BuildRequires: pkgconfig(glu)
|
|
||||||
%if %{with ffmpeg}
|
%if %{with ffmpeg}
|
||||||
BuildRequires: libffmpeg-devel
|
BuildRequires: libffmpeg-devel
|
||||||
%endif
|
%endif
|
||||||
|
BuildRequires: libjasper-devel
|
||||||
|
BuildRequires: libjpeg-devel
|
||||||
|
BuildRequires: libqt4-devel
|
||||||
|
BuildRequires: libtiff-devel
|
||||||
|
BuildRequires: libucil-devel
|
||||||
|
BuildRequires: libunicap-devel
|
||||||
BuildRequires: libv4l-devel
|
BuildRequires: libv4l-devel
|
||||||
|
%if 0%{?suse_version} > 1220
|
||||||
|
BuildRequires: ilmbase-devel
|
||||||
|
BuildRequires: openexr-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: OpenEXR-devel
|
||||||
|
BuildRequires: libilmbase-devel
|
||||||
|
%endif
|
||||||
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: python-numpy-devel
|
||||||
BuildRequires: python-sphinx
|
BuildRequires: python-sphinx
|
||||||
|
BuildRequires: zlib-devel
|
||||||
|
BuildRequires: pkgconfig(glu)
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
%description
|
%description
|
||||||
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C
|
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C
|
||||||
@ -91,14 +100,14 @@ Requires: python-base = %{py_ver}
|
|||||||
%description -n python-%{name}
|
%description -n python-%{name}
|
||||||
This package contains Python bindings for the OpenCV library.
|
This package contains Python bindings for the OpenCV library.
|
||||||
|
|
||||||
%package -n %{name}-doc
|
%package doc
|
||||||
Summary: Documentation and examples for OpenCV
|
Summary: Documentation and examples for OpenCV
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Recommends: python
|
Recommends: python
|
||||||
# Since this package also contains examples that need -devel to be compiled
|
# Since this package also contains examples that need -devel to be compiled
|
||||||
Recommends: %{name}-devel
|
Recommends: %{name}-devel
|
||||||
|
|
||||||
%description -n %{name}-doc
|
%description doc
|
||||||
This package contains the documentation and examples for the OpenCV library.
|
This package contains the documentation and examples for the OpenCV library.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
@ -106,13 +115,10 @@ This package contains the documentation and examples for the OpenCV library.
|
|||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
|
|
||||||
# Windows specific and with wrong end of line
|
# Remove Windows specific files
|
||||||
rm -f doc/packaging.txt
|
rm -f doc/packaging.txt
|
||||||
chmod +x samples/c/build_all.sh
|
# Fix "wrong-file-end-of-line-encoding" rpmlint warning
|
||||||
sed -i 's/\r$//' samples/c/adaptiveskindetector.cpp \
|
sed -i 's/\r$//' samples/c/facedetect.cmd
|
||||||
samples/c/latentsvmdetect.cpp \
|
|
||||||
samples/gpu/hog.cpp \
|
|
||||||
samples/python/camshift.py
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
|
export CFLAGS="%{optflags} $(getconf LFS_CFLAGS)"
|
||||||
@ -145,42 +151,43 @@ make DESTDIR=%{?buildroot:%{buildroot}} install/fast
|
|||||||
mkdir -p %{buildroot}%{_docdir}
|
mkdir -p %{buildroot}%{_docdir}
|
||||||
mv %{buildroot}%{_datadir}/OpenCV/doc %{buildroot}%{_docdir}/%{name}-doc
|
mv %{buildroot}%{_datadir}/OpenCV/doc %{buildroot}%{_docdir}/%{name}-doc
|
||||||
mv %{buildroot}%{_datadir}/OpenCV/samples %{buildroot}%{_docdir}/%{name}-doc/examples
|
mv %{buildroot}%{_datadir}/OpenCV/samples %{buildroot}%{_docdir}/%{name}-doc/examples
|
||||||
dos2unix %{buildroot}%{_docdir}/%{name}-doc/examples/python*/*.py
|
|
||||||
dos2unix %{buildroot}%{_docdir}/%{name}-doc/examples/gpu/*.cpp
|
# Fix rpmlint warning "doc-file-dependency"
|
||||||
|
chmod 644 %{buildroot}%{_docdir}/%{name}-doc/examples/python/*.py
|
||||||
|
chmod 644 %{buildroot}%{_docdir}/%{name}-doc/examples/python2/*.py
|
||||||
|
|
||||||
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc/examples
|
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc/examples
|
||||||
|
%fdupes -s %{buildroot}%{_includedir}
|
||||||
|
|
||||||
%clean
|
%post -n %{libname}%{soname} -p /sbin/ldconfig
|
||||||
rm -rf %{buildroot}
|
|
||||||
|
|
||||||
%post -n %{libname}%{soname} -p /sbin/ldconfig
|
|
||||||
|
|
||||||
%postun -n %{libname}%{soname} -p /sbin/ldconfig
|
%postun -n %{libname}%{soname} -p /sbin/ldconfig
|
||||||
|
|
||||||
%files -n %{libname}%{soname}
|
%files
|
||||||
%defattr(-, root, root, 0755)
|
%defattr(-,root,root,-)
|
||||||
%{_libdir}/lib*.so.*
|
%{_bindir}/%{name}_*
|
||||||
|
|
||||||
%files -n %{name}
|
|
||||||
%defattr(0644, root, root, 0755)
|
|
||||||
%attr(0755, root, root) %{_bindir}/%{name}_*
|
|
||||||
%{_datadir}/OpenCV
|
%{_datadir}/OpenCV
|
||||||
%exclude %{_datadir}/OpenCV/OpenCVConfig*.cmake
|
%exclude %{_datadir}/OpenCV/OpenCVConfig*.cmake
|
||||||
|
|
||||||
|
%files -n %{libname}%{soname}
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{_libdir}/lib*.so.*
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%defattr(0644, root, root, 0755)
|
%defattr(-,root,root,-)
|
||||||
%{_includedir}/opencv
|
%{_includedir}/opencv/
|
||||||
%{_includedir}/opencv2
|
%{_includedir}/opencv2/
|
||||||
%{_libdir}/lib*.so
|
%{_libdir}/lib*.so
|
||||||
%{_libdir}/pkgconfig/%{name}.pc
|
%{_libdir}/pkgconfig/%{name}.pc
|
||||||
%{_datadir}/OpenCV/OpenCVConfig*.cmake
|
%{_datadir}/OpenCV/OpenCVConfig*.cmake
|
||||||
|
|
||||||
%files -n python-%{name}
|
%files -n python-%{name}
|
||||||
%defattr(0644, root, root, 0755)
|
%defattr(-,root,root,-)
|
||||||
%{python_sitearch}/cv.py
|
%{python_sitearch}/cv.py
|
||||||
%{python_sitearch}/cv2.so
|
%{python_sitearch}/cv2.so
|
||||||
|
|
||||||
%files -n %{name}-doc
|
%files doc
|
||||||
%defattr(-, root, root, 0755)
|
%defattr(-,root,root,-)
|
||||||
%{_docdir}/%{name}-doc
|
%{_docdir}/%{name}-doc/
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Loading…
x
Reference in New Issue
Block a user