To make it easier to understand, I suggest the following version for PKGBUILD:
# Maintainer: Fan Jiang <i@fanjiang.me>
# You can get the software from https://www.vmware.com/go/download-vmrc
pkgname=vmware-vmrc
pkgver=11.2.0
pkgrel=2
pkgdesc="VMWare VMRC Client."
arch=('x86_64')
url="https://www.vmware.com/go/download-vmrc"
license=('custom:vmware')
depends=()
optdepends=()
# Edit variable below to match the full path to the file you have downloaded
_path_bundle="/home/null/Downloads/VMware-Remote-Console-11.2.0-16492666.x86_64.bundle"
source=("file://${_path_bundle}"
"bootstrap"
"config")
sha256sums=('b2eb8a356993fae8bb48aa30d0e79e5e88d3733615d12010effdf76fefdedfb0'
'22282e8643d8a20e63773435161e5a5d01c6acce53aa81f27a4d20f111acd228'
'c5643ebad140391622c57ab88d6071b91d1ea9a8379c1aec573c845a00be30d4')
build() {
cd "$srcdir"
sh ${_path_bundle} -x ./files
cd "$srcdir/files"
}
package ()
{
local vmware_installer_version=$(cat "$srcdir/files/vmware-installer/manifest.xml" | grep -oPm1 "(?<=<version>)[^<]+")
# mkdir -p "$pkgdir/var/log"
# mkdir -p "$pkgdir/etc/init.d"
cd "$srcdir/files"
mkdir -p "$pkgdir/usr/share" "$pkgdir/usr/bin" "$pkgdir/usr/lib/vmware" "$pkgdir/usr/lib/vmware/setup"
cp -r \
vmware-vmrc/share/* \
vmware-player-core/share/* \
vmware-vmrc-app/share/* \
"$pkgdir/usr/share"
cp -r \
vmware-installer/bin/* \
vmware-usbarbitrator/bin/* \
vmware-vmrc-app/bin/* \
"$pkgdir/usr/bin"
cp -r \
vmware-installer/lib/* \
vmware-player-core/lib/* \
vmware-vmrc-app/lib/* \
vmware-vmrc/lib/* \
"$pkgdir/usr/lib/vmware"
cp -r \
vmware-vmrc-setup/vmware-config \
"$pkgdir/usr/lib/vmware/setup"
# install -Dm 644 vmware-installer/bootstrap "$pkgdir/etc/vmware-installer/bootstrap"
install -Dm 644 "$srcdir/bootstrap" "$pkgdir/etc/vmware/bootstrap"
install -Dm 644 "$srcdir/config" "$pkgdir/etc/vmware/config"
chmod +x \
"$pkgdir/usr/bin"/* \
"$pkgdir/usr/lib/vmware/bin"/* \
"$pkgdir/usr/lib/vmware/setup"/* \
"$pkgdir/usr/lib/vmware/lib"/libvmware-gksu.so/gksu-run-helper
for link in \
vmrc \
vmware-gksu \
vmware-setup-helper
do
ln -s /usr/lib/vmware/bin/appLoader "$pkgdir/usr/lib/vmware/bin/$link"
done
sed -i 's,@@BINARY@@,/usr/bin/vmrc,' "$pkgdir/usr/share/applications/vmware-vmrc.desktop"
ln -s '/usr/lib/vmware/lib/libvmplayer.so/libvmplayer.so' "$pkgdir/usr/lib/vmware/lib/libvmplayer.so/libvmrc.so"
ln -s '/usr/lib/vmware/lib/libvmplayer.so' "$pkgdir/usr/lib/vmware/lib/libvmrc.so"
sed \
-e "s/@@VERSION@@/$vmware_installer_version/" \
-e "s,@@VMWARE_INSTALLER@@,/usr/lib/vmware-installer/$vmware_installer_version," \
-i "$pkgdir/etc/vmware/bootstrap"
}
Pinned Comments
richardjs commented on 2022-05-04 19:02 (UTC) (edited on 2023-11-29 19:23 (UTC) by richardjs)
Notes for 12.0.1-2 [edit: applicable to 12.0.5-1]:
You need to download the VMware-Remote-Console .bundle from https://www.vmware.com/go/download-vmrc and place it in the same directory as the PKGBUILD.
vmware-keymaps has been made an optional dependency. vmrc will run fine without it, although I imagine how well it works may depend on your keyboard setup. Making it an optional dependency removes the problem of conflicting files between vmware packages, but also lets those who don't need it ignore it.