summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: dba5301fc5c120e26d374c80c100d49f3e3ac85d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Maintainer: Marcin Wieczorek <marcin@marcin.co>

pkgname=messengerfordesktop-git
pkgver=1.4.8.beta.0.r0.g78f966a
pkgrel=1
pkgdesc="Beautiful desktop client for Facebook Messenger. Sytten's fork"
arch=('i686' 'x86_64')
url="http://messengerfordesktop.com/"
license=('MIT')
conflicts=('messengerfordesktop' 'messengerfordesktop-bin')
options=(!strip)
depends=('libxtst' 'alsa-lib' 'gtk2' 'gconf' 'libnotify' 'nss' 'xorg-xprop' 'xorg-xwininfo')
makedepends=('git' 'gulp' 'npm')
source=("$pkgname::git+https://github.com/Aluxian/Facebook-Messenger-Desktop.git#branch=develop"
		"start.sh")

md5sums=('SKIP'
         '31abbecf99328b1b77ee1bdb1e2d981f')

if [ $CARCH == x86_64 ]; then
  _arch="64"
else
  _arch="32"
fi

pkgver() {
  cd ${pkgname}
  git describe --long | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "${srcdir}/${pkgname}"
  npm install
  gulp build:linux${_arch}
}

package() {
  mkdir -p "${pkgdir}/usr/share/messengerfordesktop/"

  cd "${srcdir}/messengerfordesktop-git/build/Messenger/linux${_arch}"
  for file in `find . -type f`; do
	install -D -m644 "${file}"   "${pkgdir}/usr/share/messengerfordesktop/${file}"
  done;

  install -D -m755 "${srcdir}/start.sh"	  															  "${pkgdir}/usr/bin/messengerfordesktop"
  install -D -m755 "${srcdir}/messengerfordesktop-git/build/Messenger/linux${_arch}/Messenger"		  "${pkgdir}/usr/share/messengerfordesktop/Messenger"
  install -D -m644 "${srcdir}/messengerfordesktop-git/assets-linux/messengerfordesktop.desktop" 	  "${pkgdir}/usr/share/applications/messengerfordesktop.desktop"
  install -D -m644 "${srcdir}/messengerfordesktop-git/assets-linux/icons/256/messengerfordesktop.png" "${pkgdir}/usr/share/pixmaps/messengerfordesktop.png"
  install -D -m644 "${srcdir}/messengerfordesktop-git/LICENSE" 										  "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"

  sed -i '6s/.*/Exec=sh \/usr\/bin\/messengerfordesktop/' "${pkgdir}/usr/share/applications/messengerfordesktop.desktop"
}