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)")}
a39a042
%define tar_name OpenCV
Simon Perreault 1aeabeb
Simon Perreault 643b4d6
Name:           opencv
a39a042
Version:        2.0.0
fa96201
Release:        4%{?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
a05fb35
Patch0:         opencv-2.0.0-data-automake.patch
Karel Klíč 589fa6d
Patch1:         opencv-2.0.0-apps-automake.patch
Simon Perreault 643b4d6
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Simon Perreault 643b4d6
7489f69
BuildRequires:  libtool
7489f69
e7dd52d
BuildRequires:  gtk2-devel
9fe9f21
BuildRequires:  unicap-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
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}
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
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
a39a042
%setup -q -n %{tar_name}-%{version}
a05fb35
%patch0 -p1 -b .automake
a05fb35
%patch1 -p1 -b .automake
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} \
9fe9f21
  --with-unicap \
3956dcf
  --with-1394libs --without-quicktime \
7489f69
%ifarch i386 i586
7489f69
  --disable-sse2 \
7489f69
%endif
7489f69
Simon Perreault 643b4d6
make %{?_smp_mflags}
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
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
a39a042
#Check fails since we don't support most video
7489f69
#read/write capability and we don't provide a display
a39a042
%ifnarch ppc64
a39a042
    make check || :
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
Simon Perreault 643b4d6
%{_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
%{_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}/pkgconfig/opencv.pc
a39a042
%doc %{_datadir}/doc/opencv-2.0.0/
6a255ce
%doc %dir %{_datadir}/opencv/samples
Simon Perreault 643b4d6
%doc %{_datadir}/opencv/samples/c
a39a042
%doc %{_datadir}/opencv/samples/CMake
Simon Perreault 643b4d6
Simon Perreault 643b4d6
Simon Perreault 643b4d6
%files python
Karel Klíč 589fa6d
%defattr(-,root,root,-)
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
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
a05fb35
- 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.