File: 75-makesh-gui.txt

package info (click to toggle)
debmake-doc 1.22-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 12,952 kB
  • sloc: makefile: 916; sh: 692; python: 202; ansic: 114; sed: 16
file content (80 lines) | stat: -rw-r--r-- 2,321 bytes parent folder | download
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
// vim:set filetype=asciidoc:
[[makefile-sh-gui]]
=== Makefile (shell, GUI)

Here is an example of creating a simple Debian package from a POSIX shell GUI program using the *Makefile* as its build system.

This upstream is based on "`<<makefile-sh>>`" with enhanced GUI support.

Let's assume its upstream tarball to be *debhello-1.2.tar.gz*.

Let's get the source and make the Debian package.

.Download *debhello-1.2.tar.gz*
----
include::../examples/debhello-1.2_build-1/step000.slog[]
----

Here, the *hello* has been re-written to use the *zenity* command to make this a GTK+ GUI program.

.*hello* (v=1.2)
----
include::../examples/debhello-1.2_build-1/step101.slog[]
----

Here, the desktop file is updated to be *Terminal=false* as a GUI program.

.*hello.desktop* (v=1.2)
----
include::../examples/debhello-1.2_build-1/step102.slog[]
----

All other files are the same as in "`<<makefile-sh>>`".

Let's package this with the *debmake* command.  Here, the "`**-b':sh'**`" option is used to specify that the generated binary package is a shell script.

----
include::../examples/debhello-1.2_build-1/step200.slog[lines=1..3]
 ...
include::../examples/debhello-1.2_build-1/step200.slog-sanity[]
 ...
----

Let's inspect the notable template files generated.

// .The source tree after the basic *debmake* execution. (v=1.2)
// ----
// include::../examples/debhello-1.2_build-1/step201.slog[]
// ----

.*debian/control* (template file, v=1.2):
----
include::../examples/debhello-1.2_build-1/step203.slog[]
----

Let's make this Debian package better as the maintainer.

.*debian/control* (maintainer version, v=1.2):
----
include::../examples/debhello-1.2_build-1/step302.slog[]
----

Please note the manually added *zenity* dependency.

The *debian/rules* file is exactly the same as the one in "`<<makefile-sh>>`".

There are several other template files under the *debian/* directory.  These also need to be updated.

.Template files under *debian/*. (v=1.2):
----
include::../examples/debhello-1.2_build-1/step400.slog[]
----

The rest of the packaging activities are practically the same as in "`<<makefile-sh>>`".

Here is the generated dependency list of *debhello_1.2-1_all.deb*.

.The generated dependency list of *debhello_1.2-1_all.deb*:
----
include::../examples/debhello-1.2_build-1/step702.slog[]
----