# Contributor: Mari Hahn <mari.hahn@wwu.de>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=tint2
pkgver=16.2
_gitver="b810bad93ff65854137fbd2f344ad2f99338008f"
pkgrel=1
pkgdesc="tint2 is a simple unintrusive panel/taskbar"
url="https://gitlab.com/o9000/tint2"
arch="all"
license="GPL-2.0"
options="!check"
depends="imlib2 glib pango cairo libxcomposite libxdamage
	libxinerama libxrandr gtk+"
makedepends="cmake imlib2-dev glib-dev pango-dev cairo-dev
    libxcomposite-dev libxdamage-dev libxinerama-dev libxrandr-dev
    gtk+-dev librsvg-dev startup-notification-dev linux-headers"
subpackages="$pkgname-doc $pkgname-lang"
source="$pkgname-$pkgver.tar.bz2::https://gitlab.com/o9000/$pkgname/repository/v$pkgver/archive.tar.bz2"
builddir="$srcdir"/$pkgname-v${pkgver}-$_gitver

prepare() {
	cd "$builddir"
	mkdir -p build
}

build() {
	cd "$builddir"/build
	cmake \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DCMAKE_BUILD_TYPE=Release \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		..
	make
}

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

sha512sums="0fecdde41176aa65fa012381607fc2ffa3bff687887283e9e4ff1134ddfa38ad0385c8d1a70af5593863f5e0eec1bf281122b7b85a5dd2863bb9015bd59f7792  tint2-16.2.tar.bz2"
