### this file is sourced not run
PKGVER=1.7
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-1.7.tar.gz
MD5SUM=80649a0350ff9620fc2da9562d9f2a6a
SRC_URL=http://distro.ibiblio.org/fatdog/source/710/clfs-packages-3.0.0.tar
BUNDLE=clfs-packages-3.0.0.tar

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
	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
}


