python3-tkinter: simplify destdir and lib handling

This commit is contained in:
q66 2020-12-23 01:17:27 +01:00
parent ae9b4b3d7f
commit 8be1e38757

View file

@ -62,24 +62,23 @@ do_check() {
do_install() {
export PATH="$PATH:$wrksrc/hostpython"
make DESTDIR=${wrksrc}/${pkgname}-${version}-install altinstall
mkdir -p ${wrksrc}/tmp-destdir/usr/lib
ln -s lib ${wrksrc}/tmp-destdir/usr/lib${XBPS_TARGET_WORDSIZE}
make DESTDIR=${wrksrc}/tmp-destdir altinstall
vlicense LICENSE
# We only care for the idle and tkinter modules.
vmkdir usr/bin
vmkdir usr/lib/python${version%.*}/lib-dynload
if [ -e ${wrksrc}/${pkgname}-${version}-install/usr/lib32 ]; then
_libdir=lib32
else
_libdir=lib
fi
mv ${wrksrc}/${pkgname}-${version}-install/usr/bin/idle${version%.*} \
mv ${wrksrc}/tmp-destdir/usr/bin/idle${version%.*} \
${DESTDIR}/usr/bin/idle${version%.*}
for lib in idlelib tkinter turtledemo turtle.py; do
mv ${wrksrc}/${pkgname}-${version}-install/usr/lib/python${version%.*}/${lib} \
mv ${wrksrc}/tmp-destdir/usr/lib/python${version%.*}/${lib} \
${DESTDIR}/usr/lib/python${version%.*}/
done
mv ${wrksrc}/${pkgname}-${version}-install/usr/${_libdir}/python${version%.*}/lib-dynload/_tkinter.cpython-*.so \
mv ${wrksrc}/tmp-destdir/usr/lib/python${version%.*}/lib-dynload/_tkinter.cpython-*.so \
${DESTDIR}/usr/lib/python${version%.*}/lib-dynload/
ln -sf idle${version%.*} ${DESTDIR}/usr/bin/idle3
}