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

# source: james
TARBALL=Xdialog-gtk3-$PKGVER.tar.bz2
MD5SUM=837d266b4044ec7535969afc215423b2
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$TARBALL
BUNDLE=

SLACKREQ='gtk2'
SLACKDESC="xdialog-gtk2: xdialog-gtk2 2.3.2-$PKGVER (UI for shell scripts)  
xdialog-gtk2:  
xdialog-gtk2: Xdialog is designed to be a drop in replacement for the \"dialog\" or 
xdialog-gtk2: \"cdialog\" programs. It converts any terminal based program into a 
xdialog-gtk2: program with an X-windows interface. 
xdialog-gtk2: 
xdialog-gtk2: This is the gtk2 version of the package, and it only supplies the 
xdialog-gtk2: binary, named as Xdialog-gtk2
xdialog-gtk2: 
xdialog-gtk2: http://chiselapp.com/user/jamesbond/repository/xdialog/index
xdialog-gtk2: 
"

### default pkg_download
### default pkg_prepare
### package
pkg_package() {
	# for now, we remove everything else except the binary
	rm -r usr/share
}

### build
pkg_build() {
	export LDFLAGS="$LDFLAGS -Wl,--as-needed"
	CONFFLAGS="$CONFFLAGS --with-gtk2"
	MAKEFLAGS="" # cannot run parallel jobs
	pkg_build_autoconf && pkg_build_slackdesc &&
	mv /usr/bin/Xdialog{,-gtk2} &&
	ln -s Xdialog-gtk2 /usr/bin/Xdialog
}


