summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 767d9359ea5886217fac786b6a15025ffcdff7dc (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
# Maintainer: éclairevoyant

pkgbase=im-emoji-picker-git
pkgname=('fcitx5-im-emoji-picker-git' 'ibus-im-emoji-picker-git')
pkgver=1.0.1.r5.g06b140b
pkgrel=1
pkgdesc='Qt 5-based emoji picker'
arch=('x86_64')
url=https://github.com/GaZaTu/im-emoji-picker
license=('MIT')
depends=('qt5-base' 'icu' 'hicolor-icon-theme')
makedepends=('cmake' 'git' 'fcitx5' 'ibus')
provides=('im-emoji-picker')
conflicts=('im-emoji-picker')
source=("git+$url.git")
b2sums=('SKIP')

pkgver() {
    cd im-emoji-picker
    git describe --long --tags --exclude nightly-build | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
    cd im-emoji-picker

    mkdir -p build-fcitx5
    cd build-fcitx5
    cmake -DCMAKE_BUILD_TYPE=None -DONLY_FCITX5=1 ..
    make

    cd ..

    mkdir -p build-ibus
    cd build-ibus
    cmake -DCMAKE_BUILD_TYPE=None -DONLY_IBUS=1 ..
    make
}

package_fcitx5-im-emoji-picker-git() {
    pkgdesc+=' (Fcitx5 module)'
    depends+=('fcitx5')

    cd im-emoji-picker
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/im-emoji-picker/"
    install -Dm644 src/res/im-emoji-picker_32x32.png \
         "$pkgdir/usr/share/icons/hicolor/32x32/apps/im-emoji-picker.png"

    install -Dm644 fcitx5-addon.conf \
         "$pkgdir/usr/share/fcitx5/addon/fcitx5imemojipicker.conf"
    install -Dm644 build-fcitx5/fcitx5imemojipicker.so -t "$pkgdir/usr/lib/fcitx5/"
}

package_ibus-im-emoji-picker-git() {
    pkgdesc+=' (IBus)'
    depends+=('ibus')

    cd im-emoji-picker
    install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/im-emoji-picker/"
    install -Dm644 src/res/im-emoji-picker_32x32.png \
         "$pkgdir/usr/share/icons/hicolor/32x32/apps/im-emoji-picker.png"

    install -Dm644 ibus-component.xml \
          "$pkgdir/usr/share/ibus/component/ibusimemojipicker.xml"
    install -Dm644 build-ibus/ibusimemojipicker -t "$pkgdir/usr/lib/ibus/"
}