abinfo "Installing module sources ..."
install -vd "$PKGDIR"/usr/src
cp -av "$SRCDIR"/usr/src/zx-"$__UPSTREAM_VER" "$PKGDIR"/usr/src

abinfo "Installing runtime libraries ..."
install -vd "$PKGDIR"/usr/lib
cp -av "$SRCDIR"/usr/lib/x86_64-linux-gnu/* \
    -t "$PKGDIR"/usr/lib/

abinfo "Installing X.Org driver ..."
cp -av "$SRCDIR"/usr/lib/xorg \
    -t "$PKGDIR"/usr/lib/

abinfo "Setting executable bits on shared objects ..."
chmod -v +x \
    "$PKGDIR"/usr/lib/**/*.so*

abinfo "Installing shared data ..."
install -vd "$PKGDIR"/usr/share
# Note: GLVND, X11 configurations are found in overrides as they
# require generation via postinst in the original package.
cp -av "$SRCDIR"/usr/share/drirc.d \
    "$PKGDIR"/usr/share/

abinfo "Running ldconfig to create missing symlinks ..."
ldconfig \
    -r "$PKGDIR"/ \
    -N \
    --verbose
