orion / rpms / opencv

Forked from rpms/opencv 4 years ago
Clone
e5270d2
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
e5270d2
%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
ad88918
%global tar_name OpenCV
Simon Perreault 1aeabeb
Simon Perreault 643b4d6
Name:           opencv
a39a042
Version:        2.0.0
Karel Klíč db0fac9
Release:        9%{?dist}
Simon Perreault 643b4d6
Summary:        Collection of algorithms for computer vision
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Group:          Development/Libraries
7c992b7
# This is normal three clause BSD.
7c992b7
License:        BSD
b1c4e50
URL:            http://opencv.willowgarage.com/wiki/
a39a042
Source0:        http://prdownloads.sourceforge.net/opencvlibrary/%{tar_name}-%{version}.tar.bz2
Simon Perreault 643b4d6
Source1:        opencv-samples-Makefile
ad88918
# Fedora cmake macros define -DLIB_SUFFIX=64 on 64 bits platforms
ad88918
Patch0:         opencv-cmake-libdir.patch
Karel Klíč 58a2e15
# Fixes memory corruption in the gaussian random number generator.
Karel Klíč 58a2e15
# Fixed in the revision 2282 of the upstream svn repository.
Karel Klíč 58a2e15
Patch1:         opencv-2.0.0-gaussianrng.patch
Simon Perreault 643b4d6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Simon Perreault 643b4d6
7489f69
BuildRequires:  libtool
ad88918
BuildRequires:  cmake >= 2.4
7489f69
e7dd52d
BuildRequires:  gtk2-devel
f5a6efa
BuildRequires:  libucil-devel
9fe9f21
BuildRequires:  libtheora-devel
9fe9f21
BuildRequires:  libvorbis-devel
7cc3e45
%ifnarch s390 s390x
9fe9f21
BuildRequires:  libraw1394-devel
9fe9f21
BuildRequires:  libdc1394-devel
7cc3e45
%endif
e7dd52d
BuildRequires:  jasper-devel
e7dd52d
BuildRequires:  libpng-devel
e7dd52d
BuildRequires:  libjpeg-devel
e7dd52d
BuildRequires:  libtiff-devel
e7dd52d
BuildRequires:  libtool
ad88918
BuildRequires:  zlib-devel, pkgconfig
e7dd52d
BuildRequires:  python-devel
ad88918
BuildRequires:  python-imaging, numpy, swig >= 1.3.24
e7dd52d
%{?_with_ffmpeg:BuildRequires:  ffmpeg-devel >= 0.4.9}
1d19ad6
%{!?_without_gstreamer:BuildRequires:  gstreamer-devel}
1d19ad6
%{?_with_xine:BuildRequires:  xine-lib-devel}
e7dd52d
Simon Perreault 643b4d6
%description
Simon Perreault 643b4d6
OpenCV means Intel® Open Source Computer Vision Library. It is a collection of
Simon Perreault 643b4d6
C functions and a few C++ classes that implement some popular Image Processing
Simon Perreault 643b4d6
and Computer Vision algorithms.
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%package devel
Simon Perreault 643b4d6
Summary:        Development files for using the OpenCV library
Simon Perreault 643b4d6
Group:          Development/Libraries
Simon Perreault 643b4d6
Requires:       opencv = %{version}-%{release}
Karel Klíč 589fa6d
Requires:       pkgconfig
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%description devel
Simon Perreault 643b4d6
This package contains the OpenCV C/C++ library and header files, as well as
Simon Perreault 643b4d6
documentation. It should be installed if you want to develop programs that
ad88918
will use the OpenCV library. You should consider installing opencv-devel-docs
ad88918
package.
Simon Perreault 643b4d6
ad88918
%package devel-docs
ad88918
Summary:        Development files for using the OpenCV library
ad88918
Group:          Development/Libraries
ad88918
Requires:       opencv-devel = %{version}-%{release}
ad88918
Requires:       pkgconfig
ad88918
BuildArch:      noarch
ad88918
ad88918
%description devel-docs
ad88918
This package contains the OpenCV documentation and examples programs.
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%package python
Simon Perreault 643b4d6
Summary:        Python bindings for apps which use OpenCV
Simon Perreault 643b4d6
Group:          Development/Libraries
Simon Perreault 643b4d6
Requires:       opencv = %{version}-%{release}
7489f69
Requires:       python-imaging
7489f69
Requires:       numpy
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%description python
Simon Perreault 643b4d6
This package contains Python bindings for the OpenCV library.
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%prep
a39a042
%setup -q -n %{tar_name}-%{version}
ad88918
%patch0 -p1
Karel Klíč db0fac9
%patch1 -p2 -b .gaussianrng
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%build
Karel Klíč dd077b1
Karel Klíč dd077b1
%ifarch i386
Karel Klíč dd077b1
export CXXFLAGS="%{__global_cflags} -m32 -fasynchronous-unwind-tables"
Karel Klíč dd077b1
%endif
Karel Klíč dd077b1
7489f69
ad88918
# enabled by default if libraries are presents at build time:
ad88918
# GTK, GSTREAMER, UNICAP, 1394, V4L
ad88918
# non available on Fedora: FFMPEG, XINE
ad88918
%cmake -DENABLE_OPENMP=1\
ad88918
 %{?_without_gstreamer:-DWITH_GSTREAMER=0} \
ad88918
 %{!?_with_ffmpeg:-DWITH_FFMPEG=0} \
ad88918
 %{!?_with_xine:-DWITH_XINE=0} \
ad88918
 -DBUILD_SWIG_PYTHON_SUPPORT=1 \
ad88918
 -DINSTALL_C_EXAMPLES=1 \
ad88918
 -DINSTALL_PYTHON_EXAMPLES=1 \
ad88918
.
ad88918
make VERBOSE=1 %{?_smp_mflags}
ad88918
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%install
Simon Perreault 643b4d6
rm -rf $RPM_BUILD_ROOT
e7dd52d
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" CPPROG="cp -p"
7489f69
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
7489f69
a39a042
rm -f $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/build_all.sh \
a39a042
      $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/cvsample.dsp \
a39a042
      $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/cvsample.vcproj \
a39a042
      $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/facedetect.cmd
a39a042
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/samples/c/GNUmakefile
a39a042
install -m644 cvconfig.h $RPM_BUILD_ROOT%{_includedir}/%{name}/cvconfig.h
ad88918
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/
ad88918
# install documentation
ad88918
install -m644 doc/%{name}.pdf $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/%{name}.pdf
ad88918
install -m644 doc/*.{htm,png,jpg} $RPM_BUILD_ROOT%{_docdir}/%{name}-doc-%{version}/
7489f69
ad88918
# fix dos end of lines
ad88918
sed -i 's|\r||g'  $RPM_BUILD_ROOT/%{_datadir}/%{name}/samples/c/adaptiveskindetector.cpp
ad88918
# remove unnecessary documentation
ad88918
rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{doc/,samples/octave/}
Simon Perreault 643b4d6
f3a6a11
%check
ad88918
# Check fails since we don't support most video
ad88918
# read/write capability and we don't provide a display
Karel Klíč 58a2e15
# ARGS=-V increases output verbosity
a39a042
%ifnarch ppc64
Karel Klíč 58a2e15
    LD_LIBRARY_PATH=%{_builddir}/%{tar_name}-%{version}/lib:$LD_LIBARY_PATH make test ARGS=-V || :
a39a042
%endif
f3a6a11
Simon Perreault 643b4d6
%clean
Simon Perreault 643b4d6
rm -rf $RPM_BUILD_ROOT
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%post -p /sbin/ldconfig
Simon Perreault 643b4d6
%postun -p /sbin/ldconfig
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%files
Simon Perreault 643b4d6
%defattr(-,root,root,-)
Simon Perreault 643b4d6
%doc AUTHORS ChangeLog COPYING THANKS TODO
ad88918
%{_bindir}/opencv_*
Simon Perreault 643b4d6
%{_libdir}/lib*.so.*
Simon Perreault 643b4d6
%dir %{_datadir}/opencv
Simon Perreault 643b4d6
%{_datadir}/opencv/haarcascades
a05fb35
%{_datadir}/opencv/lbpcascades
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%files devel
Simon Perreault 643b4d6
%defattr(-,root,root,-)
Simon Perreault 643b4d6
%{_includedir}/opencv
Simon Perreault 643b4d6
%{_libdir}/lib*.so
Simon Perreault 643b4d6
%{_libdir}/pkgconfig/opencv.pc
ad88918
%{_datadir}/opencv/OpenCVConfig.cmake
ad88918
ad88918
%files devel-docs
ad88918
%defattr(-,root,root,-)
a39a042
%doc %{_datadir}/doc/opencv-2.0.0/
6a255ce
%doc %dir %{_datadir}/opencv/samples
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/c
ad88918
%doc %{_docdir}/%{name}-doc-%{version}/%{name}.pdf
ad88918
%doc %{_docdir}/%{name}-doc-%{version}/*.htm
ad88918
%doc %{_docdir}/%{name}-doc-%{version}/%{name}.jpg
ad88918
%doc %{_docdir}/%{name}-doc-%{version}/%{name}-logo*.png
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%files python
Karel Klíč 589fa6d
%defattr(-,root,root,-)
ad88918
%{python_sitearch}/cv.so
6a255ce
%doc %dir %{_datadir}/opencv/samples
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/python
ad88918
# old SWIG wrappers
ad88918
%{python_sitearch}/opencv
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%changelog
Karel Klíč db0fac9
* Mon Mar 09 2010 Karel Klic <kklic@redhat.com> - 2.0.0-9
Karel Klíč db0fac9
- apply the previously added patch
Karel Klíč db0fac9
Karel Klíč 58a2e15
* Mon Mar 08 2010 Karel Klic <kklic@redhat.com> - 2.0.0-8
Karel Klíč 58a2e15
- re-enable testing on CMake build system
Karel Klíč 58a2e15
- fix memory corruption in the gaussian random number generator
Karel Klíč 58a2e15
f5a6efa
* Sat Feb 27 2010 Haïkel Guémar <karlthered@gmail.com> - 2.0.0-7
f5a6efa
- replaced BR unicap-devel by libucil-devel (unicap split)
f5a6efa
ad88918
* Thu Feb 25 2010 Haïkel Guémar <karlthered@gmail.com> - 2.0.0-6
ad88918
- use cmake build system
ad88918
- applications renamed to opencv_xxx instead of opencv-xxx
ad88918
- add devel-docs subpackage #546605
ad88918
- add OpenCVConfig.cmake
ad88918
- enable openmp build
ad88918
- enable old SWIG based python wrappers
ad88918
- opencv package is a good boy and use global instead of define
ad88918
Karel Klíč dd077b1
* Tue Feb 16 2010 Karel Klic <kklic@redhat.com> - 2.0.0-5
Karel Klíč dd077b1
- Set CXXFLAXS without -match=i386 for i386 architecture #565074
Karel Klíč dd077b1
fa96201
* Sat Jan 09 2010 Rakesh Pandit <rakesh@fedoraproject.org> - 2.0.0-4
fa96201
- Updated opencv-samples-Makefile (Thanks Scott Tsai) #553697
fa96201
Karel Klíč 589fa6d
* Wed Jan 06 2010 Karel Klic <kklic@redhat.com> - 2.0.0-3
Karel Klíč 589fa6d
- Fixed spec file issues detected by rpmlint
Karel Klíč 589fa6d
a05fb35
* Sun Dec 06 2009 Haïkel Guémar <karlthered@gmail.com> - 2.0.0-2
ad88918
- Fix autotools scripts (missing LBP features) - #544167
a05fb35
a39a042
* Fri Nov 27 2009 Haïkel Guémar <karlthered@gmail.com> - 2.0.0-1
a39a042
- Updated to 2.0.0
a39a042
- Removed upstream-ed patches
a39a042
- Ugly hack (added cvconfig.h)
Karel Klíč 589fa6d
- Disable %%check on ppc64
a39a042
a39a042
* Thu Sep 10 2009 Karsten Hopp <karsten@redhat.com> - 1.1.0-0.7.pre1
7cc3e45
- fix build on s390x where we don't have libraw1394 and devel
7cc3e45
a39a042
* Fri Jul 30 2009 Haïkel Guémar <karlthered@gmail.com> - 1.1.0.0.6.pre1
3956dcf
- Fix typo I introduced that prevented build on i386/i586
3956dcf
a39a042
* Fri Jul 30 2009 Haïkel Guémar <karlthered@gmail.com> - 1.1.0.0.5.pre1
a05fb35
- Added 1394 libs and unicap support
9fe9f21
f391ed0
* Sat Jul 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.0-0.4.pre1
f391ed0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
f391ed0
1d19ad6
* Thu Jul 16 2009 kwizart < kwizart at gmail.com > - 1.1.0-0.3.pre1
1d19ad6
- Build with gstreamer support - #491223
1d19ad6
- Backport gcc43 fix from trunk
1d19ad6
4876d6b
* Thu Jul 16 2009 kwizart < kwizart at gmail.com > - 1.1.0-0.2.pre1
4876d6b
- Fix FTBFS #511705
4876d6b
7489f69
* Fri Apr 24 2009 kwizart < kwizart at gmail.com > - 1.1.0-0.1.pre1
7489f69
- Update to 1.1pre1
7489f69
- Disable CXXFLAGS hardcoded optimization
7489f69
- Add BR: python-imaging, numpy
7489f69
- Disable make check failure for now
7489f69
e7dd52d
* Wed Apr 22 2009 kwizart < kwizart at gmail.com > - 1.0.0-14
e7dd52d
- Fix for gcc44
e7dd52d
- Enable BR jasper-devel
4fb1659
- Disable ldconfig run on python modules (uneeded)
4fb1659
- Prevent timestamp change on install
e7dd52d
dacb84e
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-13
dacb84e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
dacb84e
b1c4e50
* Mon Dec 29 2008 Rakesh Pandit <rakesh@fedoraproject.org> - 1.0.0-12
b1c4e50
- fix URL field
b1c4e50
e5270d2
* Fri Dec 19 2008 Ralf Corsépius <corsepiu@fedoraproject.org> - 1.0.0-11
e5270d2
- Adopt latest python spec rules.
e5270d2
- Rebuild for Python 2.6 once again.
e5270d2
bf2669a
* Sat Nov 29 2008 Ignacio Vazquez-Abrams <ivazqueznet+rpm@gmail.com> - 1.0.0-10
bf2669a
- Rebuild for Python 2.6
bf2669a
7c992b7
* Thu May 22 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.0.0-9
7c992b7
- fix license tag
7c992b7
4d29829
* Sun May 11 2008 Ralf Corsépius <rc040203@freenet.de> - 1.0.0-8
4d29829
- Adjust library order in opencv.pc.in (BZ 445937).
4d29829
2b3c73a
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.0.0-7
2b3c73a
- Autorebuild for GCC 4.3
2b3c73a
afd18f7
* Sun Feb 10 2008 Ralf Corsépius <rc040203@freenet.de> - 1.0.0-6
afd18f7
- Rebuild for gcc43.
afd18f7
74d1a0d
* Tue Aug 28 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 1.0.0-5
74d1a0d
- Rebuild for selinux ppc32 issue.
74d1a0d
b675e47
* Wed Aug 22 2007 Ralf Corsépius <rc040203@freenet.de> - 1.0.0-4
b675e47
- Mass rebuild.
b675e47
6a255ce
* Thu Mar 22 2007 Ralf Corsépius <rc040203@freenet.de> - 1.0.0-3
6a255ce
- Fix %%{_datadir}/opencv/samples ownership.
6a255ce
- Adjust timestamp of cvconfig.h.in to avoid re-running autoheader.
6a255ce
9c3ecf9
* Thu Mar 22 2007 Ralf Corsépius <rc040203@freenet.de> - 1.0.0-2
9c3ecf9
- Move all of the python module to pyexecdir (BZ 233128).
9c3ecf9
- Activate the testsuite.
9c3ecf9
ef9cd06
* Mon Dec 11 2006 Ralf Corsépius <rc040203@freenet.de> - 1.0.0-1
ef9cd06
- Upstream update.
ef9cd06
e9c926b
* Mon Dec 11 2006 Ralf Corsépius <rc040203@freenet.de> - 0.9.9-4
e9c926b
- Remove python-abi.
e9c926b
05afde5
* Thu Oct 05 2006 Christian Iseli <Christian.Iseli@licr.org> 0.9.9-3
e9c926b
- rebuilt for unwind info generation, broken in gcc-4.1.1-21
05afde5
f3a6a11
* Thu Sep 21 2006 Ralf Corsépius <rc040203@freenet.de> - 0.9.9-2
f3a6a11
- Stop configure.in from hacking CXXFLAGS.
f3a6a11
- Activate testsuite.
f3a6a11
- Let *-devel require pkgconfig.
f3a6a11
09d693c
* Thu Sep 21 2006 Ralf Corsépius <rc040203@freenet.de> - 0.9.9-1
09d693c
- Upstream update.
09d693c
- Don't BR: autotools.
09d693c
- Install samples' Makefile as GNUmakefile.
09d693c
7b3f658
* Thu Sep 21 2006 Ralf Corsépius <rc040203@freenet.de> - 0.9.7-18
7b3f658
- Un'%%ghost *.pyo.
7b3f658
- Separate %%{pythondir} from %%{pyexecdir}.
7b3f658
daa185d
* Thu Sep 21 2006 Ralf Corsépius <rc040203@freenet.de> - 0.9.7-17
daa185d
- Rebuild for FC6.
5c10c8d
- BR: libtool.
daa185d
daa185d
* Fri Mar 17 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-16
daa185d
- Rebuild.
daa185d
Simon Perreault 3896270
* Wed Mar  8 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-15
Simon Perreault 3896270
- Force a re-run of Autotools by calling autoreconf.
Simon Perreault 3896270
Simon Perreault 0d31a46
* Wed Mar  8 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-14
Simon Perreault 0d31a46
- Added build dependency on Autotools.
Simon Perreault 0d31a46
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-13
Simon Perreault 1aeabeb
- Changed intrinsics patch so that it matches upstream.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-12
Simon Perreault 1aeabeb
- More intrinsics patch fixing.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-11
Simon Perreault 1aeabeb
- Don't do "make check" because it doesn't run any tests anyway.
Simon Perreault 1aeabeb
- Back to main intrinsics patch.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-10
Simon Perreault 1aeabeb
- Using simple intrinsincs patch.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-9
Simon Perreault 1aeabeb
- Still more fixing of intrinsics patch for Python bindings on x86_64.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-8
Simon Perreault 1aeabeb
- Again fixed intrinsics patch so that Python modules build on x86_64.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-7
Simon Perreault 1aeabeb
- Fixed intrinsics patch so that it works.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Tue Mar  7 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-6
Simon Perreault 1aeabeb
- Fixed Python bindings location on x86_64.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Mon Mar  6 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-5
Simon Perreault 1aeabeb
- SSE2 support on x86_64.
Simon Perreault 1aeabeb
Simon Perreault 1aeabeb
* Mon Mar  6 2006 Simon Perreault <nomis80@nomis80.org> - 0.9.7-4
Simon Perreault 1aeabeb
- Rebuild
Simon Perreault 1aeabeb
Simon Perreault 643b4d6
* Sun Oct 16 2005 Simon Perreault <nomis80@nomis80.org> - 0.9.7-3
Simon Perreault 643b4d6
- Removed useless sample compilation makefiles/project files and replaced them
Simon Perreault 643b4d6
  with one that works on Fedora Core.
Simon Perreault 643b4d6
- Removed shellbang from Python modules.
Simon Perreault 643b4d6
Simon Perreault 643b4d6
* Mon Oct 10 2005 Simon Perreault <nomis80@nomis80.org> - 0.9.7-2
Simon Perreault 643b4d6
- Made FFMPEG dependency optional (needs to be disabled for inclusion in FE).
Simon Perreault 643b4d6
Simon Perreault 643b4d6
* Mon Oct 10 2005 Simon Perreault <nomis80@nomis80.org> - 0.9.7-1
Simon Perreault 643b4d6
- Initial package.