[neon/extras/clazy/Neon/release] debian: clazy-tests: ship tool paths shell config

Pino Toscano null at kde.org
Wed Sep 7 22:14:01 BST 2022


Git commit 2f1dcfbb91b3b65136ed61eab20da0c28dd8fe4e by Pino Toscano.
Committed on 01/11/2020 at 16:28.
Pushed by jriddell into branch 'Neon/release'.

clazy-tests: ship tool paths shell config

M  +2    -0    debian/changelog
M  +8    -0    debian/rules

https://invent.kde.org/neon/extras/clazy/commit/2f1dcfbb91b3b65136ed61eab20da0c28dd8fe4e

diff --git a/debian/changelog b/debian/changelog
index 164412a..989dd26 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,8 @@ clazy (1.7-4) UNRELEASED; urgency=medium
     - make clazy-tests depend on the exact clazy version
     - make clazy-tests depend on the package (clang-tools-N) that provides
       the default version of clang-apply-replacements
+  * Ship a shell file /usr/share/clazy/debian-$(DPKG_ARCHITECTURE).sh in
+    clazy-tests with the paths of clang and clang-apply-replacements.
 
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Mon, 26 Oct 2020 05:48:39 -0700
 
diff --git a/debian/rules b/debian/rules
index 98659e5..79b9b15 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,6 +16,8 @@ endif
 CLANGPP=$(shell realpath $$(env PATH=$$(echo "$$PATH" | sed -r -e 's|/usr/lib/ccache/?:||') which clang++))++
 CLANG_APPLY_REPLACEMENTS=$(shell realpath $$(which clang-apply-replacements))
 
+DPKG_ARCHITECTURE = $(shell dpkg --print-architecture)
+
 %:
 	dh $@
 
@@ -29,6 +31,12 @@ override_dh_auto_install:
 	chrpath -d $(CURDIR)/debian/clazy/usr/bin/clazy-standalone $(CURDIR)/debian/clazy/usr/lib/*/*.so
 	# drop extra license file
 	rm $(CURDIR)/debian/clazy/usr/share/doc/clazy/COPYING-LGPL2.txt
+	# create a local shell environment file with the various paths
+	:> $(CURDIR)/debian/debian.sh
+	echo 'export CLANG="$(CLANGPP)"' >> $(CURDIR)/debian/debian.sh
+	echo 'export CLANG_APPLY_REPLACEMENTS="$(CLANG_APPLY_REPLACEMENTS)"' >> $(CURDIR)/debian/debian.sh
+	mkdir -p $(CURDIR)/debian/clazy-tests/usr/share/clazy
+	mv $(CURDIR)/debian/debian.sh $(CURDIR)/debian/clazy-tests/usr/share/clazy/debian-$(DPKG_ARCHITECTURE).sh
 
 override_dh_auto_test:
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))



More information about the Neon-commits mailing list