Accepting request 88425 from KDE:Distro:Factory
- uncomment libraries not in 12.1 for now - Changed groups (fix for RPMLINT warning) - Added check for duplicate files (fix for RPMLINT warning) - Added py_requires macros and python-base dependencies (fix for RPMLINT warning) - Escaped macros (fix for RPMLINT warning) - Fixed end-of-line encoding problems (fix for RPMLINT warning) - Added libeigen2-devel buildrequires - Added libunicap and libucil buildrequires (libunicap supports requires libucil) - Cleaned up spec file formatting OBS-URL: https://build.opensuse.org/request/show/88425 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opencv?expand=0&rev=25
This commit is contained in:
parent
13ccc5535e
commit
50f0babaa3
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:30e7f3e7b07fb5bd1605c934101e9f2487c3e2fcc97478e529756575024ee2b8
|
||||
size 32588659
|
3
OpenCV-2.3.1a.tar.bz2
Normal file
3
OpenCV-2.3.1a.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a9a2f529101c04eb2b606eee8c80f3ad93190b36f91ac09ee0ec5aa1eed1450c
|
||||
size 32669613
|
@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Oct 18 08:19:10 UTC 2011 - coolo@suse.com
|
||||
|
||||
- uncomment libraries not in 12.1 for now
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 7 15:15:32 UTC 2011 - toddrme2178@gmail.com
|
||||
|
||||
- Changed groups (fix for RPMLINT warning)
|
||||
- Added check for duplicate files (fix for RPMLINT warning)
|
||||
- Added py_requires macros and python-base dependencies (fix for RPMLINT warning)
|
||||
- Escaped macros (fix for RPMLINT warning)
|
||||
- Fixed end-of-line encoding problems (fix for RPMLINT warning)
|
||||
- Added libeigen2-devel buildrequires
|
||||
- Added libunicap and libucil buildrequires (libunicap supports requires libucil)
|
||||
- Cleaned up spec file formatting
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 23 17:46:53 EEST 2011 - koprok@nand.bg
|
||||
|
||||
|
96
opencv.spec
96
opencv.spec
@ -20,51 +20,40 @@
|
||||
|
||||
Name: opencv
|
||||
%define libname lib%{name}
|
||||
%define soname 2_3
|
||||
Version: 2.3.1
|
||||
%define soname 2_3
|
||||
Version: 2.3.1a
|
||||
Release: 1
|
||||
%define dirver 2.3.1
|
||||
License: BSD3c
|
||||
Summary: Collection of algorithms for computer vision
|
||||
Url: http://%{name}.willowgarage.com/wiki/
|
||||
Group: Development/Libraries
|
||||
Source0: http://downloads.sourceforge.net/project/%{name}library/%{name}-unix/%{version}/OpenCV-%{version}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM %{name}-libdir.patch koprok@nand.bg -- Add an option to install libraries and python packages in lib64.
|
||||
Group: Development/Libraries/C and C++
|
||||
Source0: http://downloads.sourceforge.net/project/%{name}library/%{name}-unix/%{dirver}/OpenCV-%{version}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM %%{name}-libdir.patch koprok@nand.bg -- Add an option to install libraries and python packages in lib64.
|
||||
Patch0: %{name}-libdir.patch
|
||||
# PATCH-FIX-UPSTREAM %{name}-samples.patch koprok@nand.bg -- Improve samples installation.
|
||||
# PATCH-FIX-UPSTREAM %%{name}-samples.patch koprok@nand.bg -- Improve samples installation.
|
||||
Patch1: %{name}-samples.patch
|
||||
# PATCH-FIX-UPSTREAM %{name}-2.3-underlinking.patch reddwarf@opensuse.org -- Make libopencv_highgui.so link to libv4l2 since it's using symbols defined there.
|
||||
# PATCH-FIX-UPSTREAM %%{name}-2.3-underlinking.patch reddwarf@opensuse.org -- Make libopencv_highgui.so link to libv4l2 since it's using symbols defined there.
|
||||
Patch3: %{name}-2.3-underlinking.patch
|
||||
# PATCH-FIX-OPENSUSE %{name}-datadir.patch koprok@nand.bg -- Install data files in share/opencv instead of share/OpenCV.
|
||||
# PATCH-FIX-OPENSUSE %%{name}-datadir.patch koprok@nand.bg -- Install data files in share/opencv instead of share/OpenCV.
|
||||
Patch9: %{name}-datadir.patch
|
||||
%if 0%{?suse_version} >= 1120
|
||||
BuildRequires: gstreamer-0_10-plugins-base-devel
|
||||
BuildRequires: gstreamer-0_10-devel
|
||||
%endif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} >= 1110
|
||||
BuildRequires: libdc1394-devel
|
||||
BuildRequires: libxine-devel
|
||||
%else
|
||||
BuildRequires: xine-devel
|
||||
%endif
|
||||
BuildRequires: OpenEXR-devel
|
||||
BuildRequires: cmake
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: dos2unix
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: gstreamer-0_10-plugins-base-devel
|
||||
BuildRequires: libdc1394-devel
|
||||
BuildRequires: libeigen2-devel
|
||||
BuildRequires: libjasper-devel
|
||||
BuildRequires: libjpeg-devel
|
||||
BuildRequires: libpng-devel
|
||||
BuildRequires: libtiff-devel
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: zlib-devel
|
||||
BuildRequires: libqt4-devel
|
||||
#BuildRequires: libucil-devel
|
||||
#BuildRequires: libunicap-devel
|
||||
BuildRequires: libxine-devel
|
||||
BuildRequires: python-numpy-devel
|
||||
%if %{with ffmpeg}
|
||||
BuildRequires: libffmpeg-devel
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1130
|
||||
BuildRequires: python-numpy-devel
|
||||
%else
|
||||
BuildRequires: python-numpy
|
||||
%endif
|
||||
%if 0%{?suse_version} < 1210
|
||||
BuildRequires: libv4l-devel
|
||||
%else
|
||||
@ -77,10 +66,8 @@ functions and a few C++ classes that implement some popular Image Processing and
|
||||
Computer Vision algorithms.
|
||||
|
||||
%package -n %{libname}%{soname}
|
||||
|
||||
|
||||
Summary: Development files for using the OpenCV library
|
||||
Group: Development/Libraries
|
||||
Group: Development/Libraries/C and C++
|
||||
|
||||
%description -n %{libname}%{soname}
|
||||
The Open Computer Vision Library is a collection of algorithms and sample code
|
||||
@ -88,10 +75,8 @@ for various computer vision problems. The library is compatible with IPL and
|
||||
utilizes Intel Integrated Performance Primitives for better performance.
|
||||
|
||||
%package devel
|
||||
License: BSD3c
|
||||
|
||||
Summary: Development files for using the OpenCV library
|
||||
Group: Development/Libraries
|
||||
Group: Development/Libraries/C and C++
|
||||
Requires: %{libname}%{soname} = %{version}
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
@ -101,20 +86,18 @@ documentation. It should be installed if you want to develop programs that will
|
||||
use the OpenCV library.
|
||||
|
||||
%package -n python-%{name}
|
||||
|
||||
|
||||
Summary: Python bindings for apps which use OpenCV
|
||||
Group: Development/Libraries
|
||||
Requires: python-base
|
||||
Group: Development/Libraries/Python
|
||||
Requires: python-base = %{py_ver}
|
||||
%py_requires
|
||||
|
||||
%description -n python-%{name}
|
||||
This package contains Python bindings for the OpenCV library.
|
||||
|
||||
%package -n %{name}-doc
|
||||
|
||||
|
||||
Summary: Documentation and examples for OpenCV
|
||||
Group: Documentation
|
||||
Group: Development/Libraries/C and C++
|
||||
Recommends: python
|
||||
# Since this package also contains examples that need -devel to be compiled
|
||||
Recommends: %{name}-devel
|
||||
|
||||
@ -122,7 +105,7 @@ Recommends: %{name}-devel
|
||||
This package contains the documentation and examples for the OpenCV library.
|
||||
|
||||
%prep
|
||||
%setup -qn OpenCV-%{version}
|
||||
%setup -qn OpenCV-%{dirver}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch3
|
||||
@ -141,19 +124,18 @@ export CFLAGS="%{optflags}"
|
||||
export CXXFLAGS="%{optflags}"
|
||||
mkdir build
|
||||
cd build
|
||||
cmake -DCMAKE_SKIP_RPATH=ON \
|
||||
cmake -DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_INSTALL_PREFIX='%{_prefix}' \
|
||||
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DUSE_OMIT_FRAME_POINTER=OFF \
|
||||
-DWITH_XINE=ON \
|
||||
-DWITH_QT=ON \
|
||||
%if 0%{?suse_version} >= 1130
|
||||
-DWITH_QT_OPENGL=ON \
|
||||
%endif
|
||||
-DCMAKE_SKIP_RPATH=ON \
|
||||
-DBUILD_TESTS=OFF \
|
||||
-DINSTALL_C_EXAMPLES=ON \
|
||||
-DINSTALL_PYTHON_EXAMPLES=ON \
|
||||
-DLIB_SUFFIX=$(echo %{_lib} | cut -b4-) \
|
||||
-DUSE_OMIT_FRAME_POINTER=OFF \
|
||||
-DWITH_QT=ON \
|
||||
-DWITH_QT_OPENGL=ON \
|
||||
-DWITH_UNICAP=ON \
|
||||
-DWITH_XINE=ON \
|
||||
..
|
||||
make %{?_smp_mflags} VERBOSE=1
|
||||
|
||||
@ -163,11 +145,14 @@ make DESTDIR=%{?buildroot:%{buildroot}} install/fast
|
||||
mkdir -p %{buildroot}%{_docdir}
|
||||
mv %{buildroot}%{_datadir}/%{name}/doc %{buildroot}%{_docdir}/%{name}-doc
|
||||
mv %{buildroot}%{_datadir}/%{name}/samples %{buildroot}%{_docdir}/%{name}-doc/examples
|
||||
dos2unix %{buildroot}%{_docdir}/%{name}-doc/examples/python*/*.py
|
||||
dos2unix %{buildroot}%{_docdir}/%{name}-doc/examples/gpu/*.cpp
|
||||
%fdupes -s %{buildroot}%{_docdir}/%{name}-doc/examples
|
||||
|
||||
%clean
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post -n %{libname}%{soname} -p /sbin/ldconfig
|
||||
%post -n %{libname}%{soname} -p /sbin/ldconfig
|
||||
|
||||
%postun -n %{libname}%{soname} -p /sbin/ldconfig
|
||||
|
||||
@ -191,13 +176,8 @@ rm -rf %{buildroot}
|
||||
|
||||
%files -n python-%{name}
|
||||
%defattr(0644, root, root, 0755)
|
||||
%if 0%{?suse_version} < 1120
|
||||
%{py_sitedir}/cv.py
|
||||
%{py_sitedir}/cv2.so
|
||||
%else
|
||||
%{python_sitearch}/cv.py
|
||||
%{python_sitearch}/cv2.so
|
||||
%endif
|
||||
|
||||
%files -n %{name}-doc
|
||||
%defattr(-, root, root, 0755)
|
||||
|
Loading…
Reference in New Issue
Block a user