milis/talimatname/genel/o/opencv/talimat

60 lines
1.8 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tanım: OpenCV (Açık Kaynaklı Bilgisayar Vizyon Kütüphanesi) açık kaynaklı bir bilgisayar görme ve makine öğrenme yazılımı kütüphanesi.
# URL: http://opencv.org/
# Paketçi: milisarge
# Gerekler: libjpeg-turbo libtiff jasper libpng ffmpeg28 gstreamer xine-lib v4l-utils xorg-mesa python3-numpy python-numpy gtkglext libgphoto2
_pybin=python2
_pydir=python2.7
name=opencv
version=3.3.0
release=2
source=(http://downloads.sourceforge.net/opencvlibrary/$name-$version.zip
https://raw.githubusercontent.com/opencv/opencv_3rdparty/a62e20676a60ee0ad6581e217fe7e4bada3b95db/ippicv/ippicv_2017u2_lnx_intel64_20170418.tgz
https://github.com/opencv/opencv_contrib/archive/$version.tar.gz::opencv_contrib-$version.tar.gz)
derle() {
cd $name-$version
ipp_surum=ippicv_2017u2_lnx_intel64_20170418.tgz
ipp_file=$DERLEME_KAYNAKDIZIN/$ipp_surum &&
ipp_hash=$(md5sum $ipp_file | cut -d" " -f1) &&
ipp_dir=.cache/ippicv &&
mkdir -p $ipp_dir &&
cp $ipp_file $ipp_dir/$ipp_hash-$ipp_surum
mkdir build
cd build
cmake -D WITH_OPENCL=ON \
-DWITH_OPENGL=ON \
-DWITH_TBB=ON \
-DWITH_XINE=ON \
-DWITH_GSTREAMER=OFF \
-DBUILD_WITH_DEBUG_INFO=OFF \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DBUILD_EXAMPLES=ON \
-DINSTALL_C_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_SKIP_RPATH=ON \
-DOPENCV_EXTRA_MODULES_PATH="$SRC/opencv_contrib-$version/modules" \
..
make
make DESTDIR=$PKG install
cd "$PKG/usr/share"
if [[ -d OpenCV/samples ]]; then
mv OpenCV/samples "$SRC/$name-samples"
mv OpenCV $name #dizini ismi tutarlı olması için
elif [[ ! -d OpenCV ]]; then
echo "Dizin adlandırma hatası!"
fi
}