git » attica.git » commit 2897e56

snapshot is needed for KF5

author Andrea Scarpino
2013-12-21 07:48:55 UTC
committer Andrea Scarpino
2013-12-21 07:48:55 UTC
parent 67ffdd3a00e031c39a22d161faa2b8f85c925bf0

snapshot is needed for KF5

PKGBUILD +47 -12

diff --git a/PKGBUILD b/PKGBUILD
index b73a2e3..4cc481a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,27 +1,62 @@
 # Maintainer: Andrea Scarpino <andrea@archlinux.org>
 
-pkgname=attica
-pkgver=0.4.2
+pkgbase=attica
+#pkgname=('attica-qt4' 'attica-qt5')
+pkgname=('attica-qt5')
+pkgver=v0.4.2.r14.ga84850f
 pkgrel=1
-pkgdesc='A Qt library that implements the Open Collaboration Services API'
 arch=('i686' 'x86_64')
 url='https://projects.kde.org/projects/kdesupport/attica'
 license=('LGPL')
-depends=('qt4')
-makedepends=('cmake')
-source=("http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
-md5sums=('d62c5c9489a68432e8d990dde7680c24')
+#makedepends=('extra-cmake-modules' 'qt4' 'qt5-base' 'git')
+makedepends=('extra-cmake-modules' 'qt5-base' 'git')
+source=("git://anongit.kde.org/${pkgbase}.git")
+#source=("http://download.kde.org/stable/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
+md5sums=('SKIP')
 
-build() {
+pkgver() {
+  cd ${pkgbase}
+  git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+prepare() {
   mkdir build
-  cd build
-  cmake ../${pkgname}-${pkgver} \
+  mkdir build-qt5
+}
+
+build() {
+#  cd build
+#  cmake ../${pkgbase} \
+#    -DCMAKE_BUILD_TYPE=Release \
+#    -DCMAKE_INSTALL_PREFIX=/usr \
+#    -DATTICA_ENABLE_TESTS=OFF \
+#    -DQT4_BUILD=ON
+#  make
+
+  cd build-qt5
+  cmake ../${pkgbase} \
     -DCMAKE_BUILD_TYPE=Release \
-    -DCMAKE_INSTALL_PREFIX=/usr
+    -DCMAKE_INSTALL_PREFIX=/opt/kf5 \
+    -DATTICA_ENABLE_TESTS=OFF \
+    -DQT4_BUILD=OFF
   make
 }
 
-package() {
+package_attica-qt4() {
+  pkgdesc='A Qt4 library that implements the Open Collaboration Services API'
+  depends=('qt4')
+  provides=('attica')
+  conflicts=('attica')
+  replaces=('attica')
+
   cd build
   make DESTDIR="${pkgdir}" install
 }
+
+package_attica-qt5() {
+  pkgdesc='A Qt5 library that implements the Open Collaboration Services API'
+  depends=('qt5-base')
+
+  cd build-qt5
+  make DESTDIR="${pkgdir}" install
+}