### this file is sourced not run
# Note: Upstream project changed name to 'picom' since version 7.5
PKGVER=7.4
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=compton-yshui-$PKGVER.tar.gz
MD5SUM=5b5496c3c8215163d6d83aca8d41f0ac
SRC_URL=https://github.com/yshui/compton/archive/v${PKGVER}.tar.gz
BUNDLE=

SLACKREQ='mesa libdrm libpcre libev libconfig' # asciidoc build-time only
SLACKDESC="compton-yshui: compton-yshui $PKGVER (X lightweight compositor)
compton-yshui: 
compton-yshui: picom a.k.a. compton-yshui is a lightweight compositor, forked from the
compton-yshui: original compton.
compton-yshui: 
compton-yshui: https://github.com/yshui/compton
compton-yshui: https://github.com/chjj/compton
compton-yshui: 
compton-yshui: Note: install either this package or the original 'compton',
compton-yshui: but not both.
compton-yshui: 
"
SLACKCON=compton # install either compton or this package - not both

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	if !  cd /tmp/compton-*; then
		cd /tmp/picom-*
	fi &&
	
	cp /tmp/pkg/uthash.h /usr/include &&
	meson --prefix=/usr --buildtype=release . build \
		-Ddbus=false -Dvsync_drm=true -Dbuild_docs=true &&
	##meson configure -Dprefix=/usr build &&
	ninja -C build &&
	ninja -C build install &&
	
	install -dm755 /etc/xdg &&
	install -m644 compton.sample.conf /etc/xdg &&

	pkg_build_slackdesc &&
	rm -f /usr/include/uthash.h &&
	
	# don't display it on the menu
	echo "NoDisplay=true" >> /usr/share/applications/compton.desktop
}
