Provide some vars for use in template's targets.
These new vars are DESTDIR (by default XBPS_DESTDIR/pkgname-version), SRCPKGDESTDIR (XBPS_DESTDIR/sourcepkg-version) and FILESDIR (XBPS_TEMPLATESDIR/pkgname/files). This simplifies packages that used them. --HG-- extra : convert_revision : 287ea7128cb5df19870ca7aff0a3b8f99a11d63a
This commit is contained in:
parent
529cb677ff
commit
84222395b8
90 changed files with 535 additions and 735 deletions
|
@ -44,17 +44,16 @@ pre_build()
|
|||
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}"
|
||||
local thrdir="${DESTDIR}/usr/lib/perl5/${version}/${opmult}"
|
||||
|
||||
for f in ${FILES}; do
|
||||
sed -i -e "s|$destdir||g" ${thrdir}/${f}
|
||||
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
|
||||
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
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue