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:
@@ -51,24 +51,22 @@ pre_configure()
|
||||
|
||||
pre_install()
|
||||
{
|
||||
# Create destdir/etc/ld.so.conf
|
||||
mkdir -p $XBPS_DESTDIR/$pkgname-$version/etc
|
||||
echo "/usr/local/lib" > $XBPS_DESTDIR/$pkgname-$version/etc/ld.so.conf
|
||||
# Create DESTDIR/etc/ld.so.conf
|
||||
mkdir -p ${DESTDIR}/etc
|
||||
echo "/usr/local/lib" > ${DESTDIR}/etc/ld.so.conf
|
||||
}
|
||||
|
||||
post_install()
|
||||
{
|
||||
local destdir=$XBPS_DESTDIR/$pkgname-$version
|
||||
|
||||
# Replace hardcoded path to bash.
|
||||
. $XBPS_HELPERSDIR/replace-interpreter.sh
|
||||
replace_interpreter bash $destdir/usr/bin/ldd
|
||||
replace_interpreter bash ${DESTDIR}/usr/bin/ldd
|
||||
|
||||
# On x86_64, add dynamic linker's 32bit version to ldd.
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
rtldlist="/lib/ld-linux.so.2 /lib/ld-linux-x86-64.so.2"
|
||||
sed -i "s|^RTLDLIST.*$|RTLDLIST=\"$rtldlist\"|" \
|
||||
$destdir/usr/bin/ldd
|
||||
${DESTDIR}/usr/bin/ldd
|
||||
fi
|
||||
|
||||
# Create nsswitch.conf
|
||||
@@ -84,7 +82,7 @@ post_install()
|
||||
echo "services: files"; \
|
||||
echo "ethers: files"; \
|
||||
echo "rpc: files"; \
|
||||
) > $destdir/etc/nsswitch.conf
|
||||
) > ${DESTDIR}/etc/nsswitch.conf
|
||||
|
||||
wrksrc=${wrksrc%%/build_obj}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user