Skip to content

Commit eff701d

Browse files
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 766f772 commit eff701d

16 files changed

+339
-504
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ jobs:
8484
sudo dpkg -i po4a_0.66-1_all.deb
8585
codename=$(lsb_release -cs)
8686
dch --maintmaint --distribution $codename "GitHub test package."
87-
eatmydata debian/configure
8887
eatmydata debuild -us -uc
8988
sudo apt-get install ../*.deb
9089
./scripts/runtests -p tests/

debian/.gitignore

Lines changed: 0 additions & 4 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
@@ -12,4 +9,3 @@ linuxcnc-doc-*/
129
/linuxcnc*.install
1310
*.debhelper
1411
shlibs.local
15-
linuxcnc-uspace.lintian-overrides

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: 8 additions & 133 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,10 @@ set -e
1515
usage () {
1616
P=${0##*/}
1717
cat <<EOF
18-
$P: Set up debian/ files to build for a particular kernel
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-
no-docs
25-
Skip building documentation
21+
$P
2622
EOF
2723
}
2824

@@ -33,12 +29,7 @@ if [ "$1" == "-h" -o "$1" == "-help" -o "$1" == "--help" ]; then
3329
exit 0
3430
fi
3531

36-
EXTRA_FILES=
37-
EXTRA_BUILD=
38-
PYTHON_VERSION_NEXT=$(python3 -c 'import sys; print (sys.version[:2] + str(1+int(sys.version[2])))')
39-
LIBREADLINE_DEV="libreadline-gplv2-dev | libreadline-dev"
40-
41-
ENABLE_BUILD_DOCUMENTATION=--enable-build-documentation=pdf
32+
ENABLE_BUILD_DOCUMENTATION=yes
4233

4334
# Specialize these based on DISTRIB_NAME as needed
4435
# These do not run-time depend on a specific package because
@@ -62,130 +53,14 @@ elif [ -f /etc/lsb-release ]; then
6253
DISTRIB_NAME=$DISTRIB_ID-$DISTRIB_RELEASE
6354
fi
6455

65-
EXTRAS=extras
66-
67-
if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
68-
DOC_DEPENDS="asciidoc (>= 8.5),\n dblatex (>= 0.2.12),\n docbook-xsl,\n dvipng,\n ghostscript,\n graphviz,\n groff,\n imagemagick,\n inkscape,\n python3-lxml,\n source-highlight,\n w3c-linkchecker,\n xsltproc,\n texlive-extra-utils,\n texlive-font-utils,\n texlive-fonts-recommended,\n texlive-lang-cyrillic,\n texlive-lang-french,\n texlive-lang-german,\n texlive-lang-polish,\n texlive-lang-spanish,\n texlive-latex-recommended,\n asciidoc-dblatex"
69-
70-
case $DISTRIB_NAME in
71-
Debian-9)
72-
;; # No xetex in Debian 9 Stretch
73-
*)
74-
# Not quite sure which packages is needed for xetex, but
75-
# texlive-xetex seem like a safe choice. Need xetex to be
76-
# able to build Chinese PDF.
77-
DOC_DEPENDS="$DOC_DEPENDS,\n texlive-xetex"
78-
;;
79-
esac
80-
else
81-
DOC_DEPENDS=''
82-
fi
83-
84-
MODUTILS_DEPENDS=kmod
85-
PYTHON_PACKAGING_DEPENDS=dh-python
86-
PYTHON_GST=python3-gst-1.0,gstreamer1.0-plugins-base
87-
TCLTK_VERSION=8.6
88-
PYTHON_IMAGING=python3-pil
89-
PYTHON_IMAGING_TK=python3-pil.imagetk
90-
QTVCP_DEPENDS="python3-pyqt5,\n python3-pyqt5.qsci,\n python3-pyqt5.qtsvg,\n python3-pyqt5.qtopengl,\n python3-opencv,\n python3-dbus,python3-espeak,\n python3-dbus.mainloop.pyqt5,\n python3-pyqt5.qtwebkit,\n espeak-ng,\n pyqt5-dev-tools,\n gstreamer1.0-tools,espeak,\n sound-theme-freedesktop"
91-
YAPPS_RUNTIME="python3-yapps"
92-
DEBHELPER="debhelper (>= 9)"
93-
COMPAT="9"
94-
95-
case $DISTRIB_NAME in
96-
Ubuntu-21.*|Debian-11|Debian-11.*|Debian-testing|Debian-unstable)
97-
LIBREADLINE_DEV=libeditreadline-dev
98-
COMPAT=""
99-
DEBHELPER="debhelper-compat (= 13)"
100-
;;
101-
Ubuntu-20.*)
102-
;;
103-
Debian-10|Debian-10.*|Raspbian-10|Raspbian-10.*)
104-
;;
105-
*)
106-
echo "unknown distribution: $DISTRIB_NAME"
107-
echo "detected dependencies may be incomplete or wrong"
108-
echo "please consider fixing it and submitting a pull request"
109-
;;
110-
esac
111-
112-
TARGET=uspace
113-
MAIN_PACKAGE_NAME=linuxcnc
114-
OTHER_MAIN_PACKAGE_NAME=linuxcnc-uspace
115-
EXTRA_RECOMMENDS=hostmot2-firmware-all
116-
MODULE_PATH=usr/lib/linuxcnc/modules
117-
MODULE_EXT=.so
118-
KERNEL_DEPENDS=libudev-dev,iptables
119-
KERNEL_DEPENDS_BUILD=libudev-dev
120-
KERNEL_HEADERS=
121-
KERNEL_VERSION=uspace
122-
MODUTILS_DEPENDS=
123-
EXTRA_FILES="usr/bin/rtapi_app"
12456
DISTRIB_NAME=uspace-$DISTRIB_NAME
125-
MAIN_PACKAGE_NAME=linuxcnc-uspace
126-
OTHER_MAIN_PACKAGE_NAME=linuxcnc
127-
128-
EXTRA_RECOMMENDS="$EXTRA_RECOMMENDS, linux-image-rt-amd64 [linux-amd64], linux-image-rt-686-pae [linux-i386]"
129-
CONFIGURE_REALTIME_ARG=--with-realtime=uspace
13057

131-
subst () {
132-
sed \
133-
-e "s#@COMPAT@#$COMPAT#g" \
134-
-e "s#@DEBHELPER@#$DEBHELPER#g" \
135-
-e "s#@DISTRIB_NAME@#$DISTRIB_NAME#g" \
136-
-e "s#@DOC_DEPENDS@#$DOC_DEPENDS#g" \
137-
-e "s#@EXTRA_BUILD@#$EXTRA_BUILD#g" \
138-
-e "s#@EXTRA_FILES@#$EXTRA_FILES#g" \
139-
-e "s#@EXTRA_RECOMMENDS@#$EXTRA_RECOMMENDS#g" \
140-
-e "s#@EXTRAS@#$EXTRAS#g" \
141-
-e "s#@KERNEL_DEPENDS@#$KERNEL_DEPENDS#g" \
142-
-e "s#@KERNEL_DEPENDS_BUILD@#$KERNEL_DEPENDS_BUILD#g" \
143-
-e "s#@KERNEL_HEADERS@#$KERNEL_HEADERS#g" \
144-
-e "s#@KERNEL_VERSION@#$KERNEL_VERSION#g" \
145-
-e "s#@LIBREADLINE_DEV@#$LIBREADLINE_DEV#g" \
146-
-e "s#@MAIN_PACKAGE_NAME@#$MAIN_PACKAGE_NAME#g" \
147-
-e "s#@MODULE_EXT@#$MODULE_EXT#g" \
148-
-e "s#@MODULE_PATH@#$MODULE_PATH#g" \
149-
-e "s#@MODUTILS_DEPENDS@#$MODUTILS_DEPENDS#g" \
150-
-e "s#@OTHER_MAIN_PACKAGE_NAME@#$OTHER_MAIN_PACKAGE_NAME#g" \
151-
-e "s#@PYTHON_GST@#$PYTHON_GST#g" \
152-
-e "s#@PYTHON_IMAGING@#$PYTHON_IMAGING#g" \
153-
-e "s#@PYTHON_IMAGING_TK@#$PYTHON_IMAGING_TK#g" \
154-
-e "s#@PYTHON_PACKAGING_DEPENDS@#$PYTHON_PACKAGING_DEPENDS#g" \
155-
-e "s#@PYTHON_VERSION_NEXT@#$PYTHON_VERSION_NEXT#g" \
156-
-e "s#@QTVCP_DEPENDS@#$QTVCP_DEPENDS#g" \
157-
-e "s#@RTAI_ARCHITECTURE@#$RTAI_ARCHITECTURE#g" \
158-
-e "s#@TARGET@#$TARGET#g" \
159-
-e "s#@CONFIGURE_REALTIME_ARG@#$CONFIGURE_REALTIME_ARG#g" \
160-
-e "s#@TCLTK_VERSION@#$TCLTK_VERSION#g" \
161-
-e "s#@XENOMAI_ARCHITECTURE@#$XENOMAI_ARCHITECTURE#g" \
162-
-e "s|@YAPPS_RUNTIME@|$YAPPS_RUNTIME|g" \
163-
-e "s#@ENABLE_BUILD_DOCUMENTATION@#$ENABLE_BUILD_DOCUMENTATION#g" \
164-
-e '/^\s*,\s*$/d' \
165-
$*
166-
}
167-
168-
if [[ -z "${COMPAT}" ]]; then
169-
rm -f compat
170-
else
171-
subst compat.in > compat
58+
if [ -z "$ENABLE_BUILD_DOCUMENTATION" ]; then
59+
echo "error: No need to run debian/configure any more."
60+
echo "To build without documentation use:"
61+
echo " DEB_BUILD_OPTIONS=nodoc DEB_BUILD_PROFILES=nodoc debuild"
62+
exit 1
17263
fi
17364

174-
subst control.top.in > control
175-
176-
echo >> control
177-
subst control.main-pkg.in >> control
178-
179-
subst linuxcnc.install.in > ${MAIN_PACKAGE_NAME}.install
180-
subst linuxcnc.lintian-overrides.in > ${MAIN_PACKAGE_NAME}.lintian-overrides
181-
182-
subst rules.in > rules
183-
chmod +x rules
184-
185-
if [ -n "$ENABLE_BUILD_DOCUMENTATION" ]; then
186-
subst control.docs.in >> control
187-
fi
188-
189-
19065
rm -f ../build-stamp
19166
echo "successfully configured for '$DISTRIB_NAME'.."

0 commit comments

Comments
 (0)