rebuild-deb-from-src.md 1.48 KB
Newer Older
1 2 3 4 5 6 7
---
title: 'Rebuild Package from Source'
taxonomy:
    category:
        - docs
visible: true
---
8 9 10 11 12 13 14

 

 

NOTE: Currently a WIP (work in progress, some links might not work and some documentation is likely missing.)

15
### Rebuild a deb package from source
16 17 18

It’s simple to rebuild a deb package from their source code for your desktop install. The process is very easy.You can use apt to raze the package sources, next you have modify them as needed and after all you need the Debian tools. First we must to download the package source

19
```bash
20
root@parrot:~# apt-get source <pack-name>
21
```
22
and
23
```bash
24
root@parrot:~# cd <pack-name>
25
```
26
Now we must edit the package source code and make the changes needed to the source code of the package
27
```bash
28
root@parrot:~# nano examples/classic-format.c
29
```
30
After that the important is check for any build dependencies the package may have, so install any build dependencies if needed
31
```bash
32
root@parrot:~# apt install dh-autoreconf libnfc-dev libssl-dev
33
```
34
With the dependencies installed the next command is all it takes to build our new version
35
```bash
36
root@parrot:~# dpkg-buildpackage
37
```
38
When the build completes without errors you’ll be able to install it
39
```bash
40
root@parrot:~# dpkg -i ../<pack-name>.deb
41
```
42 43 44

&nbsp;

45
[Using Parrot](https://www.parrotsec.org/docs/info/start/) | [Troubleshooting](https://www.parrotsec.org/docs/trbl/start/) | [Linux Beginner Guide](https://www.parrotsec.org/docs/library/lbg-basics/) | [Home](https://www.parrotsec.org/docs/)