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
|
@ -9,12 +9,9 @@ Add_dependency run glibc
|
|||
|
||||
do_install()
|
||||
{
|
||||
local destdir=${XBPS_DESTDIR}/${pkgname}-${version}
|
||||
local origdir=${XBPS_DESTDIR}/${sourcepkg}-${version}
|
||||
|
||||
mkdir -p ${destdir}/usr/lib
|
||||
mv ${origdir}/usr/include ${destdir}/usr
|
||||
mv ${origdir}/usr/lib/*.a ${destdir}/usr/lib
|
||||
mv ${origdir}/usr/lib/*.so ${destdir}/usr/lib
|
||||
mv ${origdir}/usr/lib/*crt1.o ${destdir}/usr/lib
|
||||
mkdir -p ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/include ${DESTDIR}/usr
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/*.a ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/*.so ${DESTDIR}/usr/lib
|
||||
mv ${SRCPKGDESTDIR}/usr/lib/*crt1.o ${DESTDIR}/usr/lib
|
||||
}
|
||||
|
|
|
@ -8,10 +8,7 @@ noarch=yes
|
|||
|
||||
do_install()
|
||||
{
|
||||
local destdir=${XBPS_DESTDIR}/${pkgname}-${version}
|
||||
local origdir=${XBPS_DESTDIR}/${sourcepkg}-${version}
|
||||
|
||||
mkdir -p ${destdir}/usr/share
|
||||
mv ${origdir}/usr/share/i18n ${destdir}/usr/share
|
||||
mv ${origdir}/usr/share/locale ${destdir}/usr/share
|
||||
mkdir -p ${DESTDIR}/usr/share
|
||||
mv ${SRCPKGDESTDIR}/usr/share/i18n ${DESTDIR}/usr/share
|
||||
mv ${SRCPKGDESTDIR}/usr/share/locale ${DESTDIR}/usr/share
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue