posaune
[projects.git] / doc / mbuild.8
1 .\" Manpage for mbuild.
2 .\" Contact mail@wagnertech.de to correct errors or typos.
3 .TH mbuild 8 "Jul 2018" GNU "WagnerTech Utilities"
4 .SH NAME
5 mbuild \- build system of WagnerTech UG
6 .SH SYNOPSIS
7 .B mbuild
8 .SH DESCRIPTION
9 .PP
10 mbuild provides a simple build system based on make, git, subversion. The build process
11 consists of 3 phases: configuration - compile - pack
12 .TP
13 configuration
14 is done by the
15 .B mconfigure
16 script. The configuration step has the following tasks:
17
18 Determination of version and build number. The version number can be set in a 
19 .B PAKET.changelog
20 file, can be set by the -v option of
21 .B mconfigure
22 or be set by the project itself in the
23 .B PAKET.prepare
24 script. The build number is always taken from the CM system: With SVN it is the global version number, with
25 GIT the build number is taken from the tag. On build a tag in the form project_version-build is expected. If not
26 present a tag in the form v_version-build is searched. Verion may be 0.0 if set elsewhere.
27
28 If a
29 .B PAKET.prepare
30 file is present in the debian directory, it is called.
31
32 If a
33 .B PAKET.build
34 file is present in the debian directory, it is called with a -prepare parameter (deprecated).
35 The current tree is rsync_ed to ~/build.
36
37 If a
38 .B PAKET.prebuild
39 file is present in the debian directory, it is called in the ~/build directory.
40
41 .TP
42 compile
43 To perform the compile step a
44 .B PAKET.build
45 script or a
46 .B PAKET.cmake
47 file is needed in the 
48 .B debian 
49 directory.
50 .TP
51 pack
52 To perform the pack step a
53 .B PAKET.cp
54 script and a
55 .B PAKET.control
56 file are needed in the debian directory. If pre/post installation scripts
57 are needed, these files must be also placed in the
58 .B debian 
59 directory.
60 .br
61 A standard copyright file is included. An user defined file can be used by copying it to debian/copyright
62 in the PAKET.prepare script.
63 .br
64
65 .SH FILES
66 .TP
67 PAKET.changelog
68 Example:
69 .br
70 projects (0.2-%BUILD%) unstable; urgency=medium
71   * Build in svn-Umgebung
72  -- Michael Wagner <michael@wagnertech.de>  Fr 10. Aug 22:54:48 CEST 2018
73 .TP
74 PAKET.prepare
75 Any executable script file executed in configure step
76 .TP
77 PAKET.prebuild
78 Any executable script file executed in configure step in the ../build directory
79 .TP
80 PAKET.build
81 Any executable script file executing the build in the ../build directory
82 .TP
83 PAKET.cmake
84 cmake file (CMakeLists.txt) for building C/C++ code. If a cross compile option is set in the mconfigure
85 script, according definitions are included.
86 .TP
87 PAKET.cp
88 An executable script file copying the artefacts to target paths preposed by $1:
89 .br
90 cp ../build/my_artefact $1/usr/bin/
91 .TP
92 PAKET.preinst PAKET.postint PAKET.prerm PAKET.postrm
93 Optional pre/post installation scripts
94 .TP
95 PAKET.control
96 Debian control file
97 .PP
98 These files are expected in a
99 .B debian
100 directory, placed below the projects main directory.
101 .SH SEE ALSO
102 make(1), mconfigure(1)
103 .SH BUGS
104 No known bugs.
105 .SH AUTHOR
106 Michael Wagner (michael@wagnertech.de)
107