summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0ee667df7b83791f8858c76eab8a7dddc6057063 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# $Id: PKGBUILD 226039 2017-04-27 13:52:30Z felixonmars $
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: csslayer <wengxt AT gmail com>

_pkgname=fcitx5-qt
pkgbase=$_pkgname-git
pkgname=(fcitx5-qt5-git fcitx5-qt4-git fcitx5-qt6-git)
pkgver=5.0.1.r8.gddc2214
pkgrel=2
pkgdesc="Fcitx Qt Library"
arch=('x86_64')
url="https://github.com/fcitx/fcitx5-qt"
license=('GPL')
depends=('fcitx5-git')
makedepends=('extra-cmake-modules' 'git' 'qt4' 'qt5-base' 'qt6-base')
source=("git+$url.git")
sha512sums=('SKIP')

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

build(){
  cd $_pkgname

  cmake \
      -DCMAKE_INSTALL_PREFIX=/usr \
      -DCMAKE_BUILD_TYPE=Release \
      -DCMAKE_INSTALL_LIBDIR=/usr/lib \
      -DENABLE_QT6=On \
      .
  make

  # install into /tmp and split the package
  make DESTDIR="/tmp/$_pkgname/" install
}

_mv_pkg(){
  mkdir -p "$pkgdir/$(dirname $1)"
  mv "$@" "$pkgdir/$(dirname $1)"
}

package_fcitx5-qt5-git(){
  depends=('fcitx5-git' 'qt5-base')
  provides=('fcitx5-qt5' 'fcitx5-qt')
  conflicts=('fcitx5-qt5' 'fcitx5-qt')
  pkgdesc="Fcitx Qt Library, for Qt5"

  cd /tmp/$_pkgname
  _mv_pkg usr/share
  _mv_pkg usr/lib/qt
  _mv_pkg usr/lib/libFcitx5Qt5*
  _mv_pkg usr/lib/fcitx5
  _mv_pkg usr/lib/cmake/Fcitx5Qt5DBusAddons
  _mv_pkg usr/lib/cmake/Fcitx5Qt5WidgetsAddons
  _mv_pkg usr/include/Fcitx5Qt5
}

package_fcitx5-qt4-git(){
  depends=('fcitx5-git' 'qt4')
  provides=('fcitx5-qt4')
  conflicts=('fcitx5-qt4')
  pkgdesc="Fcitx Qt Library, for Qt4"

  cd /tmp/$_pkgname
  _mv_pkg usr/lib/qt4
  _mv_pkg usr/lib/libFcitx5Qt4*
  _mv_pkg usr/lib/cmake/Fcitx5Qt4DBusAddons
  _mv_pkg usr/include/Fcitx5Qt4
}


package_fcitx5-qt6-git(){
  depends=('fcitx5-git' 'qt6-base')
  provides=('fcitx5-qt6')
  conflicts=('fcitx5-qt6')
  pkgdesc="Fcitx Qt Library, for Qt6"

  cd /tmp/$_pkgname
  _mv_pkg usr/lib/qt6
  _mv_pkg usr/lib/libFcitx5Qt6*
  _mv_pkg usr/lib/cmake/Fcitx5Qt6DBusAddons
  _mv_pkg usr/include/Fcitx5Qt6
}