summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 611c87cab35e6d1e875e559305522bb062b177f3 (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
# Maintainer: zccrs <zhangjide@deepin.org>
pkgname=dtk6declarative-git
pkgver=6.0.5.r4.ge4af639
pkgrel=1
sourcename=dtk6declarative
sourcetars=("$sourcename"_"$pkgver".tar.xz)
sourcedir="$sourcename"
pkgdesc='Deepin Toolkit, declarative module for DDE look and feel'
arch=('x86_64' 'aarch64')
url="https://github.com/linuxdeepin/dtk6declarative"
license=('LGPL3')
depends=('qt6-declarative'
         'qt6-shadertools'
         'qt6-5compat'
	       'dtkcommon'
         'dtk6core'
         'dtk6gui')
makedepends=('git' 'qt6-tools' 'gtest' 'cmake'  'ninja' 'doxygen')
conflicts=('dtk6declarative')
provides=('dtk6declarative')
groups=('deepin-git')
source=("git+${url}")
sha512sums=('SKIP')

pkgver() {
  cd $sourcedir
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd $sourcedir
  version=$(git describe --long --tags | awk -F'[+_~-]' '{print $1}')
  cmake -GNinja \
      -DMKSPECS_INSTALL_DIR=lib/qt6/mkspecs/modules/\
      -DQML_INSTALL_DIR=lib/qt6/qml \
      -DBUILD_DOCS=OFF \
      -DBUILD_EXAMPLES=OFF \
      -DQCH_INSTALL_DESTINATION=share/doc/qt6 \
      -DCMAKE_INSTALL_LIBDIR=lib \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release \
      -DDTK_VERSION=$version
}

package() {
  cd $sourcedir
  DESTDIR="$pkgdir" ninja install
}