aboutsummaryrefslogtreecommitdiff
path: root/common/hooks/pre-install/98-fixup-gir-path.sh
blob: c81c8257294456e4ebf8c7f77eb74b6244b67788 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
# This hook fixes the wrong install path of 'gir' files
# when cross building packages. It's a workaround and
# not a proper fix. Remove it once the root cause of the
# problem is fixed.

hook() {
	[ -z "$CROSS_BUILD" ] && return
	if [ -d "${DESTDIR}/usr/${XBPS_CROSS_TRIPLET}/usr" ]; then
		cp -a "${DESTDIR}"/usr/{${XBPS_CROSS_TRIPLET}/usr/*,}
		rm -rf "${DESTDIR}"/usr/${XBPS_CROSS_TRIPLET}/usr
	fi
}