diff options
author | Martin Koeppe <mkoeppe@gmx.de> | 2015-01-08 08:41:08 +0100 |
---|---|---|
committer | Niels Thykier <niels@thykier.net> | 2015-01-08 20:45:45 +0100 |
commit | b3a5ce21460e782a772d35bd74ea9f50a856ab9e (patch) | |
tree | 84bd2bd0f2a073e0914a55375926817f28eb6224 /Debian | |
parent | 0ac705cfc443f9182c7153d749528bc955779c40 (diff) | |
download | debhelper-b3a5ce21460e782a772d35bd74ea9f50a856ab9e.tar.gz |
Dh_Lib: Add install_* subroutines
Signed-off-by: Niels Thykier <niels@thykier.net>
Diffstat (limited to 'Debian')
-rw-r--r-- | Debian/Debhelper/Dh_Lib.pm | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Debian/Debhelper/Dh_Lib.pm b/Debian/Debhelper/Dh_Lib.pm index 983defb1..92430207 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 |