void-packages/srcpkgs/cbatticon-gtk3/template

39 lines
1.2 KiB
Bash

# Template file for 'cbatticon-gtk3'
pkgname=cbatticon-gtk3
version=1.6.8
revision=1
wrksrc="cbatticon-${version}"
build_style=gnu-makefile
hostmakedepends="pkg-config"
makedepends="gtk+-devel libnotify-devel"
short_desc="Lightweight and fast battery icon that sits in your systray - GTK3"
maintainer="Orphaned <orphan@voidlinux.org>"
license="GPL-2.0-only"
homepage="https://github.com/valr/cbatticon"
distfiles="https://github.com/valr/cbatticon/archive/${version}.tar.gz"
checksum=369f3fb20bd97e4aec5acf5915d8a5c9651033fc71b793913fd86f19d5feb4a0
provides="cbatticon-${version}_${revision}"
replaces="cbatticon-gtk2>=0"
do_build() {
# Cannot build GTK2/3 versions in the same folder!
cp -a ${wrksrc} ${wrksrc}-gtk2
# GTK3
make_build_args="WITH_NOTIFY=1 WITH_GTK3=1"
make ${makejobs} ${make_build_args} ${make_build_target}
# GTK2
cd ${wrksrc}-gtk2
make_build_args="WITH_NOTIFY=1 WITH_GTK3=0"
make ${makejobs} ${make_build_args} ${make_build_target}
}
cbatticon-gtk2_package() {
short_desc="${short_desc/GTK3/GTK2}"
provides="cbatticon-${version}_${revision}"
replaces="cbatticon-gtk3>=0"
pkg_install() {
make STRIP=true PREFIX=/usr DESTDIR=${PKGDESTDIR} -C ${wrksrc}-gtk2 install
}
}