summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4193537821aa8afb58573ef16fa799783e4b34a3 (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
53
54
# Maintainer: Shalygin Konstantin <k0ste@opentech.ru>

pkgname='spice-xpi'
pkgver='2.8.90'
pkgrel='11'
pkgdesc='XPI client for interacting with SPICE servers. This package contains a mozilla browser client for interacting with SPICE servers.'
arch=('x86_64')
url='http://spice-space.com'
license=('GPL')
depends=('firefox' 'spice')
provides=('browser-plugin-spice')
conflicts=('browser-plugin-spice')
makedepends=('git' 'python2' 'xulrunner' 'zip' 'gawk')
source=("git://anongit.freedesktop.org/spice/${pkgname}"
	"git://anongit.freedesktop.org/spice/spice-protocol")
sha256sums=('SKIP'
	    'SKIP')

pkgver() {
  cd "${pkgname}"
  git describe --long | gawk 'match($0, /^(spice-xpi)-([0-9.]+)-([0-9]+)-([a-z0-9]+)$/, a) {print a[2]}'
}

prepare() {
  pushd "${pkgname}"
  git submodule init
  git config submodule.spice-protocol.url "${srcdir}/spice-protocol"
  git submodule update
  ./autogen.sh
  make clean

  PYTHON=/usr/bin/python2 \
  ./configure \
  --prefix=/usr \
  --sbindir=/usr/bin \
  --bindir=/usr/bin \
  --sysconfdir=/etc \
  --localstatedir=/var/lib \
  --enable-xpi
  popd
}

build() {
  pushd "${pkgname}"
  make
  popd
}

package() {
  pushd "${srcdir}/${pkgname}"
  make DESTDIR="${srcdir}/xpi-temp" install
  popd
  install -Dm 755 "${srcdir}/xpi-temp/usr/lib/mozilla/plugins/npSpiceConsole.so" "${pkgdir}/usr/lib/mozilla/plugins/npSpiceConsole.so"
}