Last active
March 23, 2018 06:30
-
-
Save kfatehi/e4d483926d847fdaa8c61125476714e3 to your computer and use it in GitHub Desktop.
ripcord PKGBUILD
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is a pkgbuild for ripcord | |
rationale | |
appimages are nice but you still need a way to “install” it on your machine + desktop icons and shit | |
AFAIK there is still no way standard to actually install appimages as a “desktop app” (desktop link, start menu shit, and so on). | |
what is interesting is that AppImages actually come with a .desktop file for that purpose | |
but there is no real process or standard by which distros are to install them | |
in fact that is where the pkgbuild picks up. it just exrtacts the .desktop and icon image and puts them in the right place, and puts the AppImage binary in /opt/appimages which seems like people are standardizing around | |
at least in the arch world, idk about other distros |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Basing this off upwork-appimage.git and gulden-appimage | |
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=gulden-appimage | |
# https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=upwork-appimage | |
_pkgname=ripcord | |
_upkgname=Ripcord | |
pkgname=ripcord-appimage | |
pkgver=0.2.83 | |
pkgrel=1 | |
pkgdesc="A desktop chat client for Discord (and soon Slack)" | |
arch=('x86_64') | |
url='https://cancel.fm/ripcord/' | |
license=('unknown') | |
options=('!strip') # need to disable binary stripping in order for the appimage not to get corrupted | |
depends=('p7zip') | |
noextract=("$_upkgname-$pkgver-${CARCH}.AppImage") | |
source_x86_64=("https://cancel.fm/dl/${_upkgname}-${pkgver}-${CARCH}.AppImage") | |
md5sums_x86_64=('5a7a7c702aabd093577f43fb6b90b062') | |
prepare() { | |
cd "${srcdir}" | |
# Extract relevant files from AppImage, redirect to /dev/null to avoid spamming the terminal | |
7z x -y "${srcdir}/$_upkgname-$pkgver-$CARCH.AppImage" "${_upkgname}_Icon.png" > /dev/null | |
7z x -y "${srcdir}/$_upkgname-$pkgver-$CARCH.AppImage" "${_upkgname}.desktop" > /dev/null | |
sed -i "s/Exec=Ripcord/Exec=\/opt\/appimages\/$_upkgname-$pkgver-$CARCH.AppImage/" "${_upkgname}.desktop" | |
} | |
package() { | |
cd "${srcdir}" | |
install -Dm644 "${_upkgname}_Icon.png" "$pkgdir/usr/share/pixmaps/$_pkgname.png" | |
install -Dm644 "${_upkgname}.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop" | |
install -Dm755 "${_upkgname}-$pkgver-$CARCH.AppImage" "$pkgdir/opt/appimages/$_upkgname-$pkgver-$CARCH.AppImage" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment