summaryrefslogtreecommitdiff
path: root/extra/qtscriptgenerator/PKGBUILD
blob: 9ca941734a0a82d2e3b5476650fc59c28b02afba (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
# $Id: PKGBUILD 158023 2012-05-01 07:24:53Z andrea $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=qtscriptgenerator
pkgver=0.2.0
pkgrel=1
pkgdesc="A tool that generates Qt bindings for Qt Script"
arch=("i686" "x86_64")
url="https://code.google.com/p/qtscriptgenerator/"
license=('GPL')
depends=('qtwebkit')
makedepends=('pkgconfig' 'mesa')
source=("https://qtscriptgenerator.googlecode.com/files/${pkgname}-src-${pkgver}.tar.gz"
        'phonon.patch'
        'no-phonon.patch')
sha1sums=('4c1078f26b196156e857c17c9d11a66cfea66f00'
          'cca1cd546628a10a91475a82fe12ad2e4066a7d0'
          'c50b26e6504f5c981a916860d9c3929e436e1067')

build() {
  cd "${srcdir}"/$pkgname-src-$pkgver

  patch -p1 -i "${srcdir}"/phonon.patch
  patch -p1 -i "${srcdir}"/no-phonon.patch

  # prepare plugins
  cd generator
  qmake
  make
  ./generator --include-paths=/usr/include

  # build plugins
  cd "${srcdir}"/$pkgname-src-$pkgver/qtbindings
  qmake
  make
}

package() {
  cd "${srcdir}"/$pkgname-src-$pkgver/qtbindings
  # move plugins to correct directory
  install -d "${pkgdir}"/usr/lib/qt/plugins/script
  cp -a "${srcdir}"/$pkgname-src-$pkgver/plugins/script/* \
    "${pkgdir}"/usr/lib/qt/plugins/script/
}