summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIan Mackay2017-11-19 14:19:58 -0800
committerIan Mackay2017-11-19 14:19:58 -0800
commit2ff918e6650a3b5a72aa0a6562a40b7876d89f4d (patch)
treee90405a8bc59a79e5a0caa9588c2ddc2eeed1aa0
downloadaur-2ff918e6650a3b5a72aa0a6562a40b7876d89f4d.tar.gz
Github Desktop: patched for urxvt
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD52
-rw-r--r--github-desktop.desktop10
-rw-r--r--github-desktop.patch73
4 files changed, 163 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..e5bd696f7a1
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = github-desktop-git
+ pkgdesc = GUI for managing Git and GitHub.
+ pkgver = 1.0.10.beta0.r29.gc6a57140e
+ pkgrel = 1
+ url = https://desktop.github.com
+ arch = x86_64
+ license = MIT
+ makedepends = libcurl-openssl-1.0
+ makedepends = xorg-server-xvfb
+ makedepends = yarn
+ depends = gnome-keyring
+ depends = git
+ depends = electron
+ depends = nodejs
+ depends = libcurl-compat
+ depends = libcurl-gnutls
+ optdepends = hub: CLI interface for GitHub.
+ provides = github-desktop
+ conflicts = github-desktop
+ source = git+https://github.com/desktop/desktop.git
+ source = github-desktop.desktop
+ source = github-desktop.patch
+ sha256sums = SKIP
+ sha256sums = ce0dae70066703df656aa6f509f9a7f4f59e081e8f05be8aa7a81ee4605661c3
+ sha256sums = 25979a1e08c87361d457a277cb39327bdd82cadb3207f21bd11580579d9ecc62
+
+pkgname = github-desktop-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..f23c4e811e5
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Ian MacKay <immackay0@gmail.com>
+#
+# Gnome Keyring requires setup if you are using a window manager
+# You will need to import 5CC908FDB71E12C2 for libcurl-openssl-1.0
+
+_pkgname='github-desktop'
+pkgname="${_pkgname}-git"
+pkgver=1.0.10.beta0.r29.gc6a57140e
+pkgrel=1
+pkgdesc="GUI for managing Git and GitHub."
+arch=('x86_64')
+url="https://desktop.github.com"
+license=('MIT')
+depends=('gnome-keyring' 'git' 'electron' 'nodejs' 'libcurl-compat' 'libcurl-gnutls')
+optdepends=('hub: CLI interface for GitHub.')
+makedepends=('libcurl-openssl-1.0' 'xorg-server-xvfb' 'yarn')
+provides=('github-desktop')
+conflicts=('github-desktop')
+source=(
+ git+https://github.com/desktop/desktop.git
+ $_pkgname.desktop
+ $_pkgname.patch
+)
+sha256sums=(
+ 'SKIP'
+ ce0dae70066703df656aa6f509f9a7f4f59e081e8f05be8aa7a81ee4605661c3
+ 25979a1e08c87361d457a277cb39327bdd82cadb3207f21bd11580579d9ecc62
+)
+pkgver() {
+ cd desktop
+ git describe --long --tags | sed 's/^release.//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+prepare() {
+ cd desktop
+ patch -p1 -i "$srcdir/$_pkgname.patch"
+}
+build() {
+ cd desktop
+ export DISPLAY=':99.0'
+ Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
+ yarn install
+ yarn build:prod
+}
+package() {
+ install -d "$pkgdir/opt/$_pkgname"
+ cp -r --preserve=mode desktop/dist/GitHub\ Desktop-linux-x64/* "$pkgdir/opt/$_pkgname/"
+ printf '#!/bin/sh\n\nLD_PRELOAD=libcurl.so.3 /opt/github-desktop/GitHub\ Desktop "$@"\n' | install -Dm755 /dev/stdin "$pkgdir/usr/bin/github-desktop"
+ install -D "$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop"
+ install -D "desktop/app/static/logos/1024x1024.png" "$pkgdir/usr/share/icons/hicolor/1024x1024/apps/$_pkgname.png"
+ install -D "desktop/app/static/logos/512x512.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$_pkgname.png"
+ install -D "desktop/app/static/logos/256x256.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/$_pkgname.png"
+}
diff --git a/github-desktop.desktop b/github-desktop.desktop
new file mode 100644
index 00000000000..90e1ee0b719
--- /dev/null
+++ b/github-desktop.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=GitHub Desktop
+Comment=Extend your GitHub workflow beyond your browser with GitHub Desktop
+Comment[es]=Trabaja con GitHub desde tu escritorio.
+Comment[eu]=GitHub-ekin lan egin zure ordenagailutik.
+Exec=/usr/bin/github-desktop %U
+Terminal=false
+Type=Application
+Icon=github
+Categories=Development;
diff --git a/github-desktop.patch b/github-desktop.patch
new file mode 100644
index 00000000000..ae28d847d9a
--- /dev/null
+++ b/github-desktop.patch
@@ -0,0 +1,73 @@
+diff -ura orig/app/src/lib/shells/linux.ts new/app/src/lib/shells/linux.ts
+--- orig/app/src/lib/shells/linux.ts 2017-11-16 13:55:35.000000000 -0800
++++ new/app/src/lib/shells/linux.ts 2017-11-17 05:27:59.832386000 -0800
+@@ -6,11 +6,13 @@
+ export enum Shell {
+ Gnome = 'GNOME Terminal',
+ Tilix = 'Tilix',
++ Urxvt = 'URxvt',
+ }
+
+-export const Default = Shell.Gnome
++export const Default = Shell.Urxvt
+
+ export function parse(label: string): Shell {
++
+ if (label === Shell.Gnome) {
+ return Shell.Gnome
+ }
+@@ -19,6 +21,10 @@
+ return Shell.Tilix
+ }
+
++ if (label === Shell.Urxvt) {
++ return Shell.Urxvt
++ }
++
+ return Default
+ }
+
+@@ -32,6 +38,8 @@
+ return getPathIfAvailable('/usr/bin/gnome-terminal')
+ case Shell.Tilix:
+ return getPathIfAvailable('/usr/bin/tilix')
++ case Shell.Urxvt:
++ return getPathIfAvailable('/usr/bin/urxvt')
+ default:
+ return assertNever(shell, `Unknown shell: ${shell}`)
+ }
+@@ -40,9 +48,10 @@
+ export async function getAvailableShells(): Promise<
+ ReadonlyArray<IFoundShell<Shell>>
+ > {
+- const [gnomeTerminalPath, tilixPath] = await Promise.all([
++ const [gnomeTerminalPath, tilixPath, urxvtPath] = await Promise.all([
+ getShellPath(Shell.Gnome),
+ getShellPath(Shell.Tilix),
++ getShellPath(Shell.Urxvt),
+ ])
+
+ const shells: Array<IFoundShell<Shell>> = []
+@@ -54,6 +63,10 @@
+ shells.push({ shell: Shell.Tilix, path: tilixPath })
+ }
+
++ if (urxvtPath) {
++ shells.push({ shell: Shell.Urxvt, path: urxvtPath })
++ }
++
+ return shells
+ }
+
+@@ -61,6 +74,11 @@
+ shell: IFoundShell<Shell>,
+ path: string
+ ): Promise<void> {
++ if (shell.shell === Shell.Urxvt) {
++ const commandArgs = ['-cd', path]
++ await spawn(shell.path, commandArgs)
++ }
++
+ const commandArgs = ['--working-directory', path]
+ await spawn(shell.path, commandArgs)
+ }