mirror of
https://github.com/xHyroM/void-packages.git
synced 2024-11-24 23:31:04 +01:00
17 lines
485 B
Bash
17 lines
485 B
Bash
|
# This hook executes the following tasks:
|
||
|
# - renames cpython binding files to not include the arch-specific extension suffix
|
||
|
|
||
|
hook() {
|
||
|
if [ ! -d ${PKGDESTDIR}/${py3_sitelib} ]; then
|
||
|
return 0
|
||
|
fi
|
||
|
|
||
|
find "${PKGDESTDIR}/${py3_sitelib}" -type f -executable -iname '*.cpython*.so' \
|
||
|
| while read -r file; do
|
||
|
filename="${file##*/}"
|
||
|
modulename="${filename%%.*}"
|
||
|
msg_warn "${pkgver}: renamed '${filename}' to '${modulename}.so'.\n"
|
||
|
mv ${file} ${file%/*}/${modulename}.so
|
||
|
done
|
||
|
}
|