You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

125 lines
4.4 KiB

10 years ago
##
## opencv.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2017 OpenPKG Foundation e.V. <http://openpkg.net/>
10 years ago
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# package version
%define V_opkg 3.4.0
%define V_dist 3.4.0-rc
10 years ago
# package information
Name: opencv
Summary: Computer Vision Library
URL: http://opencv.org/
Vendor: Intel, Willow Garage, Advanced Micro Devices, OpenCV Foundation, Itseez
Packager: OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class: EVAL
Group: Graphics
License: BSD
Version: %{V_opkg}
Release: 20171216
10 years ago
# list of sources
Source0: https://github.com/Itseez/opencv/archive/%{V_dist}.tar.gz
10 years ago
Patch0: opencv.patch
# build information
BuildPreReq: OpenPKG, openpkg >= 20160101, gcc, gcc::with_cxx = yes
PreReq: OpenPKG, openpkg >= 20160101
10 years ago
BuildPreReq: jpeg, png, zlib, tiff
PreReq: jpeg, png, zlib, tiff
Provides: OPENCV
10 years ago
%description
OpenCV (Open Source Computer Vision Library) is an open source
computer vision and machine learning software library. OpenCV
was built to provide a common infrastructure for computer vision
applications and to accelerate the use of machine perception in the
commercial products. OpenCV makes it easy for businesses to utilize
and modify the code. The library has more than 2500 optimized
algorithms, which includes a comprehensive set of both classic and
state-of-the-art computer vision and machine learning algorithms.
These algorithms can be used to detect and recognize faces, identify
objects, classify human actions in videos, track camera movements,
track moving objects, extract 3D models of objects, produce 3D point
clouds from stereo cameras, stitch images together to produce a
high resolution image of an entire scene, find similar images from
an image database, remove red eyes from images taken using flash,
follow eye movements, recognize scenery and establish markers to
overlay it with augmented reality, etc.
%track
prog opencv = {
version = %{V_dist}
10 years ago
url = https://github.com/Itseez/opencv/releases
regex = (__VER__)\.tar\.gz
}
%prep
%setup -q -n opencv-%{V_dist}
10 years ago
%patch -p0
%build
mkdir build
cd build
cmake \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INSTALL_PREFIX="%{l_prefix}" \
-DCMAKE_C_COMPILER="%{l_cc}" \
-DCMAKE_C_FLAGS="%{l_cflags} %{l_cppflags}" \
-DCMAKE_EXE_LINKER_FLAGS="%{l_ldflags}" \
-DCMAKE_CXX_COMPILER="%{l_cxx}" \
-DCMAKE_CXX_FLAGS="%{l_cxxflags}" \
-DBUILD_SHARED_LIBS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DBUILD_EXAMPLES=OFF \
-DINSTALL_TESTS=OFF \
-DINSTALL_C_EXAMPLES=OFF \
9 years ago
-DOPENCV_WARNINGS_ARE_ERRORS=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF \
-DWITH_LAPACK=OFF \
10 years ago
-DWITH_JASPER=OFF \
-DWITH_JPEG=ON \
-DWITH_PNG=ON \
-DWITH_TIFF=ON \
-DWITH_FFMPEG=OFF \
10 years ago
-DWITH_IPP=OFF \
-DWITH_GTK=OFF \
-DWITH_TBB=ON \
10 years ago
-DWITH_OPENEXR=OFF \
10 years ago
..
%{l_make} %{l_mflags}
%install
( cd build
%{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
) || exit $?
strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
%files -f files
%clean