Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mlotysz/a6e905477948e6bb05f95ba25d46a9ad to your computer and use it in GitHub Desktop.
Save mlotysz/a6e905477948e6bb05f95ba25d46a9ad to your computer and use it in GitHub Desktop.
Patch to make https://aur.archlinux.org/packages/pulse-secure/ work in ARCH Linux
From 2c9b9cd87b0025de938831ba44114166356378e8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Maciej=20=C5=81otysz?= <lotysz@gmail.com>
Date: Thu, 14 Dec 2017 20:26:01 +0100
Subject: [PATCH] Incorporate pd5rm patch + my fix for legacy libenchant.1.so
pd5rm user comment:
I had some issues with this, so I wrote up a patch that makes it work for me.
1) Used Debian version instead of CentOS. Webkitgtk2 uses GTK 1
for Debian vs using GTK 3 (not available as a dep) for CentOS.
2) Made webkitgtk a real dependency since it's needed now because
of previous step.
3) Added icu59 libs (pulled from archive, not ideal but it works)
4) Fixup related LD_LIBRARY_PATHs because of icu59 dep.
5) Fixup desktop file.
---
PKGBUILD | 34 ++++++++++++++++++++++++++++------
pulseUi.sh | 2 +-
2 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/PKGBUILD b/PKGBUILD
index fdd2160..cf48afc 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,26 +2,39 @@
pkgname=pulse-secure
pkgver=5.3r3.0
-pkgrel=3
+pkgrel=4
pkgdesc='Pulse Connect Secure (PCS) Client'
arch=(x86_64)
license=(custom)
url='https://www.pulsesecure.net/'
depends=(gcc-libs libgnome-keyring)
source=("https://trial.pulsesecure.net/clients/ps-pulse-linux-$pkgver-b1021-centos-rhel-64-bit-installer.rpm"
+ "https://archive.archlinux.org/packages/i/icu/icu-59.1-2-x86_64.pkg.tar.xz"
+ "https://archive.archlinux.org/packages/e/enchant/enchant-1.6.1-2-x86_64.pkg.tar.xz"
pulseUi.sh
EULA.txt)
md5sums=('4cbe64953952d9ffdeaa4ffe2fc92a20'
- 'd81155461e2666c2b9d669c1b76f85fe'
+ '049ca9bf777280536b3b75861e1512eb'
+ '86e077caa2ae24831184ce33e02849e5'
+ '36742551601d8828a0b018a027796536'
'261848a28201e5386ec4bf587473a48b')
-optdepends=('webkitgtk: for pulseUi frontend'
- 'psmisc: for pulsesvc -K')
+depends=('webkitgtk2')
+optdepends=('psmisc: for pulsesvc -K')
conflicts=(pulse-connect-secure)
prepare() {
mkdir -p pulse && pushd pulse
tar -zxvf ../usr/local/pulse/pulse.tgz
popd
+
+ # Extract libicu59 dependency no longer available in Arch current
+ mkdir -p libicu59
+ cp usr/lib/libicu* libicu59
+
+ # Extact libenchnat.1.so dependency no longer available in Arch current
+ mkdir -p libenchant1
+ cp -r usr/lib/{libenchant*,enchant} libenchant1
+
}
package() {
@@ -33,8 +46,16 @@ package() {
# Skip PulseClient.sh - seems it's not useful here
install -Dm755 pulse/{pulsediag,pulseutil} "${pkgdir}"/usr/local/pulse/
install -Dm4755 pulse/pulsesvc "${pkgdir}"/usr/local/pulse/
- install -Dm755 pulse/pulseUi_centos_7_x86_64 "${pkgdir}"/usr/local/pulse/pulseUi
- install -Dm755 pulse/libpulseui.so_centos_7_x86_64 "${pkgdir}"/usr/local/pulse/libpulseui.so
+
+ # The Ubuntu version has depedency on WebGTK 2 which is easier to deal with than CentOS build.
+ install -Dm755 pulse/pulseUi_Ubuntu_16_x86_64 "${pkgdir}"/usr/local/pulse/pulseUi
+ install -Dm755 pulse/libpulseui.so_Ubuntu_16_x86_64 "${pkgdir}"/usr/local/pulse/libpulseui.so
+
+ # Fix desktop file libicu
+ sed -i 's|$LD_LIBRARY_PATH|/usr/local/pulse/libicu59:$LD_LIBRARY_PATH|' pulse/pulseUi.desktop
+ # Fix desktop file version (desktop-file-validate complains about it)
+ sed -i 's|^version|Version|' pulse/pulseUi.desktop
+
install -Dm644 pulse/pulseUi.desktop "${pkgdir}"/usr/share/applications/
# Wrappers & symlinks
@@ -42,6 +63,7 @@ package() {
ln -s /usr/local/pulse/pulsesvc "${pkgdir}"/usr/bin/pulsesvc
cp -dr --no-preserve=ownership pulse/html "${pkgdir}"/usr/local/pulse/html
+ cp -dr --no-preserve=ownership libicu59 libenchant1 "${pkgdir}"/usr/local/pulse
install -Dm644 EULA.txt "${pkgdir}"/usr/share/licenses/$pkgname/
}
diff --git a/pulseUi.sh b/pulseUi.sh
index ed7eced..1d5c569 100644
--- a/pulseUi.sh
+++ b/pulseUi.sh
@@ -1,4 +1,4 @@
#!/bin/sh
-export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pulse
+export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/pulse/libicu59:/usr/local/pulse/libenchant1:/usr/local/pulse
exec /usr/local/pulse/pulseUi
--
2.15.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment