.deb
Raspberry Pi용 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/*
, 후자는 버그처럼 느껴지지만).