[debhelper-devel] [debhelper] 01/11: Dh_Lib: Add function to determine build prefix

Niels Thykier nthykier at moszumanska.debian.org
Sun Jan 7 21:38:02 UTC 2018


This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to annotated tag Release_2.6.0
in repository debhelper.

commit d3962ab5cf7ccee06449403f37d1b0046c1cbc24
Author: Dan Nicholson <nicholson at endlessm.com>
Date:   Thu Jan 28 06:00:23 2016 -0800

    Dh_Lib: Add function to determine build prefix
    
    It's become pretty common to determine if the prefix should be /usr or
    /endless/$app, so add a convenience function to provide that. The
    function is called get_buildprefix().
---
 Debian/Debhelper/Dh_Lib.pm | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 69171c7..9e09f4f 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -20,7 +20,7 @@ use vars qw(@ISA @EXPORT %dh);
 	    &dpkg_architecture_value &sourcepackage
 	    &is_make_jobserver_unavailable &clean_jobserver_makeflags
 	    &cross_command &set_buildflags &get_buildoption
-	    &get_buildprofile &package_eos_app_id);
+	    &get_buildprofile &get_buildprefix &package_eos_app_id);
 
 my $max_compat=10;
 
@@ -1069,4 +1069,17 @@ sub get_buildprofile {
 	}
 }
 
+# Determine the prefix for the build based on the build profile. This is
+# /usr except for app builds.
+sub get_buildprefix {
+	my $package=shift;
+	my $prefix="/usr";
+
+	if (get_buildprofile("eos-app")) {
+		$prefix="/endless/" . package_eos_app_id($package);
+	}
+
+	return $prefix;
+}
+
 1

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debhelper/debhelper.git




More information about the debhelper-devel mailing list