# Template file for 'libsearpc'
pkgname=libsearpc
version=3.0.7
revision=1
build_style=gnu-configure
configure_args="--disable-static --disable-compile-demo"
hostmakedepends="automake libtool pkg-config python"
makedepends="glib-devel jansson-devel"

short_desc="Seafile RPC library"
maintainer="yopito <pierre.bourgin@free.fr>"
license="GPL-3"
homepage="https://github.com/haiwen/${pkgname}"
distfiles="https://github.com/haiwen/${pkgname}/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz"
checksum=efee6b495f93e70101c87849c78b135014dfd2f0e5c08dcfed9834def47cb939

pre_configure() {
	./autogen.sh
}

post_install() {
	vdoc "AUTHORS"
	vdoc "README.markdown"
}

libsearpc-devel_package() {
	short_desc+=" - development files"
	depends="${sourcepkg}>=${version}_${revision} ${makedepends}"
	pkg_install() {
		vmove "usr/include"
		vmove "usr/lib/*.so"
		vmove "usr/lib/pkgconfig"
	}
}

libsearpc-codegen_package() {
	short_desc+=" - code generator"
	depends="python"
	noarch=yes
	pkg_install() {
		vdoc "AUTHORS"
		vdoc "README.markdown"
		vmove "usr/bin/searpc-codegen.py"
	}
}
