packaging_guide.md 1.04 KB
Newer Older
isaagar's avatar
isaagar committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
#  `Hamara Packaging Guide`

## A. Building existing package

## 1. Setting up environment
Enable source repositories in `/etc/apt/sources.list`


```
# apt-get install devscripts
```

## 2. Getting source files of package
```
$ apt-get source <package-name>
```
You can also get source files by `.dsc` file link
```
$ dget -xu <link-to-package>.dsc
```
Now , change to packaging directory
```
$ cd <package-name>
```

## 3. Installing package dependencies

Run following command for installing dependencies
```
# apt-get dep <package-name>
```
Manually checking package dependencies by changing to the package directory which contains `debian` directory
```
$ dpkg-checkbuilddeps
```

## 4. Building package
To build package , change to the directory containing `debian` directory and run
```
$ dpkg-buildpackage -us -uc
```
You will get the output files in the parent directory.

isaagar's avatar
isaagar committed
44 45 46
---
**For more info , read official documentation at**
> https://wiki.debian.org/BuildingTutorial
isaagar's avatar
isaagar committed
47 48


isaagar's avatar
isaagar committed
49
> https://wiki.debian.org/IntroDebianPackaging
isaagar's avatar
isaagar committed
50 51


isaagar's avatar
isaagar committed
52
> https://wiki.debian.org/Packaging