# This is an example PKGBUILD file. Use this as a start to creating your own,
# and remove these comments. For more information, see 'man PKGBUILD'.
# NOTE: Please fill out the license field for your package! If it is unknown,
# then please put 'unknown'.

# Maintainer: Olivier Medoc <o_medoc@yahoo.fr>
pkgname=qubes-libvchan-xen
pkgver=`cat version`
pkgrel=2

epoch=
pkgdesc="The Qubes core libraries for installation inside a Qubes Dom0 and VM."
arch=("x86_64")
url="http://qubes-os.org/"
license=('GPL')
groups=()
depends=(qubes-vm-xen)
makedepends=(qubes-vm-xen)
checkdepends=()
optdepends=()
provides=('qubes-core-libs' 'qubes-libvchan')
conflicts=()
replaces=('')
backup=()
options=()
install=
changelog=

source=()

noextract=()
md5sums=() #generate with 'makepkg -g'


build() {

ln -s $srcdir/../vchan $srcdir/vchan
ln -s $srcdir/../u2mfn $srcdir/u2mfn

(cd u2mfn; make)
(cd vchan; make -f Makefile.linux)

}

package() {

install -D -m 0644 vchan/libvchan.h $pkgdir/usr/include/libvchan.h
install -D -m 0644 u2mfn/u2mfnlib.h $pkgdir/usr/include/u2mfnlib.h
install -D -m 0644 u2mfn/u2mfn-kernel.h $pkgdir/usr/include/u2mfn-kernel.h
install -D -m 0644 vchan/vchan-xen.pc $pkgdir/usr/lib/pkgconfig/vchan-xen.pc

install -D vchan/libvchan-xen.so $pkgdir/usr/lib/libvchan-xen.so
install -D u2mfn/libu2mfn.so $pkgdir/usr/lib/libu2mfn.so

}

# vim:set ts=2 sw=2 et:

