# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer:
pkgname=compton-conf
pkgver=0.3.0
pkgrel=0
pkgdesc="GUI configuration tool for compton X composite manager"
url="https://github.com/lxde/compton-conf"
arch="all"
license="LGPL-2.1"
depends=""
makedepends="cmake libconfig-dev qt5-qtbase-dev qt5-qttools-dev lxqt-build-tools"
install=""
options="!check"
subpackages=""
source="compton-conf-$pkgver.tar.gz::https://github.com/lxde/compton-conf/archive/$pkgver.tar.gz"
builddir="$srcdir/compton-conf-$pkgver"

build() {
	cd "$builddir"
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux \
			-DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		${CMAKE_CROSSOPTS} \
		-DPULL_TRANSLATIONS=False
	make
}

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

sha512sums="30ecc5f25a3d0aec5ac266a55c1798b875e0dafb4fe73fef6f1e50814be104822139ef0b5bf509824132ecd2dfef4845522b1351da5a40c2977121e5c1d2bcf9  compton-conf-0.3.0.tar.gz"
