abinfo "Renaming binary form main to v2ray ..."
mv -v "$PKGDIR"/usr/bin/main "$PKGDIR"/usr/bin/v2ray

abinfo "Arch Linux: Installing systemd units ..."
install -Dvm644 "$SRCDIR"/release/config/systemd/system/v2ray.service \
    "$PKGDIR"/usr/lib/systemd/system/v2ray.service
install -Dvm644 "$SRCDIR"/release/config/systemd/system/v2ray@.service \
    "$PKGDIR"/usr/lib/systemd/system/v2ray@.service

abinfo "Installing configuration files ..."
install -Dvm644 "$SRCDIR"/release/config/*.json \
    -t "$PKGDIR"/etc/v2ray/

abinfo "Linking to geofile directory ..."
install -dv "$PKGDIR"/usr/share/v2ray
ln -sv ../v2ray-rules-dat/{geoip.dat,geosite.dat} \
    "$PKGDIR"/usr/share/v2ray/
