File opencv.spec of Package opencv
# norootforbuild
Name: opencv
Version: 1.0.0
Release: 0.pm.1
License: BSD
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: pkgconfig gcc-c++ libpng-devel zlib-devel libjpeg-devel libtiff-devel
BuildRequires: libjasper-devel python-devel gtk2-devel linux-kernel-headers
BuildRequires: libdc1394-devel libdc1394_control12-devel libraw1394-devel OpenEXR-devel swig
Group: Development/Libraries/C and C++
Summary: Open Computer Vision Library
URL: http://opencvlibrary.sourceforge.net/
Source: http://garr.dl.sourceforge.net/sourceforge/opencvlibrary/%{name}-%{version}.tar.gz
Source1: %{name}-rpmlintrc
Patch: opencv-install_hook.patch
Patch1: opencv-fix_type_punning.patch
Patch2: opencv-erroneous_test.patch
Patch3: opencv-codecleanup.patch
Patch4: opencv-missing_shebang.patch
Patch5: opencv-deprecated_conversion.patch
%description
The Open Computer Vision Library is a collection of algorithms and sample
code for various computer vision problems. The library is compatible with
IPL and utilizes Intel Integrated Performance Primitives for better
performance.
%package -n libopencv1
Summary: Open Computer Vision Library - Shared libraries
Group: System/Libraries
Requires: %{name} = %{version}
%description -n libopencv1
The Open Computer Vision Library is a collection of algorithms and sample
code for various computer vision problems. The library is compatible with
IPL and utilizes Intel Integrated Performance Primitives for better
performance.
This package contains the shared libraries.
%package devel
Summary: Open Computer Vision Library Development Package
Group: Development/Libraries/C and C++
Requires: libopencv1 = %{version}
Requires: glibc-devel glib2-devel gtk2-devel atk-devel pango-devel cairo-devel
Requires: fontconfig-devel freetype2-devel libexpat-devel glitz-devel libpng-devel
Requires: xorg-x11-devel xorg-x11-libxcb-devel xorg-x11-libXrender-devel
Requires: xorg-x11-libX11-devel xorg-x11-libXau-devel pcre-devel zlib-devel
Requires: libtiff-devel libjasper-devel libjpeg-devel
Requires: libdc1394_control12-devel libraw1394-devel
%description devel
This package contains all files needed to develop projects that use the Open
Computer Vision Library.
%package python
Summary: Open Computer Vision Library Python Bindings
Group: Development/Languages/Python
Requires: %{name} = %{version} python >= 2.5
%description python
Development files for Open Computer Vision Library for Python
%debug_package
%prep
%setup -q
%patch
%patch1
%patch2
%patch3
%patch4
%patch5
%build
%if %suse_version <= 1100
autoreconf -fi
%endif
export CFLAGS='%{optflags} -Wno-deprecated -fno-strict-aliasing'
export CXXFLAGS='%{optflags} -Wno-deprecated -fno-strict-aliasing'
%configure --with-1394libs --without-quicktime --with-swig
%{__make} %{?jobs:-j%jobs}
%install
%makeinstall
rm -f %{buildroot}%{py_sitedir}/%{name}/*.la
chmod +x %{buildroot}/usr/share/opencv/samples/c/build_all.sh
%clean
rm -rf "$RPM_BUILD_ROOT"
%post -n libopencv1 -p /sbin/ldconfig
%postun -n libopencv1 -p /sbin/ldconfig
%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL NEWS README THANKS TODO
%{_datadir}/opencv/haarcascades
%{_datadir}/opencv/readme.txt
%{_bindir}/*
%dir %{_datadir}/opencv
%files -n libopencv1
%defattr(-,root,root)
%{_libdir}/libcv.so.1
%{_libdir}/libcv.so.1.0.0
%{_libdir}/libcvaux.so.1
%{_libdir}/libcvaux.so.1.0.0
%{_libdir}/libcxcore.so.1
%{_libdir}/libcxcore.so.1.0.0
%{_libdir}/libhighgui.so.1
%{_libdir}/libhighgui.so.1.0.0
%{_libdir}/libml.so.1
%{_libdir}/libml.so.1.0.0
%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_datadir}/opencv/samples
%{_datadir}/opencv/doc
%{_libdir}/libcv.so
%{_libdir}/libcvaux.so
%{_libdir}/libcxcore.so
%{_libdir}/libhighgui.so
%{_libdir}/libml.so
%{_libdir}/*.la
%{_libdir}/libcvhaartraining.a
%{_libdir}/pkgconfig/opencv.pc
%files python
%defattr(-,root,root)
%{py_sitedir}/%{name}
%changelog
* Sun Sep 28 2008 - Andrea Florio <andrea@links2linux.de>
- packman porting
* Fri Jun 20 2008 pth@suse.de
- Repack with bzip2.
- Clean up Makefile.
- Move shared libraries to a subpackage named according to policy.
- Remove erroneous code.
- Use install-exec-hook instead of install-hook in Makefile.am
- Add missing return with value.
- Add a shebang to python sample script.
- Make build script for examples executable.