+.\" Manpage for mbuild.
+.\" Contact mail@wagnertech.de to correct errors or typos.
+.TH mbuild 7 "Jul 2018" GNU "WagnerTech Utilities"
+.SH NAME
+mbuild \- build system of WagnerTech UG
+.SH SYNOPSIS
+.B mbuild
+.SH DESCRIPTION
+.PP
+mbuild provides a simple build system based on make, git, subversion. The build process
+consists of 3 phases: configuration - compile - pack
+.TP
+configuration
+is done by the
+.B mconfigure
+script. The configuration step has the following tasks:
+
+Determination of version and build number. The version number can be set in a
+.B PAKET.changelog
+file, can be set by the -v option of
+.B mconfigure
+or be set by the project itself in the
+.B PAKET.prepare
+script. The build number is always taken from the CM system: With SVN it is the global version number, with
+GIT the build number is taken from the tag. On build a tag in the form project_version-build is expected. If not
+present a tag in the form v_version-build is searched. Verion may be 0.0 if set elsewhere.
+
+If a
+.B PAKET.prepare
+file is present in the debian directory, it is called.
+
+If a
+.B PAKET.build
+file is present in the debian directory, it is called with a -prepare parameter (deprecated).
+The current directory tree is rsync_ed to ~/build.
+
+If a
+.B PAKET.prebuild
+file is present in the debian directory, it is called in the ~/build directory.
+
+.TP
+compile
+To perform the compile step a
+.B PAKET.build
+script or a
+.B PAKET.cmake
+file is needed in the
+.B debian
+directory.
+.TP
+pack
+To perform the pack step a
+.B PAKET.cp
+script and a
+.B PAKET.control
+file are needed in the debian directory. If pre/post installation scripts
+are needed, these files must be also placed in the
+.B debian
+directory.
+
+A standard copyright file is included. An user defined file can be used by copying it to debian/copyright
+in the PAKET.prepare script.
+
+If files are present to be placed unter /etc a conffiles is creates to avoid changes made by the administrator.
+
+.SH FILES
+.TP
+PAKET.changelog
+Example:
+.br
+projects (0.2-%BUILD%) unstable; urgency=medium
+ * Build in svn-Umgebung
+ -- Michael Wagner <michael@wagnertech.de> Fr 10. Aug 22:54:48 CEST 2018
+.TP
+PAKET.prepare
+Any executable script file executed in configure step
+.TP
+PAKET.prebuild
+Any executable script file executed in configure step in the ../build directory
+.TP
+PAKET.build
+Any executable script file executing the build in the ../build directory
+.TP
+PAKET.cmake
+cmake file (CMakeLists.txt) for building C/C++ code. If a cross compile option is set in the mconfigure
+script, according definitions are included.
+.TP
+PAKET.cp
+An executable script file copying the artefacts to target paths preposed by $1:
+.br
+cp ../build/my_artefact $1/usr/bin/
+.TP
+PAKET.preinst PAKET.postint PAKET.prerm PAKET.postrm
+Optional pre/post installation scripts
+.TP
+PAKET.control
+Debian control file
+.PP
+These files are expected in a
+.B debian
+directory, placed below the projects main directory.
+.SH SEE ALSO
+make(1), mconfigure(1)
+.SH BUGS
+No known bugs.
+.SH AUTHOR
+Michael Wagner (michael@wagnertech.de)
+