![制作一个 deb 包,其中 dh 不构建程序](https://linux22.com/image/67074/%E5%88%B6%E4%BD%9C%E4%B8%80%E4%B8%AA%20deb%20%E5%8C%85%EF%BC%8C%E5%85%B6%E4%B8%AD%20dh%20%E4%B8%8D%E6%9E%84%E5%BB%BA%E7%A8%8B%E5%BA%8F.png)
我正在尝试使用 PBuilder 实用程序为我自己的应用程序制作 debian 包。我不能使用 dh,因为我的程序的构建过程非常具体。当我编译它时,我必须运行 qmake 而不是通常的“./configure”,然后 make。因此,我创建了自己的“规则”脚本,但是当我运行 pdebuild 时,它会编译文件并将其安装到所需的路径,但最终出现错误:
dpkg-genchanges: error: binary build with no binary artifacts found; cannot distribute
我的应用程序称为 Qtag,这是我的规则文件:
#!/usr/bin/make -f
clean:
cd src; qmake
cd src; make clean
rm -f src/qtag
rm -f src/Makefile
build:
cd src; qmake
cd src; make
build-arch: build
build-indep: build
binary-arch: build-arch
mkdir -p $$(pwd)/debian/qtag/usr/bin
cp src/qtag $$(pwd)/debian/qtag/usr/bin
binary-indep: build-indep
mkdir -p $$(pwd)/debian/qtag/usr/share/pixmaps
mkdir -p $$(pwd)/debian/qtag/usr/share/applications
cp src/images/Qtag.png $$(pwd)/debian/qtag/usr/share/pixmaps
cp src/qtag.desktop $$(pwd)/debian/qtag/usr/share/applications
binary: binary-arch binary-indep
这是我的“控制”文件:
Source: qtag
Section: unknown
Priority: optional
Maintainer: Karel Patlejch <[email protected]>
Build-Depends: debhelper (>= 9), qt5-default, libtag1-dev
Standards-Version: 3.9.5
Homepage: http://github.com/amethystant/qtag
Package: qtag
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}, libtag1-vanilla, libqt5core5a
Description: Audio tag editor
Qtag is a Qt-based audio tag editor. Supports ID3, Xiph Comments and more.
我使用 PBuilder 和 Debian 8
这是 pdebuild 的完整输出:https://drive.google.com/file/d/0B1mZWkkv-WWpMDBwbVNwRGV4ZVE/view?usp=sharing