summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Marc Lenoir2018-09-30 12:38:11 +0200
committerJean-Marc Lenoir2018-09-30 12:38:11 +0200
commit86f3e8f35d3cbc59830c76801114edc32c1fa9f6 (patch)
tree046fe4da10112b19df4ec732244b52a72203ed9d
downloadaur-86f3e8f35d3cbc59830c76801114edc32c1fa9f6.tar.gz
Initial commit.
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD71
-rw-r--r--vmware-thinprint.install7
-rw-r--r--vmware-thinprint.service14
4 files changed, 111 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..d1a3c053ed7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = vmware-thinprint
+ pkgdesc = Thinprint support on VMware guests
+ pkgver = 2.0.21
+ pkgrel = 1
+ url = https://www.vmware.com/products/workstation-for-linux.html
+ install = vmware-thinprint.install
+ arch = i686
+ arch = x86_64
+ license = custom
+ makedepends = p7zip
+ depends = cups
+ backup = etc/tpvmlp.conf
+ source = https://softwareupdate.vmware.com/cds/vmw-desktop/ws/15.0.0/10134415/linux/core/VMware-Workstation-15.0.0-10134415.x86_64.bundle.tar
+ source = vmware-thinprint.service
+ sha256sums = 9b65e182d27f7ca13446e1d1f3ff6b521693af19a94d27ea794fed62a4ddbbc1
+ sha256sums = 02971c67bdbb289accd3faa6f0a8f1803e8145713235f4ba69671c16a9938dcc
+
+pkgname = vmware-thinprint
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..7bccf16c5f6
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,71 @@
+# Maintainer: Jean-Marc Lenoir <archlinux "at" jihemel "dot" com>
+
+pkgname=vmware-thinprint
+pkgver=2.0.21
+_vmware_ver=15.0.0_10134415
+pkgrel=1
+pkgdesc='Thinprint support on VMware guests'
+arch=('i686' 'x86_64')
+url='https://www.vmware.com/products/workstation-for-linux.html'
+license=(custom)
+install="vmware-thinprint.install"
+depends=(
+ cups
+)
+makedepends=(
+ p7zip
+)
+backup=(
+ 'etc/tpvmlp.conf'
+)
+source=(
+ "https://softwareupdate.vmware.com/cds/vmw-desktop/ws/${_vmware_ver/_/\/}/linux/core/VMware-Workstation-${_vmware_ver/_/-}.${CARCH}.bundle.tar"
+ 'vmware-thinprint.service'
+)
+sha256sums=(
+ '9b65e182d27f7ca13446e1d1f3ff6b521693af19a94d27ea794fed62a4ddbbc1'
+ '02971c67bdbb289accd3faa6f0a8f1803e8145713235f4ba69671c16a9938dcc'
+)
+
+if [ "$CARCH" = "x86_64" ]; then
+ _arch=amd64
+else
+ _arch=i386
+fi
+
+prepare() {
+ extracted_dir="$srcdir/extracted"
+
+ rm -rf "$extracted_dir"
+ bash \
+ "$(readlink -f "$srcdir/VMware-Workstation-${_vmware_ver/_/-}.${CARCH}.bundle")" \
+ --extract "$extracted_dir"
+
+ 7z x "$extracted_dir"/vmware-virtual-printer/VirtualPrinter-Linux.iso "thinprint_${pkgver}-1_${_arch}.deb" -y > /dev/null
+
+ mkdir -p deb_package
+ ar p "thinprint_${pkgver}-1_${_arch}.deb" data.tar.gz | tar xz -C deb_package
+}
+
+package() {
+ install -d -m 755 "$pkgdir"/usr/{bin,lib/tpvmlp/conf,share/licenses/"$pkgname"}
+
+ install -Dm 644 "$srcdir"/vmware-thinprint.service "$pkgdir/usr/lib/systemd/system/vmware-thinprint.service"
+
+ cd "$srcdir"/deb_package
+
+ cp -r usr/lib/tpvmlp/bin "$pkgdir"/usr/lib/tpvmlp
+
+ install -Dm 644 etc/tpvmlp.conf "$pkgdir"/etc/tpvmlp.conf
+
+ install -Dm 755 usr/lib/cups/backend/tpvmgp "$pkgdir"/usr/lib/cups/backend/tpvmgp
+ install -Dm 755 usr/lib/cups/backend/tpvmlp "$pkgdir"/usr/lib/cups/backend/tpvmlp
+
+ install -Dm 644 usr/share/doc/thinprint/copyright "$pkgdir"/usr/share/licenses/"${pkgname}"/copyright
+
+ ln -s /usr/lib/tpvmlp/bin/tpvmlp-2.0.135.1 "$pkgdir"/usr/bin/tpvmlp
+ ln -s /usr/lib/tpvmlp/bin/tpvmlp-2.0.135.1 "$pkgdir"/usr/bin/tpvmlpadm
+ ln -s /usr/lib/tpvmlp/bin/tpvmlpd-2.0.41.1 "$pkgdir"/usr/bin/tpvmlpd
+
+ ln -s etc/tpvmlp.conf "$pkgdir"/usr/lib/tpvmlp/conf/tpvmlp.conf-2.0.2
+}
diff --git a/vmware-thinprint.install b/vmware-thinprint.install
new file mode 100644
index 00000000000..044781c1bfc
--- /dev/null
+++ b/vmware-thinprint.install
@@ -0,0 +1,7 @@
+post_install() {
+ cat << EOF
+
+In order to use Thinprint functionnality, you need to enable vmware-thinprint.service
+
+EOF
+}
diff --git a/vmware-thinprint.service b/vmware-thinprint.service
new file mode 100644
index 00000000000..f70bb420078
--- /dev/null
+++ b/vmware-thinprint.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=ThinPrint service to access to host printers
+ConditionVirtualization=vmware
+Requires=org.cups.cupsd.service
+After=org.cups.cupsd.service
+
+[Service]
+Type=simple
+Environment=TPVMLP_SVC=global
+ExecStart=/usr/bin/tpvmlp
+TimeoutStopSec=5
+
+[Install]
+WantedBy=multi-user.target