[Pkg-apache-commits] [SCM] Debian packaging for apache2 (Apache HTTPD 2.x) branch, next, updated. f2beb333924f44e0bf8ff3f254cf81570d17df22

Arno Töll debian at toell.net
Sun Mar 18 23:14:46 UTC 2012


The following commit has been merged in the next branch:
commit 985bc52fec3707568988762b013ccf73306127ed
Author: Arno Töll <debian at toell.net>
Date:   Sun Mar 18 22:45:35 2012 +0100

    Rename dh_apache2 to dh_apache2.in, process it from debian/rules

diff --git a/debian/clean b/debian/clean
index 4d45125..e4a13be 100644
--- a/debian/clean
+++ b/debian/clean
@@ -12,6 +12,7 @@ debian/apache2-suexec-pristine.dirs
 debian/apache2-suexec-pristine.lintian-overrides
 debian/a2query
 debian/manpages/dh_apache2.1
+debian/debhelper/dh_apache2
 debian/manpages/a2query.8
 support/suexec-custom.c
 config.nice
diff --git a/debian/debhelper/dh_apache2 b/debian/debhelper/dh_apache2.in
similarity index 94%
rename from debian/debhelper/dh_apache2
rename to debian/debhelper/dh_apache2.in
index 84975c7..36959a7 100755
--- a/debian/debhelper/dh_apache2
+++ b/debian/debhelper/dh_apache2.in
@@ -46,45 +46,26 @@ dh_apache2 - register configuration snippets to the Apache web server
 
 =cut
 
+# auto-generated do not edit
+our $API = "__API__";
+our $MODULE_DIR = "__MODULE_DIR__";
+our $SERVER_VERSION = "__SERVER_VERSION__";
+
 
 sub apache_api_version
 {
-	if (! -x "/usr/sbin/a2query")
-	{
-		error("package appears to be an Apache module, however there is	no a2query executable available. Missing apache2-dev build dependency?");
-	}
-	my $api = `a2query -a`;
-	chomp($api);
-	return "apache2-api-$api";
+	return "apache2-api-$API";
 }
 
 
 sub apache_version
 {
-	# Use a2query when available. However, some web application don't need a
-	# build-dependency against apache2 (or even apache2-dev). Return
-	# something sensible then as fallback
-	if (-x "/usr/sbin/a2query")
-	{
-		my $version = `a2query -v`;
-		chomp($version);
-		return ">= $version~";
-	}
-	else
-	{
-		return ">= 2.3~";
-	}
+	return ">= $SERVER_VERSION~";
 }
 
 sub apache_api_installdir
 {
-	if (! -x "/usr/sbin/a2query")
-	{
-		error("package appears to be an Apache module, however there is	no a2query executable available. Missing apache2-dev build dependency?");
-	}
-	my $md = `a2query -d`;
-	chomp($md);
-	return "$md";
+	return $MODULE_DIR;
 }
 
 sub apache_conf_installdir
@@ -136,6 +117,10 @@ path in the file system. Use with caution.
 
 =head1 INVOKATION
 
+B<dh_apache2> is not part of debhelper and might require information available
+in the apache2-dev package. Packages making use of B<dh_apache2> should declare
+a build-dependency against the virtual B<dh-apache2> package.
+
 B<dh_apache2> supports both, called directly from a debian/rules file or as
 L<dh(1)> addon. In the former case the helper should run after L<dh_install(1)>
 or their respective counter parts in local implementations at earliest.
diff --git a/debian/rules b/debian/rules
index 2fdb2e3..e4140f5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -34,7 +34,7 @@ clean-config-vars:
 %: %.in
 	sed 's#__SERVER_VERSION__#$(SERVER_VERSION)#; s#__MODULE_DIR__#$(MODULE_DIR)#; s#__API__#$(API)#;' $< > $@
 
-prepare-a2query: debian/a2query
+prepare-scripts: debian/a2query debian/debhelper/dh_apache2
 	(grep -s -v apache2:API debian/apache2-bin.substvars; echo apache2:API=apache2-api-$(API)) > debian/apache2-bin.substvars.new
 	mv debian/apache2-bin.substvars.new debian/apache2-bin.substvars
 
@@ -67,7 +67,7 @@ override_dh_auto_configure: prepare-custom-suexec generate-maintainer-scripts
 		CFLAGS="$(AP2_CFLAGS)" CPPFLAGS="$(AP2_CPPFLAGS)" LDFLAGS="$(AP2_LDFLAGS)" \
 		$(AP2_EXTRAFLAGS)
 
-override_dh_install: clean-config-vars prepare-a2query
+override_dh_install: clean-config-vars prepare-scripts
 	dh_install --list-missing
 
 override_dh_fixperms:
@@ -117,4 +117,4 @@ override_dh_auto_install:
 
 
 
-.PHONY: prepare-custom-suexec generate-maintainer-scripts clean-config-vars prepare-a2query
+.PHONY: prepare-custom-suexec generate-maintainer-scripts clean-config-vars prepare-scripts

-- 
Debian packaging for apache2 (Apache HTTPD 2.x)



More information about the Pkg-apache-commits mailing list