aboutsummaryrefslogtreecommitdiff
path: root/deb.wiki
blob: d933ca7fb2c1878812ed09e7d75fcd891e738a6d (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
See also [[debian-pkg]]

All commands assume (unless otherwise noted) that PWD is the source
dir of the upstream code, and that there is a `debian` repo in that
directory.


- build-directory
    - _<pkgname>___<version>_.orig.tar.gz
    - extracted-dir
        - source files ...
        - `debian`

- _<pkgname>___<version>_-_<revision>___<arch>_.{build,buildinfo,changes,deb,dsc}

== debmake ==
Creates a new `debian` directory.

Assumes that
- that `$PWD` is `<pkgname>-<version>`
- than `$PWD/../<pkgname>_<version>.orig.tar.gz` exists

== debuild ==
Builds a pakage.
Runs `debian/rules build` to build package

{{{
sudo debuild --no-sign
}}}

== sections ==
https://packages.debian.org/stable/

== debian/watch ==
https://wiki.debian.org/debian/watch

Specifies where to look for an newer version.
By running `uscan`.

It should download `../${PKG}-${NEW-VERSION}.tar.gz`, and sets up some
symlinks for that debian might want.

From there, extract and move the `debian` folder to the new directory.

== Building ==
`debian/rules build` build the binaries, but not the package

apt install debmake build-dep tree

=== Build dependencies ===

`mk-build-deps` :: Generarer ett paket från `debian/control`, vilket
:: inte innehåller någonting, men beror på build-depends.
`dpkg --fix-broken install ./<pkgname>-build-deps_<version>-<pkgrel>_all.deb` ::
`apt install ./<pkgname>-build-deps_<version>-<pkgrel>_all.deb` ::
:: Installerar det lokala paketet, med beroenden
- # apt-get build-dep <pkgname>-build-deps_<version>-<pkgrel>_all.deb

=== Update changelog ===
==== Creates new entry with verssion number ====
> dch --newversion <version>-2.1
`-2` :: is debian package version, start at 2 to avoid lintian issue about [[https://wiki.debian.org/ITP|ITP]]
`.1` :: Shows that this is an [[https://www.debian.org/doc/manuals/developers-reference/pkgs.html#nmus-and-debian-changelog|NMU]], since we aren't a Debian maintainer

=== Figure out runtime dependencies ===

`objdump -p <build-binary> | grep NEEDED`

--------------------------------------------------

git-dch

== Reprepro ==
Cutom repo

=== Deb ===
{{{sh
reprepro -Vb /usr/net/repo/debian/ includedeb una <path-to-deb>
}}}

== Dsc ==
Also include relevant `.debian.tar.xz` and `.orig.tar.gz`.
{{{sh
reprepro -Vb /usr/net/repo/debian/ includedsc una <path-to-dsc>
}}}

== Build from Source ==

*TODO* hur får man tag i filerna? `apt source <paketnamn>`?

Stå in en katalog med
- *.debian.tar.xz
- *.dsc
- *.orig.tar.gz

- Kör `dpkg-source -x *.dsc`
- `cd <paketnamn>`
- `debuild`

== Om allting finns i repona ==
Se till att devscripts är installerat

- apt build-dep <pkgname>
- apt source <pkgname>
- cd <pkgname>-version
- debuild


== licensecheck ==
Possibly checks the debian/copyright file


== Other files ==
https://www.debian.org/doc/manuals/maint-guide/dother.en.html#install

== All lintian errors ==
https://lintian.debian.org/tags

== No signing ==
{{{
debuild -u -uc
}}}
builds without signing