Skip to content

Instantly share code, notes, and snippets.

@eboye
Created September 15, 2022 00:02
Show Gist options
  • Save eboye/41667ab9cd84a94a469d49bd4f009e91 to your computer and use it in GitHub Desktop.
Save eboye/41667ab9cd84a94a469d49bd4f009e91 to your computer and use it in GitHub Desktop.
TablePlus Version Patch for aur
diff --git a/PKGBUILD b/PKGBUILD
index 5ffe1e5..4384d1e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,20 +2,33 @@
# Maintainer: Henry Pham <huy at tableplus dot com>
pkgname=tableplus
-pkgver=0.1.186
-pkgrel=1
+pkgver=0.1.188
+pkgrel=2
pkgdesc='Modern, native, and friendly GUI tool for relational databases (Alpha)'
arch=('x86_64')
url='https://tableplus.com/'
license=('custom')
depends=('gtksourceview3' 'libgee' 'gnome-keyring')
source=('LICENSE'
- "tableplus_${pkgver}_${pkgrel}_amd64.deb::https://deb.tableplus.com/debian/21/pool/main/t/tableplus/tableplus_${pkgver}_amd64.deb")
+ "tableplus_${pkgver}_${pkgrel}_amd64.deb::https://deb.tableplus.com/debian/22/pool/main/t/tableplus/tableplus_${pkgver}_amd64.deb"
+ "http://archive.ubuntu.com/ubuntu/pool/main/o/openldap/libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb"
+ "http://archive.ubuntu.com/ubuntu/pool/main/c/cyrus-sasl2/libsasl2-2_2.1.27+dfsg2-3ubuntu1_amd64.deb"
+ "https://archive.archlinux.org/packages/g/glib2/glib2-2.68.4-1-x86_64.pkg.tar.zst"
+ "preload.patch")
+noextract=("libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb"
+ "libsasl2-2_2.1.27+dfsg2-3ubuntu1_amd64.deb")
sha256sums=('76f924b1ebad5309ccf0dd7f3fe3d1b57ff3088b208a603900b0e240fdb5debb'
- '11b1ebb30a9fe7ddfd457fb4a9919f46b321606e47bebef39b043c91dd03a1d3')
+ 'c8ede03457eb84ce7c617b7a5f88a5254905e3d96405f318d43a0fec08577bd8'
+ 'f28638149498d6fbac35ee3f9f11ad399953b2a9ba1a47ca457dce39f091ba0b'
+ 'e68ac6059677e0356e492e0e6a6c31344a4815f03e7cf367fe35fe1e7ebc128c'
+ 'e8e759bd9abb58c93067e199088077f3d6fa2c608ebc6f571cb9dd814812bcea'
+ 'e3dedf8c93e5a8966eb3d5c1f25071a0e6d049279be0149cfb6280c9674d6f6f')
prepare() {
tar -xf "${srcdir}/data.tar.zst"
+ ar p libldap-2.5-0_2.5.11+dfsg-1~exp1ubuntu3_amd64.deb data.tar.zst | tar x --zst
+ ar p libsasl2-2_2.1.27+dfsg2-3ubuntu1_amd64.deb data.tar.zst | tar x --zst
+ patch -Np1 -i "${srcdir}/preload.patch"
}
package() {
@@ -25,6 +38,8 @@ package() {
install -Dm755 opt/tableplus/tableplus -t "$pkgdir/usr/local/bin/"
install -Dm644 opt/tableplus/tableplus.desktop -t "${pkgdir}/usr/share/applications/"
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm755 usr/lib/x86_64-linux-gnu/{liblber-2.5.so.0.1.6,libldap-2.5.so.0.1.6,libsasl2.so.2.0.25} -t "$pkgdir/opt/tableplus/lib/"
+ install -Dm755 usr/lib/libgio-2.0.so.0.6800.4 -t "$pkgdir/opt/tableplus/lib/"
cp -r opt/tableplus/resource "${pkgdir}/opt/tableplus/"
echo "" >> "${pkgdir}/usr/share/applications/tableplus.desktop"
diff --git a/preload.patch b/preload.patch
new file mode 100644
index 0000000..91a644d
--- /dev/null
+++ b/preload.patch
@@ -0,0 +1,19 @@
+*** /opt/tableplus/tableplus.desktop 2022-03-12 19:09:51.000000000 +0100
+--- /opt/tableplus/tableplus.desktop 2022-03-12 19:14:19.609139039 +0100
+***************
+*** 1,7 ****
+ [Desktop Entry]
+ Name=TablePlus
+ Type=Application
+! Exec=/usr/local/bin/tableplus
+ Icon=/opt/tableplus/resource/image/logo.png
+ Terminal=false
+ Categories=Utility;Development;
+--- 1,7 ----
+ [Desktop Entry]
+ Name=TablePlus
+ Type=Application
+! Exec=/usr/bin/env LD_PRELOAD=/opt/tableplus/lib/libldap-2.5.so.0.1.6:/opt/tableplus/lib/liblber-2.5.so.0.1.6:/opt/tableplus/lib/libsasl2.so.2.0.25:/opt/tableplus/lib/libgio-2.0.so.0.6800.4 /usr/local/bin/tableplus
+ Icon=/opt/tableplus/resource/image/logo.png
+ Terminal=false
+ Categories=Utility;Development;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment