author | Andrea Scarpino
<andrea@archlinux.org> 2014-09-19 11:55:05 UTC |
committer | Andrea Scarpino
<andrea@archlinux.org> 2014-09-19 11:55:05 UTC |
parent | 24129174f0390a6c537e949c0e9b41b64e0d5d05 |
PKGBUILD | +33 | -11 |
diff --git a/PKGBUILD b/PKGBUILD index 66d8ad6..f33af2f 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,30 +1,52 @@ # Maintainer: Andrea Scarpino <andrea@archlinux.org> -pkgname=grantlee -pkgver=0.4.0 +pkgbase=grantlee +pkgname=('grantlee-qt4' 'grantlee-qt5') +pkgver=0.5.0 pkgrel=1 pkgdesc="A string template engine based on the Django template system and written in Qt" arch=('i686' 'x86_64') -url="http://www.gitorious.org/grantlee/pages/Home" +url="https://www.gitorious.org/grantlee/pages/Home" license=('LGPL3') -depends=('qt4') -makedepends=('cmake' 'doxygen') -source=("http://downloads.grantlee.org/${pkgname}-${pkgver}.tar.gz") -md5sums=('fa8a2e9be7be7e3a89e700679e6f3014') +makedepends=('qt4' 'qt5-script' 'cmake' 'doxygen') +source=("http://downloads.grantlee.org/${pkgbase}-${pkgver}.tar.gz") +md5sums=('3664b26b747be69ae77aae89829d1db1') prepare() { - mkdir build + mkdir build{,-qt4} } build() { cd build - cmake ../${pkgname}-${pkgver} \ + cmake ../${pkgbase}-${pkgver} \ -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_BUILD_TYPE=Release + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=OFF \ + -DGrantlee_Qt5_TRANSITIONAL=ON + make + + cd ../build-qt4 + cmake ../${pkgbase}-${pkgver} \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_TESTS=OFF \ + -DQT_QMAKE_EXECUTABLE=/usr/bin/qmake-qt4 make } -package() { +package_grantlee-qt5() { + depends=('qt5-script') + cd build make DESTDIR="${pkgdir}" install } + +package_grantlee-qt4() { + depends=('qt4') + replaces=('grantlee') + conflicts=('grantlee') + provides=('grantlee') + + cd build-qt4 + make DESTDIR="${pkgdir}" install +}