Ubuntu system deb packaging method (graphical interface packaging, simple and practical, powerful)

foreword

The LAN source has been built before, and all preparations have been made. Now it is almost time to put the deb package on the source, but packaging is a difficult problem. It is necessary to control the package version, dependencies, output directory, etc., using traditional packaging tools The steps are cumbersome and the operation is difficult. After more than a month of research, I finally found a graphical packaging tool, which is easy to operate and powerful!

debreate software installation

debreate software introduction

Debreate is a graphical tool for creating Debian/Ubuntu packages. It provides an easy-to-use interface that helps you create and manage Debian/Ubuntu packages without manually writing Debian control files and other required files.

Debreate supports a variety of package types, including .deb, .rpm, .tar.gz, and .tar.bz2, etc. It also provides many advanced features such as custom scripts, dependency management, file and directory management, etc.

With Debreate, you can easily create and manage Debian/Ubuntu packages without deep knowledge of Debian control files and other required files. It is a very useful tool especially for developers and system administrators who need to frequently create and manage Debian/Ubuntu packages.

Software download address https://github.com/debreate/debreate/tree/v0.8-dev9

Installation Environment

Ubuntu22.04

Install pre-dependencies

1. According to official documents, the following environment is required

insert image description here

2. Installpython3.10

sudo apt update
sudo apt install python3.10 python3.10-dev

Check if python is installed successfully

python3 --version

insert image description here

3. InstallwxPython

sudo apt install python3-wxgtk4.0

Check whether wxpython is installed successfully

python3 -c "import wx; print(wx.version())"

insert image description here

4. Installfakeroot

sudo apt install fakeroot

5. Installlintian

sudo apt install lintian

insert image description here

installation method

1. Download the software to the specified directory and unzip it

unzip debreate-0.8-dev9.zip

insert image description here

2. Enter the decompressed directory and runinit.py

cd debreate-0.8-dev9
./init.py

insert image description here

3. The software runs successfully

insert image description here

Use debreate to package the deb package

Reference blog https://blog.csdn.net/qq_35977139/article/details/126153655

Take qcef as an example

1. The content of the file that needs to be packaged

insert image description here

2. Open the debreate software and set the basic control information

insert image description here

3. Set dependency information on the next page, you can set the dependencies required to install the deb package (not used for now)

insert image description here

4. On the next page, set the file content required for packaging, and specify the directory after installation

The installation directory rules here are specified as follows
lib -> /usr/local/lib/qcef
qcefinclude -> /usr/local/include/qcef
resources -> /usr/local/lib/qcef

insert image description here

5. Set the script that needs to be executed before or after packaging

insert image description here

6. There are some other functions to choose according to the needs, which are not used here for the time being, and go all the way to the final build page
insert image description here

7. Select the path to store the packaged deb package and start building

insert image description here

Successfully packaged

Guess you like

Origin blog.csdn.net/QAZ600888/article/details/130879158