[Reproducible-commits] [debhelper] 33/61: Dh_Lib: Add install_* subroutines

Mattia Rizzolo mattia at mapreri.org
Sat Apr 4 18:37:33 UTC 2015


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

mapreri-guest pushed a commit to branch pu/reproducible_builds
in repository debhelper.

commit b3a5ce21460e782a772d35bd74ea9f50a856ab9e
Author: Martin Koeppe <mkoeppe at gmx.de>
Date:   Thu Jan 8 08:41:08 2015 +0100

    Dh_Lib: Add install_* subroutines
    
    Signed-off-by: Niels Thykier <niels at thykier.net>
---
 Debian/Debhelper/Dh_Lib.pm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm
index 983defb..9243020 100644
--- a/Debian/Debhelper/Dh_Lib.pm
+++ b/Debian/Debhelper/Dh_Lib.pm
@@ -22,6 +22,7 @@ use vars qw(@ISA @EXPORT %dh);
 	    &is_make_jobserver_unavailable &clean_jobserver_makeflags
 	    &cross_command &set_buildflags &get_buildoption
 	    &install_dh_config_file
+	    &install_file &install_prog &install_lib &install_dir
 );
 
 my $max_compat=10;
@@ -275,6 +276,25 @@ sub _error_exitcode {
 	}
 }
 
+# Some shortcut functions for installing files and dirs to always
+# have the same owner and mode
+# install_file - installs a non-executable
+# install_prog - installs an executable
+# install_lib  - installs a shared library (some systems may need x-bit, others don't)
+# install_dir  - installs a directory
+sub install_file {
+	doit('install', '-p', '-m0644', @_);
+}
+sub install_prog {
+	doit('install', '-p', '-m0755', @_);
+}
+sub install_lib {
+	doit('install', '-p', '-m0644', @_);
+}
+sub install_dir {
+	doit('install', '-d', @_);
+}
+
 # Run a command that may have a huge number of arguments, like xargs does.
 # Pass in a reference to an array containing the arguments, and then other
 # parameters that are the command and any parameters that should be passed to

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



More information about the Reproducible-commits mailing list