### this file is sourced not run
PKGVER=1.4.2
PKGBUILD=1
PKGARCH=x86_64

# source: james
TARBALL=icewm-$PKGVER.tar.bz2
MD5SUM=3e7c3a95e7f8518346267f48a11966cd
SRC_URL=https://github.com/bbidulock/icewm/releases/download/$PKGVER/$TARBALL
BUNDLE=

SLACKREQ='gtk2 libstartup-notification'
SLACKDESC="icewm: icewm $PKGVER (Window Manager)  
icewm:  
icewm: IceWM is a window manager for the X Window System (freedesktop, 
icewm: XFree86). The goal of IceWM is speed, simplicity, and not getting in 
icewm: the user's way.  
icewm: 
icewm: This is based on the icewm fork located here:
icewm: https://github.com/bbidulock/icewm
icewm: 
icewm: 
icewm: 
"
SLACKSUG='icewm-xdgmenu'

### default pkg_download
### prepare
pkg_prepare() {
	pkg_prepare_default &&
	cd tmp/icewm* &&
	patch -Np1 -i ../pkg/shutdown-reboot.patch
}

### default pkg_package
### build
pkg_build() {
	CONFFLAGS="$CONFFLAGS --disable-static --disable-menus-gnome2 --enable-guievents --enable-icesound=ALSA"
	pkg_build_autoconf &&
	pkg_build_slackdesc &&
	
	# use working xsession
	rm -f /usr/share/xsessions/* &&
	install -m644 /tmp/pkg/3-icewm.desktop /usr/share/xsessions &&
	
	# and use working keys and toolbar (menu from icewm-xdgmenu)
	install -dm755 /etc/icewm &&
	install -m644 /tmp/pkg/{keys,toolbar,preferences} /etc/icewm
}

