-
Notifications
You must be signed in to change notification settings - Fork 23
/
README.debbuild
59 lines (37 loc) · 2.31 KB
/
README.debbuild
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
Debian package building
-----------------------
A debian package may be built using either dpkg-buildpackage or sbuild using the existing source/debian folder.
dpkg-buildpackage can be used on the target system, sbuild is useful when building for an alternate release.
Setup for building with dpkg-buildpackage
-----------------------------------------
You will need to setup your build environment and install the required dependencies to build.
sudo apt install fakeroot devscripts build-essential pkg-config
sudo apt install debhelper-compat dh-autoreconf autoconf automake libtool
sudo apt install libudev-dev libjson-c-dev libusb-1.0-0-dev
Building a debian package with dpkg-buildpackage
------------------------------------------------
You should be able to build a debian package from the source folder with dpkg-buildpackage.
Unpack the source archive into a clean folder, This is where your debian package will be built.
Open a terminal in the source folder and run the following command.
dpkg-buildpackage --sanitize-env --no-sign -b -rfakeroot
Setup for building with sbuild
------------------------------
If you are compiling for a different release of Debian (eg. Target = Debian 10, Compiling on Debian 11)
then you will need to setup an environment for sbuild and the chroot for the target system.
See https://wiki.debian.org/sbuild#Manual_setup_of_sbuild
sudo apt-get install sbuild schroot debootstrap apt-cacher-ng devscripts piuparts
sudo sbuild-adduser <username>
Once you have installed the dependencies and added your user to the sbuild group (.sbuildrc is optional)
then create a chroot for use with the sbuild command with sbuild-createchroot.
sudo sbuild-createchroot --include=eatmydata,ccache,gnupg buster /srv/chroot/buster-amd64-sbuild http://127.0.0.1:3142/deb.debian.org/debian
or
sudo sbuild-createchroot --include=eatmydata,ccache,gnupg bullseye /srv/chroot/bullseye-amd64-sbuild http://127.0.0.1:3142/deb.debian.org/debian
Building a debian package with sbuild
-------------------------------------
You should be able to build a debian package from the source folder with sbuild.
Unpack the source archive into a clean folder, This is where your debian package will be built.
Open a terminal in the source folder and run the following command.
sbuild -d buster
or
sbuild -d bullseye
<end>