summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorOndrej Patrovic2016-10-27 12:30:40 -0400
committerOndrej Patrovic2016-10-27 12:30:40 -0400
commit2b433c938f776cd498dca95eb602223c1a2412e6 (patch)
treeba2d008f425f318125ca5926b2be9acac20f84b7
parent16dd4aacface2d9f871f9e9fc6fb50312e84d7b8 (diff)
downloadaur-2b433c938f776cd498dca95eb602223c1a2412e6.tar.gz
Greatly simplified PKGBUILD
Correctly utilise source_i686/sha256sums_i686 and source_x86_64/sha256sums_x86_64
-rwxr-xr-xPKGBUILD31
1 files changed, 10 insertions, 21 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 2c9dc7ad891..cf1887ba5f5 100755
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
_pkgname=messengerfordesktop
pkgname=${_pkgname}-bin
pkgver=2.0.1
-pkgrel=1
+pkgrel=2
pkgdesc="Beautiful desktop client for Facebook Messenger. Binary version."
arch=('i686' 'x86_64')
url="http://messengerfordesktop.com/"
@@ -14,32 +14,21 @@ options=(!strip)
depends=('libxtst' 'alsa-lib' 'gtk2' 'gconf' 'libnotify' 'nss')
makedepends=('tar')
-if [ $CARCH == x86_64 ]; then
- noextract=("${_pkgname}-${pkgver}-linux-amd64.deb")
- sha256sums=('d4c9eebc60f51c2ba5c136617f6dd71121feb3d8c99b7b563498109d7be74d45')
-else
- noextract=("${_pkgname}-${pkgver}-linux-i386.deb")
- sha256sums=('ed05f1afb3d25589c071276c7cc12bff1f5a6e4acb301eeab1cc3300a97d5726')
-fi
+_debname="${_pkgname}-${pkgver}-${CARCH}.deb"
+noextract=("${_debname}")
-source=("https://github.com/Aluxian/Facebook-Messenger-Desktop/releases/download/v${pkgver}/${noextract[0]}")
+source_i686=("${_debname}::https://github.com/Aluxian/Facebook-Messenger-Desktop/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-i386.deb")
+source_x86_64=("${_debname}::https://github.com/Aluxian/Facebook-Messenger-Desktop/releases/download/v${pkgver}/${_pkgname}-${pkgver}-linux-amd64.deb")
-package() {
- mkdir ${_pkgname}
- ar p ${noextract[0]} data.tar.gz | tar -xzC ${_pkgname}
+sha256sums_i686=('ed05f1afb3d25589c071276c7cc12bff1f5a6e4acb301eeab1cc3300a97d5726')
+sha256sums_x86_64=('d4c9eebc60f51c2ba5c136617f6dd71121feb3d8c99b7b563498109d7be74d45')
- cd ${_pkgname}
- find . -type f -exec install -Dm 644 {,"${pkgdir}/"}{} \;
+package() {
+ ar p "${_debname}" data.tar.gz | tar -zxpC "${pkgdir}"
cd "${pkgdir}"
-
# Fix the window class in desktop file
sed -i "s/\(StartupWMClass\).\+/\1=messenger for desktop/" "usr/share/applications/${_pkgname}.desktop"
- cd "opt/${_pkgname}"
-
- # Restore execute bit on binary
- chmod +x ${_pkgname}
-
- install -Dm 644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ install -Dm 644 "opt/${_pkgname}/LICENSE" "usr/share/licenses/${pkgname}/LICENSE"
}