Problematic installation of license files

asked 2020-06-23 04:03:37 -0500

This problem touches both OpenCV and debian package building.

I have a working process for building debian package for OpenCV 3.4.1, and now I want to build 3.4.10. I decided to use the /debian folder for 3.4.1 and modify it, if necessary. Unfortunately, Cmake for OpenCV has added new files, which cause failure. Specifically, the dh_install step fails:

dh_install -O--buildsystem=cmake --fail-missing
dh_install: usr/share/licenses/opencv3/protobuf-LICENSE exists in debian/tmp but is not installed to anywhere
dh_install: usr/share/licenses/opencv3/protobuf-README.md exists in debian/tmp but is not installed to anywhere
dh_install: usr/share/licenses/opencv3/SoftFloat-COPYING.txt exists in debian/tmp but is not installed to anywhere
...

In fact, these problematic files (mainly LICENSE) were not installed by cmake_install.cmake in version 3.4.1. My understanding is that I should override the dh_install part of debian/rules and either place these files somewhere (or delete them). Question is: where should these files go? Here is the current version of overide_dh_install that I am using:

override_dh_install:
# change install path of java library
sed -i -e "s@share\/OpenCV\/java\/@lib\/jni\/@g" \
    debian/tmp/usr/share/OpenCV/OpenCVModules-release.cmake

# put the static libs together with the rest of the stuff
for f in $$(ls obj-*/lib/libopencv_*.a); do \
    cp --verbose --preserve=mode $$f debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/; done

rm -rf debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/*_pch_dephelp.a

dh_install -O--buildsystem=cmake --fail-missing
edit retag flag offensive close merge delete