summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: e5f4f86fd8610eddfe1916167608f2c22a6bb93d (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
# Maintainer: German Lashevich <german.lashevich@gmail.com>
# Contributor: Orestis Floros <orestisf1993@gmail.com>
# Contributor: Doron Behar <doron.behar@gmail.com>

_pkgname=xkb-switch-i3

pkgname=xkb-switch-i3-git
pkgver=1.6.0.r7.g69fe11f
pkgrel=1
pkgdesc='Program that allows to query and change the XKB layout state (with i3wm auto-switch mode)'
conflicts=('xkb-switch')
provides=('xkb-switch')
arch=('i686' 'x86_64')
url="https://github.com/zebradil/${_pkgname}"
license=('GPL3')
depends=('libx11' 'libxkbfile' 'i3-wm')
makedepends=('git' 'cmake' 'libsigc++')
source=(
    "git+https://github.com/zebradil/${_pkgname}.git#branch=master"
    "git+https://github.com/drmgc/i3ipcpp.git"
)
sha1sums=(
    'SKIP'
    'SKIP'
)

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

build() {
    cd "${srcdir}/${_pkgname}"
    git submodule init
    git config "submodule.i3ipc++.url" "${srcdir}/i3ipcpp"
    git submodule update

    cmake -DCMAKE_INSTALL_PREFIX=/usr .
    make
}

package() {
    cd "${srcdir}/${_pkgname}"
    make DESTDIR="$pkgdir/" install
}