perl: replace hardcoded destdir paths.
--HG-- extra : convert_revision : 5734e2f06b62fa52a4616edd77a21231171e1f34
This commit is contained in:
parent
c1f0ae6c16
commit
24f389b5ca
1 changed files with 19 additions and 0 deletions
|
@ -40,3 +40,22 @@ pre_build()
|
|||
sed -i -e "s|$XBPS_MASTERDIR||g" $wrksrc/config.h
|
||||
fi
|
||||
}
|
||||
|
||||
post_install()
|
||||
{
|
||||
# Remove hardcoded paths of XBPS_DESTDIR.
|
||||
local destdir="$XBPS_DESTDIR/$pkgname-$version"
|
||||
local FILES="Config.pm Config_heavy.pl .packlist"
|
||||
local opmult="${xbps_machine}-linux-thread-multi"
|
||||
local thrdir="${destdir}/usr/lib/perl5/${version}/${opmult}"
|
||||
|
||||
for f in ${FILES}; do
|
||||
sed -i -e "s|$destdir||g" ${thrdir}/${f}
|
||||
done
|
||||
for f in $(find $destdir/usr/bin/ -type f -print); do
|
||||
if $(echo $f|grep -q $destdir); then
|
||||
sed -i -e "s|$destdir||g" $f
|
||||
echo "Replacing $f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue