summaryrefslogtreecommitdiff
path: root/docs/basics.md
blob: 6eafa9175eb9b117a2e5e3f410f21d1498388999 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Basic packaging

## Configuration files

All the commands in this guide assumes that you're using [these configuration
files](https://git.fluxo.info/?p=rhatto/dotfiles/debian.git;a=summary).

## Starting a new package

We use the `packages/` folder from this repo to store sources:

    mkdir packages/$package
    cd packages/$package

## Getting the debianized source

Using `dget`:

    dget $remote_dsc
    cd $package*

Using `apt-get`:

    apt-get source package

## Checking the source

See `checking.md`.

## Extracting the source

If needed, do this after your successfully verified the sources:

    dpkg-source -x *.dsc

## Getting dependencies

To get:

    apt-get build-dep package

To remove:

    hydractl remove-dep package

## Creating the `debian/` structure

If the package wasn't debianized, proceed with

    if [ ! -d "debian" ]; then
      dh_make -p ${package}_${version} --createorig
    fi

## Simple build

    dch -i
    dpkg-buildpackage -rfakeroot -sa -k$KEY_ID

## Creating a new debian source

    cd ..
    dpkg-source -b $package*
    debsign $package*.dsc

## Building and signing

To generate signatures, remove `-uc` and `-us` from `dpkg-buildpackage` (see
[Complete build](http://www.debian.org/doc/maint-guide/ch-build.pt-br.html#s-completebuild)):

    dpkg-buildpackage -rfakeroot

To sign using an specific key:

    dpkg-buildpackage -rfakeroot -kKEY_ID