### this file is sourced not run
PKGVER=3.2.5
PKGBUILD=1
PKGARCH=noarch

# note - this must be built separately from eudev, because it requires
# libxslt, which is built much later after eudev

TARBALL=eudev-$PKGVER.tar.gz
MD5SUM=6ca08c0e14380f87df8e8aceac123671
BUNDLE=fatdog-base-8.2.tar
SRC_URL=http://distro.ibiblio.org/fatdog/source/800/$BUNDLE

SLACKDESC="eudev-docs: eudev-docs $PKGVER (Man pages for eudev)
eudev-docs: 
eudev-docs: This package contains manpages for eudev.
eudev-docs: 
eudev-docs: 
eudev-docs: 
eudev-docs: 
eudev-docs: 
eudev-docs: 
eudev-docs: 
eudev-docs:
"


### override download for LFS sources bundle
# $1-src-dir $2-tarball 
pkg_download() {
	echo downloading $BUNDLE for $TARBALL
	wget -P $1 $SRC_URL
	tar -xf $1/$BUNDLE --strip-components=1 -C $1 
	rm $1/$BUNDLE
}

### default pkg_prepare
### default pkg_package
### build
pkg_build() {
	cd /tmp/eudev*

	### this is identical to eudev recipe
	# LFS 8.1
	sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c &&

	sed -i -e 's|udevlibexecdir=${rootprefix}/lib/udev|udevlibexecdir=${rootprefix}/lib64/udev|' configure &&
	PKG_CONFIG_PATH=${PKG_CONFIG_PATH64} \
	CC="gcc ${BUILD64}" ./configure --prefix=/usr --sysconfdir=/etc \
		--with-rootprefix="" --libexecdir=/lib64 --libdir=/usr/lib64 \
		--with-rootlibdir=/lib64 --sbindir=/sbin --bindir=/sbin \
		--enable-split-usr --enable-rule_generator --disable-introspection \
		--disable-keymap --disable-gudev --disable-gtk-doc-html \
		--with-firmware-path=/lib/firmware --enable-libkmod &&
	###
	
	### we are only interested in the docs
	make -C man  && make -C man  install &&
	#install -dm 755 /usr/share/doc/eudev-$PKGVER/libudev &&
	#cp -a docs/libudev/html /usr/share/doc/eudev-$PKGVER/libudev &&
	pkg_build_slackdesc
}


