summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: eebf4564728cabf0bd52ac07aee00055b73fa235 (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
# Maintainer: laloch <lalochcz@gmail.com>

_pkgname=kwin-effect-osdclock
pkgname="$_pkgname-git"
pkgver=20180812.991372d
pkgrel=1
pkgdesc='KWin effect that displays clock at the corner of the screen'
arch=('x86_64')
url="https://github.com/laloch/${_pkgname}"
license=('GPL')
depends=('kwin')
makedepends=('extra-cmake-modules' 'git' 'pkgconf')
source=("$_pkgname"::"git+http://github.com/laloch/${_pkgname}.git")
md5sums=('SKIP')

pkgver() {
    cd $_pkgname
    echo "$(git log -1 --format="%cd" --date=short | tr -d '-').$(git log -1 --format="%h")"
}

prepare() {
    cd $_pkgname
    mkdir -p build
}

build(){
    cd $_pkgname
    cd build
    cmake .. \
        -DCMAKE_C_FLAGS:STRING="" \
        -DCMAKE_CXX_FLAGS:STRING="" \
        -DCMAKE_EXE_LINKER_FLAGS:STRING="" \
        -DCMAKE_SHARED_LINKER_FLAGS:STRING="" \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -DCMAKE_INSTALL_LIBDIR=lib
    make
}

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