Skip to content

Commit 30fdb85

Browse files
committed
Move all task from debian/configure into normal debian/* files
Using the 'nodoc' Debian package profile and build option to control the creation of documentation packages. Updated minmum debhelper compat level from 9 to 10, matching the level in Debian Buster. Drop code to set higher compat level on newer versions of Debian. Uses versioned alternative depends to control the readline and texlive-xetex build dependency. Updated all build scripts and documentation to reflect that the debian/configure script is obsolete.
1 parent 6a8f387 commit 30fdb85

File tree

11 files changed

+468
-231
lines changed

11 files changed

+468
-231
lines changed

debian/.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
linuxcnc-uspace
22
files
3-
rules
4-
compat
5-
control
63
tmp
74
linuxcnc
85
linuxcnc-dev
@@ -16,9 +13,7 @@ linuxcnc-uspace.manpages
1613

1714
*.debhelper
1815
shlibs.local
19-
linuxcnc-uspace.lintian-overrides
2016

2117
autoreconf.after
2218
autoreconf.before
2319
debhelper-build-stamp
24-

debian/compat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10

debian/configure

Lines changed: 9 additions & 143 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,11 @@ set -e
1414

1515
usage () {
1616
P=${0##*/}
17-
cat 1>&2 <<EOF
18-
$P: Set up debian/ files to build for a particular kernel
17+
cat <<EOF
18+
$P: Obsolete script to set up debian/ files to build for a particular kernel
1919
2020
Usage:
21-
$P [no-docs]
22-
23-
Extra options:
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.
21+
$P
3622
EOF
3723
}
3824

@@ -43,11 +29,7 @@ if [ "$1" == "-h" ] || [ "$1" == "-help" ] || [ "$1" == "--help" ]; then
4329
exit 0
4430
fi
4531

46-
EXTRA_BUILD=
47-
PYTHON_VERSION_NEXT=$(python3 -c 'import sys; print (sys.version[:2] + str(1+int(sys.version[2])))')
48-
LIBREADLINE_DEV="libeditreadline-dev | libreadline-gplv2-dev | libreadline-dev"
49-
50-
ENABLE_BUILD_DOCUMENTATION=--enable-build-documentation=pdf
32+
ENABLE_BUILD_DOCUMENTATION=yes
5133

5234
# Specialize these based on DISTRIB_NAME as needed
5335
# These do not run-time depend on a specific package because
@@ -83,131 +65,15 @@ elif [ -f /etc/lsb-release ]; then
8365
DISTRIB_NAME=$DISTRIB_ID-$DISTRIB_RELEASE
8466
fi
8567

86-
if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
87-
DOC_DEPENDS="dblatex (>= 0.2.12),\n dvipng,\n fonts-dejavu,\n graphviz,\n groff,\n inkscape,\n python3-lxml,\n source-highlight,\n texlive-extra-utils,\n texlive-font-utils,\n texlive-fonts-recommended,\n texlive-lang-cyrillic,\n texlive-lang-european,\n texlive-lang-french,\n texlive-lang-german,\n texlive-lang-polish,\n texlive-lang-spanish,\n texlive-latex-recommended,\n w3c-linkchecker,\n xsltproc"
88-
89-
90-
case $DISTRIB_NAME in
91-
Debian-9)
92-
;; # No xetex in Debian 9 Stretch
93-
*)
94-
# Not quite sure which packages is needed for xetex, but
95-
# texlive-xetex seem like a safe choice. Need xetex to be
96-
# able to build Chinese PDF.
97-
DOC_DEPENDS="$DOC_DEPENDS,\n texlive-xetex"
98-
;;
99-
esac
100-
else
101-
DOC_DEPENDS=''
102-
fi
103-
104-
MODUTILS_DEPENDS=kmod
105-
PYTHON_PACKAGING_DEPENDS=dh-python
106-
PYTHON_GST=python3-gst-1.0,gstreamer1.0-plugins-base
107-
TCLTK_VERSION=8.6
108-
PYTHON_IMAGING=python3-pil
109-
PYTHON_IMAGING_TK=python3-pil.imagetk
110-
QTVCP_DEPENDS="python3-pyqt5,\n python3-pyqt5.qsci,\n python3-pyqt5.qtsvg,\n python3-pyqt5.qtopengl,\n python3-opencv,\n python3-dbus,\n python3-espeak,\n python3-dbus.mainloop.pyqt5,\n python3-pyqt5.qtwebengine,\n espeak-ng,\n pyqt5-dev-tools,\n gstreamer1.0-tools,\n espeak,\n sound-theme-freedesktop,\n python3-poppler-qt5"
111-
YAPPS_RUNTIME="python3-yapps"
112-
DEBHELPER="debhelper (>= 12)"
113-
COMPAT="12"
114-
115-
case $DISTRIB_NAME in
116-
Ubuntu-25.*|Ubuntu-24.*|Ubuntu-21.*|Debian-11|Debian-11.*|Debian-12|Debian-12.*|Debian-13|Debian-13.*|Debian-testing|Debian-unstable)
117-
LIBREADLINE_DEV=libeditreadline-dev
118-
COMPAT=""
119-
DEBHELPER="debhelper-compat (= 13)"
120-
;;
121-
Ubuntu-20.*)
122-
;;
123-
Debian-10|Debian-10.*|Raspbian-10|Raspbian-10.*)
124-
;;
125-
*)
126-
echo "unknown distribution: $DISTRIB_NAME"
127-
echo "detected dependencies may be incomplete or wrong"
128-
echo "please consider fixing it and submitting a pull request"
129-
;;
130-
esac
131-
132-
TARGET=uspace
133-
EXTRA_RECOMMENDS=hostmot2-firmware-all
134-
MODULE_PATH=usr/lib/linuxcnc/modules
135-
MODULE_EXT=.so
136-
KERNEL_DEPENDS=libudev-dev,iptables
137-
KERNEL_DEPENDS_BUILD=libudev-dev
138-
KERNEL_HEADERS=
139-
KERNEL_VERSION=uspace
140-
MODUTILS_DEPENDS=
141-
if false; then
142-
MAIN_PACKAGE_NAME=linuxcnc
143-
OTHER_MAIN_PACKAGE_NAME=linuxcnc-uspace
144-
else
14568
DISTRIB_NAME=uspace-$DISTRIB_NAME
146-
MAIN_PACKAGE_NAME=linuxcnc-uspace
147-
OTHER_MAIN_PACKAGE_NAME=linuxcnc
148-
fi
149-
150-
EXTRA_RECOMMENDS="$EXTRA_RECOMMENDS, linux-image-rt-amd64 [linux-amd64], linux-image-rt-686-pae [linux-i386]"
151-
CONFIGURE_REALTIME_ARG=--with-realtime=uspace
15269

153-
subst () {
154-
sed \
155-
-e "s#@COMPAT@#$COMPAT#g" \
156-
-e "s#@DEBHELPER@#$DEBHELPER#g" \
157-
-e "s#@DISTRIB_NAME@#$DISTRIB_NAME#g" \
158-
-e "s#@DOC_DEPENDS@#$DOC_DEPENDS#g" \
159-
-e "s#@EXTRA_BUILD@#$EXTRA_BUILD#g" \
160-
-e "s#@EXTRA_RECOMMENDS@#$EXTRA_RECOMMENDS#g" \
161-
-e "s#@KERNEL_DEPENDS@#$KERNEL_DEPENDS#g" \
162-
-e "s#@KERNEL_DEPENDS_BUILD@#$KERNEL_DEPENDS_BUILD#g" \
163-
-e "s#@KERNEL_HEADERS@#$KERNEL_HEADERS#g" \
164-
-e "s#@KERNEL_VERSION@#$KERNEL_VERSION#g" \
165-
-e "s#@LIBREADLINE_DEV@#$LIBREADLINE_DEV#g" \
166-
-e "s#@MAIN_PACKAGE_NAME@#$MAIN_PACKAGE_NAME#g" \
167-
-e "s#@MODULE_EXT@#$MODULE_EXT#g" \
168-
-e "s#@MODULE_PATH@#$MODULE_PATH#g" \
169-
-e "s#@MODUTILS_DEPENDS@#$MODUTILS_DEPENDS#g" \
170-
-e "s#@OTHER_MAIN_PACKAGE_NAME@#$OTHER_MAIN_PACKAGE_NAME#g" \
171-
-e "s#@PYTHON_GST@#$PYTHON_GST#g" \
172-
-e "s#@PYTHON_IMAGING@#$PYTHON_IMAGING#g" \
173-
-e "s#@PYTHON_IMAGING_TK@#$PYTHON_IMAGING_TK#g" \
174-
-e "s#@PYTHON_PACKAGING_DEPENDS@#$PYTHON_PACKAGING_DEPENDS#g" \
175-
-e "s#@PYTHON_VERSION_NEXT@#$PYTHON_VERSION_NEXT#g" \
176-
-e "s#@QTVCP_DEPENDS@#$QTVCP_DEPENDS#g" \
177-
-e "s#@RTAI_ARCHITECTURE@#$RTAI_ARCHITECTURE#g" \
178-
-e "s#@TARGET@#$TARGET#g" \
179-
-e "s#@CONFIGURE_REALTIME_ARG@#$CONFIGURE_REALTIME_ARG#g" \
180-
-e "s#@TCLTK_VERSION@#$TCLTK_VERSION#g" \
181-
-e "s#@XENOMAI_ARCHITECTURE@#$XENOMAI_ARCHITECTURE#g" \
182-
-e "s|@YAPPS_RUNTIME@|$YAPPS_RUNTIME|g" \
183-
-e "s#@ENABLE_BUILD_DOCUMENTATION@#$ENABLE_BUILD_DOCUMENTATION#g" \
184-
-e '/^\s*,\s*$/d' \
185-
"$@"
186-
}
187-
188-
if [[ -z "${COMPAT}" ]]; then
189-
rm -f compat
190-
else
191-
subst compat.in > compat
70+
if [ -z "$ENABLE_BUILD_DOCUMENTATION" ]; then
71+
echo "error: No need to run debian/configure any more."
72+
echo "To build without documentation use:"
73+
echo " DEB_BUILD_OPTIONS=nodoc DEB_BUILD_PROFILES=nodoc debuild"
74+
exit 1
19275
fi
19376

194-
subst control.top.in > control
195-
196-
echo >> control
197-
subst control.main-pkg.in >> control
198-
199-
subst linuxcnc.install.in > ${MAIN_PACKAGE_NAME}.install
200-
subst linuxcnc.lintian-overrides.in > ${MAIN_PACKAGE_NAME}.lintian-overrides
201-
subst linuxcnc.manpages.in > ${MAIN_PACKAGE_NAME}.manpages
202-
203-
subst rules.in > rules
204-
chmod +x rules
205-
206-
if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
207-
subst control.docs.in >> control
208-
fi
209-
210-
21177
rm -f ../build-stamp
21278
echo "I: Successfully configured for '$DISTRIB_NAME'."
21379

0 commit comments

Comments
 (0)