Skip to content

Commit e1c148b

Browse files
committed
debian: Declaring deps required only for docs/testing
debian: petter reminded about asciidoc required for man pages Rebased on master. Pointing to selective builds in d/configure docs: quick build instructions update debian: Declaring deps required only for docs/testing docs: rodw-au on building Debian packages debian: Adjusting d/{configure,control,rules.in} to rebase and review
1 parent 925ba1c commit e1c148b

File tree

5 files changed

+116
-44
lines changed

5 files changed

+116
-44
lines changed

debian/changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ linuxcnc (1:2.10.0~pre0) UNRELEASED; urgency=medium
88
depend on defaults passed by dpkg-buildflags on
99
Ubuntu and Debian (LP: #2104012)
1010

11+
[ Steffen Moeller ]
12+
* Introducing DEB_BUILD_OPTIONS to d/rules.
13+
1114
-- Pushkar Kulkarni <pushkar.kulkarni@canonical.com> Mon, 24 Mar 2025 20:50:08 +0530
1215

1316
linuxcnc (1:2.9.4-2) unstable; urgency=medium

debian/configure

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,25 @@ set -e
1414

1515
usage () {
1616
P=${0##*/}
17-
cat <<EOF
17+
cat 1>&2 <<EOF
1818
$P: Set up debian/ files to build for a particular kernel
1919
2020
Usage:
2121
$P [no-docs]
2222
2323
Extra options:
24-
no-docs
25-
Skip building documentation
24+
25+
no-docs|nodocs
26+
Skip building documentation.
27+
Debian packaging will not know about documentation to exist at all.
28+
If configured regularly but with the intent not to build the docs,
29+
run "DEB_BUILD_OPTIONS=nodocs dpkg-buildpackage".
30+
31+
sim|uspace|noauto
32+
Accepted for compatibility, but now ignored.
33+
34+
-h|--help|help
35+
Show this help.
2636
EOF
2737
}
2838

@@ -47,8 +57,12 @@ ENABLE_BUILD_DOCUMENTATION=--enable-build-documentation=pdf
4757
while test $# -ne 0; do
4858
case "$1" in
4959
sim|uspace|noauto) echo "$1 is accepted for compatibility, but ignored";;
50-
no-docs) unset ENABLE_BUILD_DOCUMENTATION ;;
51-
*) echo 1>&2 "Unknown option: $1"; exit 99 ;;
60+
help|-h|--help) usage; exit 0 ;;
61+
no-docs|nodocs) unset ENABLE_BUILD_DOCUMENTATION ;;
62+
*) echo 1>&2 "Unknown option: $1"
63+
echo 1>&2
64+
usage
65+
exit 99 ;;
5266
esac
5367
shift
5468
done
@@ -195,4 +209,15 @@ fi
195209

196210

197211
rm -f ../build-stamp
198-
echo "successfully configured for '$DISTRIB_NAME'.."
212+
echo "I: Successfully configured for '$DISTRIB_NAME'."
213+
214+
echo "I: You can now start the build of LinuxCNC Debian packages."
215+
echo " To build and test everything: fakeroot debian/rules binary"
216+
echo " To build the executables and man pages only: fakeroot debian/rules binary-arch"
217+
echo " To avoid tests: DEB_BUILD_OPTIONS=nocheck debian/rules binary"
218+
if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
219+
echo " To avoid documentation: DEB_BUILD_OPTIONS=nodocs fakeroot debian/rules binary"
220+
else
221+
echo " Building of documentation is disabled."
222+
fi
223+
echo " The DEB_BUILD_OPTIONS environment variable also works with dpkg-buildpackage."

debian/control.top.in

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ Build-Depends:
1212
@KERNEL_HEADERS@,
1313
@MODUTILS_DEPENDS@,
1414
@EXTRA_BUILD@,
15-
docbook-xsl,
15+
docbook-xsl <!nodocs>,
1616
asciidoc,
17-
ghostscript,
18-
groff-base,
19-
imagemagick,
20-
asciidoc-dblatex,
17+
ghostscript <!nodocs>,
18+
groff-base <!nodocs>,
19+
imagemagick <!nodocs>,
20+
asciidoc-dblatex <!nodocs>,
2121
autoconf,
2222
automake,
2323
bwidget (>= 1.7),
@@ -37,7 +37,7 @@ Build-Depends:
3737
libxmu-dev,
3838
netcat-traditional | netcat-openbsd | netcat,
3939
netpbm,
40-
po4a,
40+
po4a <!nodocs>,
4141
procps,
4242
psmisc,
4343
python3,
@@ -51,8 +51,10 @@ Build-Depends:
5151
yapps2
5252
Build-Depends-Indep:
5353
@DOC_DEPENDS@,
54-
Build-Conflicts: libjpeg8-dev, libtiff4-dev
55-
Standards-Version: 4.7.0
54+
Build-Conflicts-Arch:
55+
libjpeg8-dev,
56+
libtiff4-dev
57+
Standards-Version: 4.7.2
5658
Homepage: https://linuxcnc.org/
5759
Vcs-Browser: https://github.com/LinuxCNC/linuxcnc
5860
Vcs-Git: https://github.com/LinuxCNC/linuxcnc.git
@@ -72,23 +74,23 @@ Section: devel
7274
Description: PC based motion controller for real-time Linux
7375
LinuxCNC is a fully-realised CNC machine controller that can interpret
7476
machine-control programs (such as G-code), plan trajectories and finally
75-
output low-level signals to machine control hardware
77+
output low-level signals to machine control hardware.
7678
.
77-
LinuxCNC is modular and in principle the HAL (hardware abstraction layer),
78-
pluggable interpreters and variety of hardware drivers mean that it can
79-
control almost any software-defined physical system.
79+
LinuxCNC is modular, thus in principle its HAL (hardware abstraction
80+
layer) together with pluggable interpreters and variety of hardware
81+
drivers can control almost any software-defined physical system.
8082
.
8183
LinuxCNC relies on a realtime kernel to support real-time motion control,
82-
typically updating the position waypoints every 1mS and reacting to
83-
input within tens of microseconds.
84+
typically updating the position waypoints every millisecond and reacting
85+
to input within tens of microseconds.
8486
.
8587
Modules exist to use the low-level parts of LinuxCNC as a motion-control
8688
client for OpenPnP. Interfaces exist for ROS (the Robot Operating System)
8789
with which LinuxCNC has considerable overlap.
8890
.
8991
LinuxCNC supports arbitrary kinematics (the mapping between coordinate
90-
space and actuator space) and can control both parallel (eg Stewart
91-
platform) and serial (eg robot arm) systems in addition to conventional
92+
space and actuator space) and can control both parallel (e.g., Stewart
93+
platform) and serial (e.g., robot arm) systems in addition to conventional
9294
cartesian machine tools.
9395
.
9496
LinuxCNC supports 9 cartesian axes and 16 "Joints" (individual actuators)

debian/rules.in

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ export TIME=$(shell LANG=C date --date='@$(TIMESTAMP)' '+%T')
3232

3333
kernel_version = @KERNEL_VERSION@
3434
configure_realtime_arg = @CONFIGURE_REALTIME_ARG@
35+
ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
3536
enable_build_documentation = @ENABLE_BUILD_DOCUMENTATION@
37+
endif
3638
SRCDIR = $(CURDIR)/src
3739
DESTDIR=$(CURDIR)/debian/tmp
3840
DEV_PACKAGE_NAME=@MAIN_PACKAGE_NAME@-dev
@@ -55,18 +57,25 @@ override_dh_auto_build-arch:
5557
dh_auto_build -- build-software
5658

5759
override_dh_auto_build-indep:
60+
ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
5861
ifneq "$(enable_build_documentation)" ""
5962
dh_auto_build -- manpages
6063
dh_auto_build -- translateddocs
6164
dh_auto_build -- docs
6265
endif
66+
endif
6367

6468
override_dh_auto_clean:
6569
if [ -r src/Makefile.inc -a -r src/config.status ]; then \
6670
dh_auto_clean; \
6771
py3clean .; \
6872
fi
6973

74+
override_dh_auto_test:
75+
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
76+
dh_auto_test
77+
endif
78+
7079
override_dh_auto_install-arch:
7180
# Install all architecture-dependent libraries and executables
7281
# in DESTDIR (the staging dir for the main package).
@@ -79,6 +88,7 @@ override_dh_auto_install-arch:
7988
rm -f $(DESTDIR)/usr/share/doc/@MAIN_PACKAGE_NAME@/examples/sample-configs/*/*position*.txt
8089

8190
override_dh_installdocs-arch:
91+
ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
8292
# Sample configs go in `usr/share/doc/linuxcnc` (not `.../doc/@MAIN_PACKAGE_NAME@`)
8393
# because that's where the `linuxcnc` launcher script looks for them,
8494
# and that's inconvenient to change.
@@ -87,19 +97,21 @@ override_dh_installdocs-arch:
8797
mv debian/@MAIN_PACKAGE_NAME@/usr/share/doc/@MAIN_PACKAGE_NAME@/examples debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
8898

8999
dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@-dev
90-
100+
endif
91101

92102
override_dh_auto_install-indep:
103+
ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
93104
DESTDIR=$(DESTDIR) $(MAKE) -C src install-docs install-doc
94105
# Remove the docs we just built that we don't have debs for yet...
95106
rm -f $(DESTDIR)/usr/share/doc/linuxcnc/*_nb.pdf
107+
endif
96108

97109
override_dh_installdocs-indep:
110+
ifeq (,$(filter nodocs,$(DEB_BUILD_OPTIONS)))
98111
# The G-code quick reference html docs are built as `docs/html/${LANG}/gcode.html`.
99-
# We install them into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each
100-
# linuxcnc-doc-${LANG} package, then rename them there (except
101-
# for the English one) to include the language in the filename,
102-
# so they don't collide when we install all the doc debs.
112+
# We install them into `/usr/share/doc/@MAIN_PACKAGE_NAME@/` in each # linuxcnc-doc-${LANG} package,
113+
# then rename them there (except for the English one) to include the language in the filename,
114+
# so they do not collide when we install all the doc debs.
103115
#
104116
# Rename the "main" doc directories from
105117
# `usr/share/doc/@MAIN_PACKAGE_NAME@` to `usr/share/doc/linuxcnc`,
@@ -116,8 +128,10 @@ override_dh_installdocs-indep:
116128
$(RM) debian/tmp/usr/share/doc/linuxcnc/LinuxCNC_*_$$l.pdf; \
117129
done
118130
$(RM) debian/tmp/usr/share/doc/linuxcnc/*_es.adoc
119-
120-
131+
else
132+
# Avoiding error message because of examples
133+
$(RM) -fr debian/tmp/usr/share/doc/
134+
endif
121135

122136
override_dh_compress:
123137
dh_compress -X.pdf -X.txt -X.hal -X.ini -X.clp -X.var -X.nml -X.tbl -X.xml -Xsample-configs

0 commit comments

Comments
 (0)