summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 39594ace82a824cb7fc7dc5d3a26ee8e52e48783 (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
# Maintainer: Meow-2 <orzkey@outlook.com>

pkgname=rofi-imdkit
pkgver=1.7.5.r178.g9cea843b
pkgrel=1
pkgdesc='A window switcher, run dialog and dmenu replacement(build with imdkit to support fcitx input)'
arch=('x86_64')
url='https://github.com/DaveDavenport/rofi/'
license=('MIT')
depends=(
    'cairo'
    'flex'
    'freetype2'
    'libjpeg'
    'librsvg'
    'libx11'
    'libxcb'
    'libxdg-basedir'
    'libxft'
    'libxkbcommon'
    'libxkbcommon-x11'
    'pango'
    'startup-notification'
    'xcb-util'
    'xcb-util-cursor'
    'xcb-util-wm'
    'xcb-util-xrm'
    'xcb-imdkit'
)
makedepends=('git' 'meson' 'ninja')
checkdepends=('check')
provides=("${pkgname/-imdkit/}")
conflicts=("${pkgname/-imdkit/}")
source=(
    'git+https://github.com/DaveDavenport/rofi#branch=next'
    'git+https://github.com/sardemff7/libgwater'
    'git+https://github.com/sardemff7/libnkutils'
)
sha256sums=('SKIP' 'SKIP' 'SKIP')

pkgver() {
    cd "${pkgname/-imdkit/}"

    git describe --long --tags \
        | sed 's/-/.r/;s/-/./'
}

prepare() {
    cd "${pkgname/-imdkit/}"
    for module in libgwater libnkutils; do
        local submodule="subprojects/${module}"
        git submodule init "${submodule}"
        git config "submodule.${submodule}.url" "${srcdir}/${module}"
        git submodule update "${submodule}"
    done
    cd "${srcdir}"

    meson setup "${pkgname/-imdkit/}" build \
        --reconfigure -Dimdkit=true \
        --buildtype release \
        --prefix /usr
}

build() {
    ninja -C build
}

check() {
    ninja -C build test
}

package() {
    DESTDIR="${pkgdir}" ninja -C build install

    cd "${pkgname/-imdkit/}"
    install -Dm644 COPYING "${pkgdir}/usr/share/licenses/rofi/COPYING"
    install -Dm755 Examples/*.sh -t "${pkgdir}/usr/share/doc/rofi/examples"
}