summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 91f435b0eb2d78d8320b8921fdcd0d43ba0c9e6f (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
# Maintainer: mrdotx <klassiker@gmx.de>
# Contributor: nutcase84 <nutcase84 at protronmail dot com>
# Contributor: kfgz <kfgz at interia pl>
# Contributor: Hubert CzobodziЕ„ski <hcz at onet dot eu>
# Contributor: Nathan Owe <ndowens dot aur at gmail dot com>
_pkgname=ddccontrol
pkgname=ddccontrol-git
pkgver=20220914.r26957e0
pkgrel=1
pkgdesc='Control your monitor by software using the DDC/CI protocol.'
arch=('i686' 'x86_64')
url='https://github.com/ddccontrol/ddccontrol'
license=('GPL')
depends=(
    'pciutils'
    'libxml2'
    'ddccontrol-db-git'
)
makedepends=(
    'git'
    'intltool'
)
provides=('ddccontrol')
conflicts=('ddccontrol')
source=(git+https://github.com/ddccontrol/ddccontrol.git)
options=('!libtool')
md5sums=('SKIP')

pkgver() {
    cd "$_pkgname"

    _gitver="$(git show -s --format="%ci %h" 2> /dev/null)"
    _gitver="${_gitver//[^[:alnum:][:space:]]/}"

    echo "${_gitver%% *}.r${_gitver##* }"
}

prepare() {
    cd "$_pkgname"
    # PKGBUILD should be non-interactive...
    sed -e 's:read dummy < /dev/tty::' "$(which gettextize)" > gettextize
    chmod +x gettextize

    sed -e 's:^gettextize :./gettextize :' -i autogen.sh
}

build() {
    cd "$_pkgname"
    ./autogen.sh
    ./configure --prefix=/usr --sysconfdir=/etc
    make
}

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