OpenCV 2.4.2 took 6 hours to compile on the Raspberry Pi and I'd love to package everything up as a deb but I have never done that before. How can I package the compiled files so that they download or include the necessary other libraries?
I thought I would add a better answer for anyone else observing this thread.
So, if you've already gone through the trouble of building opencv on the device, you've probably followed the instructions here:
In which case, if you don't add the
-D args to dynamically override CMake parameters in step two and you instead just run
cmake .. inside the build directory (you created), it will generate a
If you edit the
CMakeCache.txt file, you can change:
...in addition to the other specified variables in the above opencv link. Instead of running
make install... just run
make package and the magic happens.
Warning: If you have
WITH_CUDA:BOOL=ON you may have dependency issues with the packager - and that's a totally different question...
For more info see the
CPACK_*_*:BOOL parameters in the cmake files, and consult the CPack documentation:
If by OpenCV you mean the computer vision libraries at http://opencv.willowgarage.com/ then they are already packaged for debian by the Debian Science Team.
Your best bet is to download the debianised source package from your nearest debian mirror, modify the debian/rules and/or Makefile or configure etc as needed to compile correctly on the raspberry pi and rebuild the packages.
The packaging work is already done, there's no need to do it again....and again and again every time your want to update them.
There's a whole bunch of binary packages, but libopencv-dev is probably what you want to start with http://packages.debian.org/search?keywords=libopencv-dev