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)")}
Simon Perreault 1aeabeb
Simon Perreault 643b4d6
Name:           opencv
7489f69
Version:        1.1.0
1d19ad6
Release:        0.3.pre1%{?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/
7489f69
Source0:        http://prdownloads.sourceforge.net/opencvlibrary/opencv-1.1pre1.tar.gz
Simon Perreault 643b4d6
Source1:        opencv-samples-Makefile
7489f69
Patch0:         opencv-1.0.0-gcc44.patch
7489f69
Patch1:         opencv-1.1-nooptim.patch
7489f69
Patch2:         opencv-1.1.0-pythondir.diff
7489f69
Patch3:         opencv-1.1.0-conflicts.patch
4876d6b
Patch4:         opencv-1.1pre1-automake.patch
1d19ad6
Patch5:         opencv-1.1pre1-backport_gcc43.patch
Simon Perreault 643b4d6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Simon Perreault 643b4d6
7489f69
BuildRequires:  libtool
7489f69
e7dd52d
BuildRequires:  gtk2-devel
e7dd52d
BuildRequires:  jasper-devel
e7dd52d
BuildRequires:  libpng-devel
e7dd52d
BuildRequires:  libjpeg-devel
e7dd52d
BuildRequires:  libtiff-devel
e7dd52d
BuildRequires:  libtool
Simon Perreault 643b4d6
BuildRequires:  swig >= 1.3.24, zlib-devel, pkgconfig
e7dd52d
BuildRequires:  python-devel
7489f69
BuildRequires:  python-imaging, numpy
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
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}
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
Simon Perreault 643b4d6
%setup -q
7489f69
%patch0 -p1 -b .gcc44
7489f69
%patch1 -p1 -b .nooptim
7489f69
%patch2 -p1 -b .pydir
7489f69
#autotools conflicts between AC_CONFIG_MACRO_DIR and AM_FLAGS
7489f69
%patch3 -p1 -b .conflicts
4876d6b
%patch4 -p1 -b .automake
1d19ad6
%patch5 -p1 -b .gcc43
7489f69
7489f69
7489f69
#Renew the autotools (and remove rpath).
7489f69
autoreconf -vif
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%build
404038b
export SWIG_PYTHON_LIBS=%{_libdir}
7489f69
%configure --disable-static --enable-apps \
1d19ad6
  %{?_with_ffmpeg:--with-ffmpeg}%{!?_with_ffmpeg:--without-ffmpeg} \
1d19ad6
  %{!?_without_gstreamer:--with-gstreamer} \
1d19ad6
  %{?_with_xine:--with-xine --without-quicktime} \
7489f69
%ifarch i386 i586
7489f69
  --disable-sse2 \
7489f69
%endif
7489f69
Simon Perreault 643b4d6
make %{?_smp_mflags}
Simon Perreault 643b4d6
Simon Perreault 643b4d6
7489f69
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
7489f69
rm -f $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
7489f69
install -m644 %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/opencv/samples/c/GNUmakefile
7489f69
7489f69
#Remove unversioned documentation
7489f69
rm -rf $RPM_BUILD_ROOT%{_docdir}/opencv
7489f69
#And Octave since we don't build against it yet
7489f69
rm -rf $RPM_BUILD_ROOT%{_datadir}/opencv/{samples/octave/,ChangeLog,THANKS}
Simon Perreault 643b4d6
Simon Perreault 643b4d6
f3a6a11
%check
7489f69
#Check fails since we don't support most video 
7489f69
#read/write capability and we don't provide a display
7489f69
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
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
6a255ce
%doc %dir %{_datadir}/opencv/samples
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/c
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%files python
e5270d2
%{python_sitearch}/opencv
6a255ce
%doc %dir %{_datadir}/opencv/samples
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/python
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%changelog
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.