# Contributor: Alex Laskin <alex@lask.in>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=ddcutil
pkgver=2.1.4
pkgrel=0
pkgdesc="Query and change Linux monitor settings using DDC/CI and USB"
url="https://github.com/rockowitz/ddcutil"
arch="all"
license="GPL-2.0-only"
makedepends="
	autoconf
	automake
	eudev-dev
	glib-dev
	i2c-tools-dev
	jansson-dev
	kmod-dev
	libtool
	libusb-dev
	libxrandr-dev
	linux-headers
	"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rockowitz/ddcutil/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--mandir=/usr/share/man
	make
}

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

sha512sums="
8c352bfacc2a5cdd22b8d84f2facd58de6d425d0d3f98de543cf36a3e6b15aa10fc86e87780c82f872f0bf0db984e1cc800aaff914bafe4dbf17602e2a7caeb0  ddcutil-2.1.4.tar.gz
"
