Simon Perreault 643b4d6
%define with_ffmpeg 0
Simon Perreault 643b4d6
Simon Perreault 1aeabeb
%define pythondir %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib()')
Simon Perreault 1aeabeb
%define pyexecdir %(%{__python} -c 'from distutils import sysconfig; print sysconfig.get_python_lib(1)')
Simon Perreault 1aeabeb
Simon Perreault 643b4d6
Name:           opencv
09d693c
Version:        0.9.9
e9c926b
Release:        4%{?dist}
Simon Perreault 643b4d6
Summary:        Collection of algorithms for computer vision
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Group:          Development/Libraries
Simon Perreault 643b4d6
License:        Intel Open Source License
Simon Perreault 643b4d6
URL:            http://www.intel.com/technology/computing/opencv/index.htm
Simon Perreault 643b4d6
Source0:        http://prdownloads.sourceforge.net/opencvlibrary/opencv-%{version}.tar.gz
Simon Perreault 643b4d6
Source1:        opencv-samples-Makefile
09d693c
Patch0:         opencv-0.9.9-pythondir.diff
f3a6a11
Patch1:		opencv-0.9.9-configure.in.diff
f3a6a11
Patch2:         opencv-0.9.9-autotools.diff
Simon Perreault 643b4d6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Simon Perreault 643b4d6
Simon Perreault 643b4d6
BuildRequires:  gtk2-devel, libpng-devel, libjpeg-devel, libtiff-devel
Simon Perreault 643b4d6
BuildRequires:  swig >= 1.3.24, zlib-devel, pkgconfig
Simon Perreault 643b4d6
BuildRequires:  python-devel
Simon Perreault 643b4d6
%if %{with_ffmpeg}
Simon Perreault 643b4d6
BuildRequires:  ffmpeg-devel >= 0.4.9
Simon Perreault 643b4d6
%endif
Simon Perreault 643b4d6
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}
f3a6a11
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
Simon Perreault 643b4d6
will use the OpenCV library.
Simon Perreault 643b4d6
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}
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
Simon Perreault 643b4d6
%setup -q
09d693c
%patch0 -p1
09d693c
%patch1 -p1
f3a6a11
%patch2 -p1
Simon Perreault 643b4d6
%{__sed} -i 's/\r//' interfaces/swig/python/*.py \
Simon Perreault 643b4d6
                     samples/python/*.py
Simon Perreault 643b4d6
%{__sed} -i 's/^#!.*//' interfaces/swig/python/adaptors.py \
Simon Perreault 643b4d6
                        interfaces/swig/python/__init__.py
Simon Perreault 643b4d6
09d693c
find -name Makefile.in | xargs touch
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%build
09d693c
%configure --disable-static --enable-python --enable-apps
Simon Perreault 643b4d6
make %{?_smp_mflags}
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%install
Simon Perreault 643b4d6
rm -rf $RPM_BUILD_ROOT
Simon Perreault 643b4d6
make install DESTDIR=$RPM_BUILD_ROOT
Simon Perreault 643b4d6
rm -f $RPM_BUILD_ROOT%{_libdir}/*.la \
Simon Perreault 1aeabeb
      $RPM_BUILD_ROOT%{pyexecdir}/opencv/*.la \
Simon Perreault 643b4d6
      $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/build_all.sh \
Simon Perreault 643b4d6
      $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/cvsample.dsp \
Simon Perreault 643b4d6
      $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/cvsample.vcproj \
Simon Perreault 643b4d6
      $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/facedetect.cmd \
Simon Perreault 643b4d6
      $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/makefile.gcc \
Simon Perreault 643b4d6
      $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/makefile.gen
09d693c
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/GNUmakefile
Simon Perreault 643b4d6
Simon Perreault 643b4d6
f3a6a11
%check
f3a6a11
# The test suite fails.
f3a6a11
make check ||:
f3a6a11
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
%post python -p /sbin/ldconfig
Simon Perreault 643b4d6
%postun python -p /sbin/ldconfig
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
Simon Perreault 643b4d6
%{_bindir}/opencv-*
Simon Perreault 643b4d6
%{_libdir}/lib*.so.*
Simon Perreault 643b4d6
%dir %{_datadir}/opencv
Simon Perreault 643b4d6
%{_datadir}/opencv/haarcascades
Simon Perreault 643b4d6
%{_datadir}/opencv/readme.txt
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}/lib*.a
Simon Perreault 643b4d6
%{_libdir}/pkgconfig/opencv.pc
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/doc
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/c
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%files python
7b3f658
%{pythondir}/opencv
7b3f658
%if "%{pythondir}" != "%{pyexecdir}"
Simon Perreault 1aeabeb
%{pyexecdir}/opencv
7b3f658
%endif
7b3f658
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/python
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%changelog
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.