Skip to content

Commit

Permalink
Rework debian/configure: fixes machinekit#215
Browse files Browse the repository at this point in the history
(This commit best read using 'git show -C')

The source configuration script needs to be runnable even in
environments where package build dependencies are absent.

Because people building packages ought to know what they're doing, the
checks for build deps are removed, and all configuration now comes
from the command line.  After all, builds will fail with meaningful
errors if build dependencies aren't met.

An assumption made is that Xenomai (and RTAI, someday) kernel packages
follow upstream Debian package naming.  The way those are set up, it's
reasonably easy to generate the right header directory path,
Build-Depends:, and Depends:.  The only tricky part is the kernel
'flavour' is included in the package name, which requires some arch
hardcoding hackery to otherwise avoid great complication; the hope
here is that the list of architectures won't change often.

The result is the Universal Build builds against possibly multiple
kernel versions, and the Debian packaging builds one kmodule flaver
package for each.

By default, all threads are disabled; package builders MUST enable
thread package builds by adding flags to the debin/configure command
line.  See `debian/configure -h` for details.

Because the package needs the debian/configure script to run, it must
be format '3.0 (quilt)'; native format breaks the debian/configure
script's customizations.

Summary of changes:
- Simplify debian/configure structure
  - Command-line args correspond directly to per-flavor config functions
  - All configs for a flavor go into one simple function
  - Just a few small helper utilities
- Enable multiple, per-kernel version module pkgs per kthreads flavor
- All/any flavors may be enabled or disabled
- Rename non-template *.files.in to *.files
- Add usage() function
- Convert package to 3.0 (quilt) format
- Update .gitignore
- Bonus:  compress source package .orig tarball with bz2 by default
  • Loading branch information
zultron committed Jun 11, 2014
1 parent a5bbd03 commit 9e6c296
Show file tree
Hide file tree
Showing 18 changed files with 310 additions and 196 deletions.
36 changes: 14 additions & 22 deletions debian/.gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,14 @@
files
control
rules
tmp
linuxcnc-rtai.files
linuxcnc-xenomai.files
linuxcnc-rtpreempt.files
linuxcnc-xenomai-kernel.files
linuxcnc-doc-en.files
linuxcnc-doc-es.files
linuxcnc-doc-fr.files
linuxcnc
linuxcnc-dev
linuxcnc-doc-*/
linuxcnc-posix/
linuxcnc-rtai/
linuxcnc-rtpreempt/
linuxcnc-xenomai/
linuxcnc-xenomai-kernel/
*substvars
*.debhelper
shlibs.local
# files generated from debian/configure
/control
/rules
/linuxcnc-rtai-kernel-*.files
/linuxcnc-xenomai-kernel-*.files

# directory artifacts
/tmp
/linuxcnc*/

# file artifacts
/*substvars
/*.debhelper
/shlibs.local
11 changes: 11 additions & 0 deletions debian/README.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
This Debian packaging must first be configured before building.

By default, all threads are disabled; package builders MUST enable
thread package builds by adding flags to the debin/configure command
line. See `debian/configure -h` for details.

Xenomai and RTAI kernel threads packages may be enabled with the '-X
<Xenomai-kernel-version>' and '-R <RTAI-kernel-version>' options,
respectively, e.g. '-X 3.8-1mk-xenomai.x86-686-pae'. Multiple
'-X'/'-R' options may be specified to build multiple kernel threads
packages against multiple kernels.
Loading

0 comments on commit 9e6c296

Please sign in to comment.