Skip to content

Commit dfd4ab3

Browse files
committed
linuxcnc-uspace: handle sample configs as docs
The sample configs need to live in /usr/share/doc/linuxcnc (not /usr/share/doc/linuxcnc-uspace), because that's where the linuxcnc launcher script looks for them. Handle example nc_files/ symlink with dh_link rather than "by hand".
1 parent 51cb55c commit dfd4ab3

File tree

3 files changed

+15
-4
lines changed

3 files changed

+15
-4
lines changed

debian/linuxcnc-uspace.docs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1+
usr/share/doc/linuxcnc/examples
2+
13
README.md

debian/linuxcnc-uspace.links

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
usr/share/linuxcnc/ncfiles usr/share/doc/linuxcnc/examples/nc_files

debian/rules.in

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,19 @@ override_dh_auto_install-arch:
7575

7676
desktop-file-validate $(shell find debian/extras/ share/applications/ -name *.desktop);
7777

78-
mkdir -p $(DESTDIR)/usr/share/doc/linuxcnc/examples
79-
cd $(DESTDIR)/usr/share/doc/linuxcnc/examples && ln -sf ../../../linuxcnc/ncfiles ./nc_files
80-
8178
# some clean-up
82-
rm -f $(DESTDIR)/usr/share/doc/linuxcnc/examples/sample-configs/*/*position*.txt
79+
rm -f $(DESTDIR)/usr/share/doc/@MAIN_PACKAGE_NAME@/examples/sample-configs/*/*position*.txt
80+
81+
override_dh_installdocs-arch:
82+
# Sample configs go in `usr/share/doc/linuxcnc` (not
83+
# `.../doc/@MAIN_PACKAGE_NAME@`) because that's where the
84+
# `linuxcnc` launcher script looks for them, and that's
85+
# inconvenient to change.
86+
dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@
87+
mkdir -p debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
88+
mv debian/@MAIN_PACKAGE_NAME@/usr/share/doc/@MAIN_PACKAGE_NAME@/examples debian/@MAIN_PACKAGE_NAME@/usr/share/doc/linuxcnc
89+
90+
dh_installdocs --doc-main-package=@MAIN_PACKAGE_NAME@ --package=@MAIN_PACKAGE_NAME@-dev
8391

8492

8593
override_dh_auto_install-indep:

0 commit comments

Comments
 (0)