Extend gnu symlink functionality
This makes the gnu symlink functionality an integrated part of the install function. The interface is now the variable gnu_link_progs which when defined triggers the automatic symlinking.
This commit is contained in:
parent
1b0d55ddd0
commit
a9fed27639
@ -144,6 +144,12 @@ maketest=0
|
|||||||
# When patching use -p1 as default prefix
|
# When patching use -p1 as default prefix
|
||||||
patch_prefix="-p1"
|
patch_prefix="-p1"
|
||||||
|
|
||||||
|
# Settings for gnu_link
|
||||||
|
# GNU prefix
|
||||||
|
gnu_prefix=g
|
||||||
|
# GNU dir
|
||||||
|
_gnudir=gnu
|
||||||
|
|
||||||
# Distfiles should be named like this
|
# Distfiles should be named like this
|
||||||
# <name>-<version>-<pkgver>.sb-<os>-<cpu>-<pkgdirdesig>
|
# <name>-<version>-<pkgver>.sb-<os>-<cpu>-<pkgdirdesig>
|
||||||
# ie: libmad-0.14.2b-1.sb-sol5.8-sparcv9-local
|
# ie: libmad-0.14.2b-1.sb-sol5.8-sparcv9-local
|
||||||
@ -755,20 +761,22 @@ check_changelog()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# setup_gnu_link: Setup links in $prefix/gnu/bin
|
# gnu_link: Setup links in $prefix/$_gnudir
|
||||||
# params: list of programs to link
|
# params: list of programs to link
|
||||||
# For each program given, create a symlink from $prefix/bin/program to
|
# For each program given, create a symlink from $prefix/${_bindir}/program to
|
||||||
# $prefix/gnu/bin with the first character stripped from the name
|
# $prefix/gnu with the first character stripped from the name
|
||||||
setup_gnu_link()
|
gnu_link()
|
||||||
{
|
{
|
||||||
local program
|
local program
|
||||||
|
|
||||||
${__mkdir} -p ${stagedir}${prefix}/gnu/bin
|
${__mkdir} -p ${stagedir}${prefix}/$_gnudir
|
||||||
setdir ${stagedir}${prefix}/gnu/bin
|
setdir ${stagedir}${prefix}/$_gnudir
|
||||||
|
|
||||||
for program in $@
|
for program in $@
|
||||||
do
|
do
|
||||||
${__ln_s} ../../bin/$program ${program:1}
|
local dest=${program:1}
|
||||||
|
echo "Linking $prefix/${_bindir}/$program to $prefix/$_gnudir/$dest"
|
||||||
|
${__ln_s} ../${_bindir}/$program ${program:1}
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -926,6 +934,13 @@ generic_install()
|
|||||||
if [ $autonuke -eq 1 ]; then
|
if [ $autonuke -eq 1 ]; then
|
||||||
do_autonuke
|
do_autonuke
|
||||||
fi
|
fi
|
||||||
|
if [ -n "$gnu_link_progs" ]; then
|
||||||
|
# There are programs that should be linked to $prefix/$_gnudir
|
||||||
|
local prog
|
||||||
|
for prog in $gnu_link_progs; do
|
||||||
|
gnu_link ${gnu_prefix}${prog}
|
||||||
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# generic_install_perl(): Install already built perl module
|
# generic_install_perl(): Install already built perl module
|
||||||
|
@ -80,7 +80,7 @@ _mandir=share/man
|
|||||||
_infodir=share/info
|
_infodir=share/info
|
||||||
|
|
||||||
# Default configure args
|
# Default configure args
|
||||||
configure_args='--prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefix}/${_infodir}'
|
configure_args='${gnu_link_progs:+--program-prefix=$gnu_prefix} --prefix=$prefix --mandir=${prefix}/${_mandir} --infodir=${prefix}/${_infodir}'
|
||||||
|
|
||||||
# Host specific configuration
|
# Host specific configuration
|
||||||
[ -r $buildpkgscripts/config.`hostname`.solaris ] && . $buildpkgscripts/config.`hostname`.solaris
|
[ -r $buildpkgscripts/config.`hostname`.solaris ] && . $buildpkgscripts/config.`hostname`.solaris
|
||||||
|
Loading…
x
Reference in New Issue
Block a user