Skip to content

Commit

Permalink
Add how-to-build-deb-package.md, adjust directory location.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samson-W committed Apr 13, 2020
1 parent 9d46f0a commit 2e66b44
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/configurations/build-simple-cdd-cfg/Readme
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This dir files is for build simple ccd.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This dir files is for build deb package. It's real dir is debian.
Original file line number Diff line number Diff line change
@@ -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="[email protected]"
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
```


0 comments on commit 2e66b44

Please sign in to comment.