summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 08408770fd445ca6a5727d797fb8af4054ce5cdb (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
# Maintainer: Sefa Eyeoglu <contact@scrumplex.net>

pkgbase=vibrant-git
pkgname=(libvibrant-git vibrant-cli-git)
pkgver=1.0.3.r18.g2100c09
pkgrel=2
pkgdesc="A simple library to adjust color saturation of X11 outputs."
arch=(x86_64)
url="https://github.com/libvibrant/libvibrant"
license=("GPL3" "custom:MIT")
makedepends=("git" "cmake" "check" "libxrandr" "libxnvctrl")
source=("${pkgbase}::git+https://github.com/libvibrant/libvibrant.git")
sha512sums=('SKIP')


pkgver() {
    cd "$pkgbase"

    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {

    cmake -B build -S "$pkgbase" \
        -DCMAKE_BUILD_TYPE='Release' \
        -DCMAKE_INSTALL_PREFIX='/usr' \
        -Wno-dev
    make -C build
}

check() {

    make -C build test
}

package_libvibrant-git() {
    provides=("libvibrant" "libvibrant.so=1-64")
    conflicts=("vibrant" "libvibrant")
    depends=("libxrandr" "libxnvctrl")

    cd "build"

    env DESTDIR="$pkgdir" cmake -DCOMPONENT=lib -P cmake_install.cmake

    cd "../$pkgbase"

    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/${pkgname}/NOTICE"
    install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}

package_vibrant-cli-git() {
    provides=("vibrant-cli")
    conflicts=("vibrant" "vibrant-cli")
    depends=("libvibrant.so")

    cd "build"

    env DESTDIR="$pkgdir" cmake -DCOMPONENT=cli -P cmake_install.cmake

    cd "../$pkgbase"

    install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
    install -Dm644 NOTICE "${pkgdir}/usr/share/licenses/${pkgname}/NOTICE"
    install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
}