forked from openkylin/docs
rename en/Community-Developer-Guides/OpenKylin_Packaging_Guide.md
Signed-off-by: wucaiheng <11866284+wucaiheng@user.noreply.gitee.com>
This commit is contained in:
parent
eb02af40ce
commit
6c8cc5e51c
|
@ -50,8 +50,8 @@ Before using this document to create a DEB package, it is recommended that you b
|
|||
|
||||
| | skill | | links |
|
||||
|---|-------------------|------|-------------------------------------------------------------------------|
|
||||
| 1 | Debian policy document | required | https://www.debian.org/doc/debian-policy/ |
|
||||
| 2 | Debian Maintainer's Guide | required | see the https://www.debian.org/doc/manuals/debmake-doc/index.zh-cn.html |
|
||||
| 1 | Debian policy document | required | https://www.Debian.org/doc/Debian-policy/ |
|
||||
| 2 | Debian Maintainer's Guide | required | see the https://www.Debian.org/doc/manuals/debmake-doc/index.zh-cn.html |
|
||||
|
||||
**1.3. Associated Documents**
|
||||
|
||||
|
@ -92,7 +92,7 @@ Each operating system is self-contained, and apart from different technical rout
|
|||
|
||||
The main differences focus on the following aspects:
|
||||
|
||||
(1) Different package managers (fedora, openSUSE use rpm, debian use deb, etc.).
|
||||
(1) Different package managers (fedora, openSUSE use rpm, Debian use deb, etc.).
|
||||
|
||||
(2) Maintain different package lists, including different software versions.
|
||||
|
||||
|
@ -111,7 +111,7 @@ A very popular installation package. Perhaps in the near future, if deb, apt and
|
|||
|
||||
openKylin has its own collection of software lists, and currently has integrated 1000+ software packages, which are still being enriched and improved.
|
||||
|
||||
The software code source of openKylin is directly taken from the stable version of the original software community, and the debian/\* rule files are written and integrated according to this packaging specification.
|
||||
The software code source of openKylin is directly taken from the stable version of the original software community, and the Debian/\* rule files are written and integrated according to this packaging specification.
|
||||
|
||||
openKylin follows the Upstream First principle.
|
||||
|
||||
|
@ -164,7 +164,7 @@ and upgrade. The entire test process should be completed in accordance with the
|
|||
|
||||
- upgrade packages from the previous version;
|
||||
|
||||
- downgrade package to previous version (optional);
|
||||
- Downgrading the package to the previous version (optional);
|
||||
|
||||
- completely remove the package;
|
||||
|
||||
|
@ -202,7 +202,7 @@ Rules and norms are a process of gradual improvement, and it is necessary to ens
|
|||
|
||||
- Integrate open source software without legal risks, [Open Source License Directory](https://gitee.com/link?target=https://opensource.org/licenses/alphabetical).
|
||||
|
||||
- The content of the debian directory file should be adapted to openKylin and be correct, accurate, clear and concise. If you cite content from other releases, or from the original community, you must explain it at the top.
|
||||
- The content of the Debian directory file should be adapted to openKylin and be correct, accurate, clear and concise. If you cite content from other releases, or from the original community, you must explain it at the top.
|
||||
|
||||
- Software **must not** be imported if it exists in **Blacklist**.
|
||||
|
||||
|
@ -217,9 +217,9 @@ Rules and norms are a process of gradual improvement, and it is necessary to ens
|
|||
|
||||
- The splitting of the software needs to be implemented in accordance with the openKylin software splitting rules.
|
||||
|
||||
- Create corresponding binary package entries in the **debian/control** file for all binary packages.
|
||||
- Create corresponding binary package entries in the **Debian/control** file for all binary packages.
|
||||
|
||||
- list all file paths in the corresponding **debian/binarypackagename.install** file
|
||||
- list all file paths in the corresponding **Debian/binarypackagename.install** file
|
||||
|
||||
**4.4. Naming rules**
|
||||
|
||||
|
@ -257,7 +257,7 @@ Get started, which contains some tutorial text. You must remove or modify such c
|
|||
|
||||
Among the generated template files, the following files are very important:
|
||||
|
||||
- **debian/changelog**
|
||||
- **Debian/changelog**
|
||||
The file records the history of the package and defines the version of the upstream package and openKylin on its first line
|
||||
revision. All changes should be documented in a clear, formal and concise language style.
|
||||
|
||||
|
@ -313,7 +313,7 @@ When your program replaces some files in other packages, or completely replaces
|
|||
|
||||
**4.7. Compile and Build**
|
||||
|
||||
- **debian/rules**
|
||||
- **Debian/rules**
|
||||
The script repackages the upstream build system to compile the source code files and install the files into
|
||||
\*\*\$(DESTDIR), \*\* and store the generated files in each **deb** binary package file.
|
||||
|
||||
|
@ -326,7 +326,7 @@ When your program replaces some files in other packages, or completely replaces
|
|||
|
||||
- Do not embed timestamps based on system time.
|
||||
|
||||
- Use "**dh \$@**" in **debian/rules** to apply the latest **debhelper** features.
|
||||
- Use "**dh \$@**" in **Debian/rules** to apply the latest **debhelper** features.
|
||||
|
||||
- Export the environment variable "**LC_ALL=C.UTF-8**" in the build environment.
|
||||
|
||||
|
@ -432,7 +432,7 @@ Among them, debmake is used to generate debianized template files, and the speci
|
|||
|
||||
7 directories, 19 files
|
||||
|
||||
The **debian/rules** files here are build scripts that should be provided by the package maintainer. At this point the file is created by
|
||||
The **Debian/rules** files here are build scripts that should be provided by the package maintainer. At this point the file is created by
|
||||
Template files generated by the **debmake** command.
|
||||
|
||||
**5.3. Edit template file**
|
||||
|
@ -441,7 +441,7 @@ As a maintainer, making a proper Debian package will of course require some manu
|
|||
|
||||
In order to make the installation file part of the system file, **\$(prefix)** default in **Makefile**
|
||||
The value of **/usr/local** needs to be overridden to **/usr**. To do this, follow the method given below, in the
|
||||
Add the file named **override_dh_auto_install** to the **debian/rules** file
|
||||
Add the file named **override_dh_auto_install** to the **Debian/rules** file
|
||||
target, set "**prefix=/usr**" in it.
|
||||
|
||||
**debian/rules (maintainer version): .**
|
||||
|
@ -465,7 +465,7 @@ override_dh_auto_install:
|
|||
```
|
||||
|
||||
|
||||
Exporting the =**DH_VERBOSE** environment variable in the **debian/rules** file as above can force **debhelper**
|
||||
Exporting the =**DH_VERBOSE** environment variable in the **Debian/rules** file as above can force **debhelper**
|
||||
The tool outputs fine-grained build reports.
|
||||
|
||||
Export **DEB_BUILD_MAINT_OPTION** variable as above can be as **dpkg-buildflags**
|
||||
|
@ -478,13 +478,13 @@ Export **DEB_LDFLAGS_MAINT_APPEND** as above
|
|||
It is possible to force the linker to only link against the libraries that are really needed.
|
||||
|
||||
For Makefile-based build systems, **dh_auto_install**
|
||||
What the command does is basically "**\$(MAKE) install DESTDIR=debian/debhello**". created here
|
||||
What the command does is basically "**\$(MAKE) install DESTDIR=Debian/debhello**". created here
|
||||
The **override_dh_auto_install** target modifies its behavior to "**\$(MAKE) install
|
||||
DESTDIR=debian/debhello prefix=/usr**".
|
||||
DESTDIR=Debian/debhello prefix=/usr**".
|
||||
|
||||
Here are the maintainer versions of the **debian/control** and **debian/copyright** files.
|
||||
Here are the maintainer versions of the **Debian/control** and **Debian/copyright** files.
|
||||
|
||||
**debian/control (maintainer version): .**
|
||||
**Debian/control (maintainer version): .**
|
||||
|
||||
|
||||
```
|
||||
|
@ -510,7 +510,7 @@ Description: Simple packaging example for debmake
|
|||
```
|
||||
|
||||
|
||||
in **debian/**
|
||||
in **Debian/**
|
||||
There are some other template files in the directory. Depending on the scenario, they also need to be updated. The package can then be built.
|
||||
|
||||
**5.4. Building packages with debuild**
|
Loading…
Reference in New Issue