From 77e906db6553547b46dc9bf9d938047ccc67090f Mon Sep 17 00:00:00 2001 From: "Tom G. Christensen" Date: Thu, 20 Dec 2012 11:55:08 +0100 Subject: [PATCH] buildpkg.functions: add a simple helper to create symlinks in gnu/bin --- buildpkg.functions | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/buildpkg.functions b/buildpkg.functions index 6c7b586..c455628 100644 --- a/buildpkg.functions +++ b/buildpkg.functions @@ -755,6 +755,23 @@ check_changelog() fi } +# setup_gnu_link: Setup links in $prefix/gnu/bin +# params: list of programs to link +# For each program given, create a symlink from $prefix/bin/program to +# $prefix/gnu/bin with the first character stripped from the name +setup_gnu_link() +{ + local program + + ${__mkdir} -p ${stagedir}${prefix}/gnu/bin + setdir ${stagedir}${prefix}/gnu/bin + + for program in $@ + do + ${__ln_s} ../../bin/$program ${program:1} + done +} + ##################################################### # Define generic functions for different build stages #####################################################