Differences in Revisions: Layout

Removed DokuWiki NOTRANS keyword & fix formatting & fix table
~~NOTRANS~~
# Layout
 
## NM file layout
======= NM file layout =======
 
The NM files contain all needed information to build and provide packages with the pakfire builder.
 
The file extension nm has some historical reasons. In the past the build system wasn't directly integrated into pakfire. It was shipped as a stand allone system called "Naoki" and NM stands for Naoki Makefile. After integration of Naoki into pakfire, to share code we decided to keep the old nm extension.
 
======= Overview =======
 
## Overview
Every NM file is splitted into tree seperate parts or blocks, which contain a lot of Basic, Build and Packaging information.
 
| | | |
|---|---|---|
| [![](/icons/edit-find-replace.png)](/../devel/pakfire/layout/header) | [Header](/../devel/pakfire/layout/header) |The Header contains all basic information about a package. |
| [![](/icons/edit-find-replace.png)](/../devel/pakfire/layout/header) | [Header](/../devel/pakfire/layout/header) |The Header contains all basic information about a package |
| [![](/icons/preferences-system.png)](/../devel/pakfire/layout/build) | [Build](/../devel/pakfire/layout/build) |This part contains build information and commands. |
| [![](/icons/preferences-system.png)](/../devel/pakfire/layout/build) | [Build](/../devel/pakfire/layout/build) |This part contains build information and commands |
| [![](/icons/drive-optical.png)](/../devel/pakfire/layout/packages) | [Packages](/../devel/pakfire/layout/packages) |This section contains everything to generate the final packages. |
| [![](/icons/drive-optical.png)](/../devel/pakfire/layout/packages) | [Packages](/../devel/pakfire/layout/packages) | This section contains everything to generate the final packages |
 
A typically NM file looks like the following example.
A typically NM file looks like the following example:
 
```
###############################################################################
# IPFire.org - An Open Source Firewall Solution #
# Copyright (C) - IPFire Development Team <info@ipfire.org> #
###############################################################################
 
name = flex
version = 2.5.35
release = 3
 
groups = Development/Tools
url = http://flex.sourceforge.net/
license = BSD
summary = A tool for creating scanners (text pattern recognizers).
 
description
The flex program generates scanners. Scanners are programs which can \
recognize lexical patterns in text. Flex takes pairs of regular \
expressions and C code as input and generates a C source file as \
output. The output file is compiled and linked with a library to \
produce an executable. The executable searches through its input for \
occurrences of the regular expressions. When a match is found, it \
executes the corresponding C code. Flex was designed to work with \
both Yacc and Bison, and is used by many programs as part of their \
build process.
end
 
source_dl =
sources = %{thisapp}.tar.bz2
 
build
requires
`bison`
bison
`gcc-c++`
gcc-c++
`m4`
m4
end
 
keep_libraries = /usr/lib/libfl_pic.a
 
configure_options += \
`--mandir=/usr/share/man`
--mandir=/usr/share/man
 
test
`make check`
make check
end
 
install_cmds
`echo "#!/bin/sh" > %{BUILDROOT}/usr/bin/lex`
echo "#!/bin/sh" > %{BUILDROOT}/usr/bin/lex
`echo "exec /usr/bin/flex -l \"$$@\"" >> %{BUILDROOT}/usr/bin/lex`
echo "exec /usr/bin/flex -l \"$$@\"" >> %{BUILDROOT}/usr/bin/lex
`chmod 755 %{BUILDROOT}/usr/bin/lex`
chmod 755 %{BUILDROOT}/usr/bin/lex
end
end
 
packages
package %{name}
`requires = m4`
requires = m4
end
 
package %{name}-devel
`template DEVEL`
template DEVEL
end
end
```