Package: acpica-unix
Version: 20100528-3
Severity: normal
Tags: patch

The extra tools (acpiexec and acpisrc) provided by this source package
are not built.  It would be nice to have these useful tools.

The attached patch to debian/rules builds acpiexec and acpisrc
and installs them in the binary package 'iasl' (but not acpixtract
which seems to be also provided in the acpidump package).
diff -Nru acpica-unix-20100528/debian/rules acpica-unix-20100528/debian/rules
--- acpica-unix-20100528/debian/rules	2010-07-02 05:47:19.000000000 -0700
+++ acpica-unix-20100528/debian/rules	2010-07-07 13:46:09.000000000 -0700
@@ -27,13 +27,18 @@
 
 build: build-stamp
 
-build-stamp: configure
+build-stamp: configure-stamp
 	dh_testdir
 
 	# Commands to compile the package.
-	cd compiler && \
-	$(MAKE) CFLAGS="$(CFLAGS)" && \
-	cd ..
+	$(MAKE) -C compiler CFLAGS="$(CFLAGS)"
+	# note: we must explicitly clean after compiler for the tools to build
+	$(MAKE) -C tools/acpiexec clean
+	$(MAKE) -C tools/acpisrc clean
+	##provided-by-acpidump## $(MAKE) -C tools/acpixtract clean
+	$(MAKE) -C tools/acpiexec CFLAGS="$(CFLAGS)"
+	$(MAKE) -C tools/acpisrc CFLAGS="$(CFLAGS)"
+	##provided-by-acpidump## $(MAKE) -C tools/acpixtract CFLAGS="$(CFLAGS)"
 
 	touch build-stamp
 
@@ -44,9 +49,10 @@
 	rm -f debian/acpi-dsdt.test*
 
 	# Commands to clean up after the build process.
-	cd compiler && \
-	$(MAKE) clean && \
-	cd ..
+	$(MAKE) -C compiler clean
+	$(MAKE) -C tools/acpiexec clean
+	$(MAKE) -C tools/acpisrc clean
+	##provided-by-acpidump## $(MAKE) -C tools/acpixtract clean
 
 	dh_clean 
 
@@ -67,6 +73,11 @@
 	tail -n +14 debian/acpi-dsdt.test.hex > debian/acpi-dsdt.test.hex-1
 	diff -u debian/acpi-dsdt.hex debian/acpi-dsdt.test.hex-1
 
+	# Hack: install the tools into the iasl package
+	install -m 755 tools/acpiexec/acpiexec $(CURDIR)/debian/iasl/usr/bin
+	install -m 755 tools/acpisrc/acpisrc $(CURDIR)/debian/iasl/usr/bin
+	##provided-by-acpidump## install -m 755 tools/acpixtract/acpixtract $(CURDIR)/debian/iasl/usr/bin
+
 update-test-case: build
 	mv debian/acpi-dsdt.hex debian/acpi-dsdt.hex.$(shell date +%s)
 	compiler/iasl -tc -p debian/acpi-dsdt.hex debian/acpi-dsdt.dsl

Reply via email to