### this file is sourced not run
PKGVER=0.7
PKGBUILD=1
PKGARCH=i686

# source: james
TARBALL=avahi-${PKGVER}.tar.gz
MD5SUM=d76c59d0882ac6c256d70a2a585362a6
SRC_URL=https://github.com/lathiat/avahi/releases/download/v${PKGVER}/$TARBALL
BUNDLE=

SLACKREQ='dbus32 glib32 gtk2_32 expat32 gdbm32 libcap2_32'  # build-time only: libdaemon32
SLACKDESC="avahi32: avahi32 $PKGVER (mDNS/Bonjour/Zeroconf daemon)
avahi32: 
avahi32: Avahi is a system which facilitates service discovery on a local 
avahi32: network via the mDNS/DNS-SD protocol suite. This enables you to plug 
avahi32: your laptop or computer into a network and instantly be able to view 
avahi32: other people who you can chat with, find printers to print to or find 
avahi32: files being shared. Compatible technology is found in Apple MacOS X 
avahi32: (branded \"Bonjour\" and sometimes \"Zeroconf\").
avahi32: 
avahi32: http://www.avahi.org/
avahi32: 
"

### default pkg_download
### default pkg_prepare

### package - only collect the libraries
pkg_package() {
	rm -rf etc bin sbin usr/bin usr/sbin usr/include usr/share/locale \
		usr/share/doc usr/share/dbus-1 usr/libexec \
		usr/share/avahi usr/share/man usr/share/applications
}


### build
pkg_build() {
	cd /tmp/avahi* && 
	
	CONFFLAGS="$CONFFLAGS --with-distro=slackware --disable-static \
		--disable-qt3 --disable-qt4 --disable-gtk3 \
		--disable-python --disable-mono \
		--enable-compat-libdns_sd --enable-compat-howl"
		
	pkg_build_autoconf &&
	
	# we support full libdns_sd and howl - do adjustment as per COMPAT-LAYERS
	ln -sfT avahi-compat-howl.pc /usr/$LIBDIR/pkgconfig/howl.pc &&
	#ln -sfT avahi-compat-libdns_sd/dns_sd.h /usr/include/dns_sd.h &&	
	
	pkg_build_slackdesc &&
		
	# multilib
	mv -v /usr/share/gir-1.0/* /usr/share/gir-1.0-32 &&
	rm -r /usr/share/gir-1.0/
}
