Add how-to-build-deb-package.md, adjust directory location.

This commit is contained in:
Samson-W 2020-04-14 02:31:29 +08:00
parent 9d46f0acd1
commit 2e66b441c3
5 changed files with 43 additions and 0 deletions

View File

@ -0,0 +1 @@
This dir files is for build simple ccd.

View File

@ -0,0 +1 @@
This dir files is for build deb package. It's real dir is debian.

View File

@ -0,0 +1,41 @@
# How to build the deb package
## Pre-install
```
sudo apt-get install build-essential dh-make debhelper lintian wget
```
## Config evc var for dh_make
```
$ cat >>~/.bashrc <<EOF
DEBEMAIL="samson@hardenedlinux.org"
DEBFULLNAME="Samson W"
export DEBEMAIL DEBFULLNAME
EOF
$ . ~/.bashrc
```
## Download realese
```
$ wget https://github.com/hardenedlinux/harbian-audit/archive/V0.4.1.tar.gz
$ tar zxvf V0.4.1.tar.gz
```
## Init and dh_make
```
~$ rm V0.4.0.tar.gz
~$ tar -czvf harbian-audit-0.4.1.tar.gz --exclude=.gitignore harbian-audit-0.4.1
~$ cd harbian-audit-0.4.1
~/harbian-audit-0.4.1$ dh_make -f ../harbian-audit-0.4.1.tar.gz
```
## Config files of debian dir
```
~/harbian-audit-0.4.1$ rm -rf debian
~/harbian-audit-0.4.1$ cp -r docs/configurations/debian-config-4-build-deb/debian/ debian
~/harbian-audit-0.4.1$ rm debian/Readme
```
## Build deb package
```
~/harbian-audit-0.4.1$ dpkg-buildpackage -us -uc
~/harbian-audit-0.4.1$ sha512sum ../harbianaudit_0.4.1-1_all.deb > ../harbianaudit_0.4.1-1_all.deb.sha512sum
```