summaryrefslogtreecommitdiff
path: root/extra/qtscriptgenerator/PKGBUILD
blob: 328e6d28eda58d1056cb587fa8438834df4a298c (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
# $Id: PKGBUILD 145770 2011-12-30 11:51:06Z andrea $
# Maintainer: Tobias Powalowski <tpowa@archlinux.org>

pkgname=qtscriptgenerator
pkgver=0.1.0
pkgrel=5
pkgdesc="A tool that generates Qt bindings for Qt Script"
arch=("i686" "x86_64")
url="https://code.google.com/p/qtscriptgenerator/"
license=('GPL')
depends=('qt' 'phonon' 'qtwebkit')
makedepends=('pkgconfig' 'mesa')
source=("https://qtscriptgenerator.googlecode.com/files/${pkgname}-src-${pkgver}.tar.gz"
        'no-phonon.patch'
        'gcc44.patch'
        'qt48.patch'
        'phonon.patch')
sha1sums=('eeae733106369e289f257b754822bc372fd6ba75'
          'c50b26e6504f5c981a916860d9c3929e436e1067'
          '87cd599403fa9bb441ddc27c77e0b6242e2cc150'
          '5487e2ed1ce4d35b48b3433dc5cc2a1752a03ff1'
          'cca1cd546628a10a91475a82fe12ad2e4066a7d0')

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

  patch -p0 -i "${srcdir}"/gcc44.patch
  patch -p1 -i "${srcdir}"/phonon.patch
  patch -p1 -i "${srcdir}"/qt48.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
  mv "${srcdir}"/$pkgname-src-$pkgver/plugins/script/* \
    "${pkgdir}"/usr/lib/qt/plugins/script/
}