diff options
author | Arno Töll <debian@toell.net> | 2012-03-18 22:45:35 +0100 |
---|---|---|
committer | Arno Töll <debian@toell.net> | 2012-03-18 22:52:05 +0100 |
commit | 985bc52fec3707568988762b013ccf73306127ed (patch) | |
tree | ece148590c78c9ccb03f210e9951e07e1e172961 | |
parent | b7692b0693e4653b7e144868250205d2ad8f1648 (diff) | |
download | apache2-985bc52fec3707568988762b013ccf73306127ed.tar.gz |
Rename dh_apache2 to dh_apache2.in, process it from debian/rules
-rw-r--r-- | debian/clean | 1 | ||||
-rwxr-xr-x | debian/debhelper/dh_apache2.in (renamed from debian/debhelper/dh_apache2) | 39 | ||||
-rwxr-xr-x | debian/rules | 6 |
3 files changed, 16 insertions, 30 deletions
diff --git a/debian/clean b/debian/clean index 4d45125e..e4a13be0 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 index 84975c70..36959a7d 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 2fdb2e3b..e4140f50 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 |