Debian 包的一般约定格式

  1. <name>_<version>-<revision>_<architecture>.deb

For example

mkdir hello_1.0-1_arm64
mkdir -p hello_1.0-1_arm64/usr/local/bin
cp ~/YourProjects/Hello/hello hello_1.0-1_arm64/usr/local/bin
mkdir helloworld_1.0-1_arm64/DEBIAN
touch helloworld_1.0-1_arm64/DEBIAN/control

control格式

Package : the name of your program;
Version : the version of your program;
Architecture : the target architecture;
Maintainer : the name and the email address of the person in charge of the package maintenance;
Description : a brief description of the program.
Package: hello
Version: 1.0
Architecture: arm64
Maintainer: Internal Pointers <info@internalpointers.com>
Description: A program that greets you.
 You can add a longer description here. Mind the space at the beginning of this paragraph.

Build the deb package

dpkg-deb --build <helloworld_1.0-1_arm64>

error 处理

sudo mv /var/lib/dpkg/info/<packagename>.* /tmp/
sudo dpkg --remove --force-remove-reinstreq <packagename>

https://www.internalpointers.com/post/build-binary-deb-package-practical-guide
https://linuxconfig.org/easy-way-to-create-a-debian-package-and-local-package-repository