.deb
我正在尝试为树莓派创建openCV 3.2 包。
我的control
文件是:
Source: opencv
Priority: optional
Maintainer: xxx <[email protected]>
Build-Depends: debhelper (>= 9), cmake
Standards-Version: 3.9.5
Section: libs
Homepage: <insert the upstream URL, if relevant>
#Vcs-Git: git://anonscm.debian.org/collab-maint/opencv.git
#Vcs-Browser: http://anonscm.debian.org/?p=collab-maint/opencv.git;a=summary
Package: opencv-dev
Section: libdevel
Architecture: any
Depends: opencv (= ${binary:Version}), ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
Package: opencv1
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: <insert up to 60 chars description>
<insert long description, indented with spaces>
我的opencv1.install
是:
usr/lib/lib*.so.*
我的rules
文件是:
#!/usr/bin/make -f
# See debhelper(7) (uncomment to enable)
# output every command that modifies files on the build system.
DH_VERBOSE = 1
export DH_OPTIONS=-v
# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/*
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk
# see FEATURE AREAS in dpkg-buildflags(1)
#export DEB_BUILD_MAINT_OPTIONS = hardening=+all
# see ENVIRONMENT in dpkg-buildflags(1)
# package maintainers to append CFLAGS
#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic
# package maintainers to append LDFLAGS
#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed
# main packaging script based on dh7 syntax
%:
dh $@ --buildsystem=cmake
# debmake generated override targets
# This is example for Cmake (See http://bugs.debian.org/641051 )
override_dh_auto_configure:
dh_auto_configure -- \
-D CMAKE_BUILD_TYPE=RELEASE \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON ..
override_dh_auto_test:
问题是当我执行以下命令时:
dpkg-buildpackage -us -uc --source-option=--include-binaries --source-option=-isession
它配置并构建 opencv 但当它尝试安装时,会输出以下错误:
make[1]: Leaving directory '/home/pi/debianizator/opencv-3.2.0/obj-arm-linux-gnueabihf'
cd /home/pi/debianizator/opencv-3.2.0
dh_install -O--buildsystem=cmake
cp --reflink=auto -a debian/tmp/usr/include/opencv debian/opencv-dev//usr/include/
cp --reflink=auto -a debian/tmp/usr/include/opencv2 debian/opencv-dev//usr/include/
dh_install: Cannot find (any matches for) "usr/lib/lib*.a" (tried in "." and "debian/tmp")
dh_install: opencv-dev missing files: usr/lib/lib*.a
dh_install: Cannot find (any matches for) "usr/share/pkgconfig/*" (tried in "." and "debian/tmp")
dh_install: opencv-dev missing files: usr/share/pkgconfig/*
dh_install: missing files, aborting
debian/rules:23: recipe for target 'binary' failed
make: *** [binary] Error 2
dpkg-buildpackage: fallo: fakeroot debian/rules binary devolvió un estado de salida de error 2
似乎没有找到静态库,事实上,如果我列出的话,tmp/lib
也没有静态库。这是内容debian/tmp/lib
libopencv_calib3d.so libopencv_objdetect.so.3.2.0
libopencv_calib3d.so.3.2 libopencv_photo.so
libopencv_calib3d.so.3.2.0 libopencv_photo.so.3.2
libopencv_core.so libopencv_photo.so.3.2.0
libopencv_core.so.3.2 libopencv_shape.so
libopencv_core.so.3.2.0 libopencv_shape.so.3.2
libopencv_features2d.so libopencv_shape.so.3.2.0
libopencv_features2d.so.3.2 libopencv_stitching.so
libopencv_features2d.so.3.2.0 libopencv_stitching.so.3.2
libopencv_flann.so libopencv_stitching.so.3.2.0
libopencv_flann.so.3.2 libopencv_superres.so
libopencv_flann.so.3.2.0 libopencv_superres.so.3.2
libopencv_highgui.so libopencv_superres.so.3.2.0
libopencv_highgui.so.3.2 libopencv_videoio.so
libopencv_highgui.so.3.2.0 libopencv_videoio.so.3.2
libopencv_imgcodecs.so libopencv_videoio.so.3.2.0
libopencv_imgcodecs.so.3.2 libopencv_video.so
libopencv_imgcodecs.so.3.2.0 libopencv_video.so.3.2
libopencv_imgproc.so libopencv_video.so.3.2.0
libopencv_imgproc.so.3.2 libopencv_videostab.so
libopencv_imgproc.so.3.2.0 libopencv_videostab.so.3.2
libopencv_ml.so libopencv_videostab.so.3.2.0
libopencv_ml.so.3.2 pkgconfig
libopencv_ml.so.3.2.0 python2.7
libopencv_objdetect.so python3.4
libopencv_objdetect.so.3.2
另一方面,我不知道为什么它尝试安装静态库,因为正如我在上面发布的那样,并opencv1.install
没有告诉必须安装静态库。
那么我该如何解决这个错误并生成一个.deb
?
答案1
您需要编辑debian/opencv-dev.install
和删除对不存在文件的引用(至少是usr/lib/lib*a.
和usr/share/pkg-config/*
,尽管后者感觉像是一个错误)。