void-packages/srcpkgs/gtk-vnc/template
2015-10-20 00:34:02 +02:00

111 lines
3 KiB
Bash

# Template file for 'gtk-vnc'
pkgname=gtk-vnc
version=0.5.4
revision=2
hostmakedepends="automake libtool perl pkg-config intltool glib-devel pygtk-devel
$(vopt_if gir gobject-introspection)"
makedepends="gettext-devel gtk+-devel gtk+3-devel gnutls-devel libgcrypt-devel
libsasl-devel $(vopt_if gir vala-devel) python-devel pygtk-devel"
short_desc="VNC viewer widget for GTK"
maintainer="Juan RP <xtraeme@voidlinux.eu>"
homepage="http://www.gnome.org"
license="GPL-2"
distfiles="${GNOME_SITE}/$pkgname/${version%.*}/$pkgname-$version.tar.xz"
checksum=488aa97a76ce6868160699cd45d4a0ee0fe6f0ad4631737c6ddd84450f6c9ce7
build_options="gir"
if [ -z "$CROSS_BUILD" ]; then
build_options_default="gir"
fi
CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/python2.7"
post_extract() {
cp -a ${wrksrc} /tmp/gtk2-build
cp -a ${wrksrc} /tmp/gtk3-build
mv /tmp/gtk[23]-build ${wrksrc}
}
pre_configure() {
if [ "$CROSS_BUILD" ]; then
sed -i configure.ac \
-e"s;GOBJECT_INTROSPECTION_CHECK.*;AM_CONDITIONAL([HAVE_INTROSPECTION], [false]);"
find . -name "Makefile.*" -exec sed -i "{}" \
-e"s;\(\$(CODEGENDIR)\);${XBPS_CROSS_BASE}/\1;" \
-e"s;\(\$(DEFSDIR)\);${XBPS_CROSS_BASE}/\1;" \
\;
fi
ACLOCAL_FLAGS="-I ${XBPS_CROSS_BASE}/usr/share/aclocal" \
autoreconf -if
}
do_configure() {
cd ${wrksrc}/gtk2-build
../configure ${configure_args} --with-python --disable-static \
--with-gtk=2.0 $(vopt_enable gir introspection)
cd ${wrksrc}/gtk3-build
../configure ${configure_args} --with-python --disable-static \
--with-gtk=3.0 $(vopt_enable gir introspection)
}
do_build() {
cd ${wrksrc}/gtk2-build
make ${makejobs}
cd ${wrksrc}/gtk3-build
make ${makejobs}
}
do_install() {
cd ${wrksrc}/gtk2-build
make DESTDIR=${DESTDIR} install
cd ${wrksrc}/gtk3-build
make DESTDIR=${DESTDIR} install
}
gtk2-vnc_package() {
short_desc+=" - GTK+2 port"
pkg_install() {
vmove "usr/lib/libgtk-vnc-1.0.so*"
if [ "$build_option_gir" ]; then
vmove usr/lib/girepository-1.0/GtkVnc-1.0.typelib
fi
}
}
gtk2-vnc-devel_package() {
depends="gtk+-devel gtk-vnc-devel>=${version}_${revision}"
short_desc+=" - GTK+2 development files"
pkg_install() {
vmove usr/include/gtk-vnc-1.0
if [ "$build_option_gir" ]; then
#vmove usr/share/vala/vapi/gtk-vnc-1.0.vapi
vmove usr/share/gir-1.0/GtkVnc-1.0.gir
fi
vmove usr/lib/pkgconfig/gtk-vnc-1.0.pc
}
}
gtk2-vnc-python_package() {
short_desc+=" - python bindings"
pkg_install() {
vmove usr/lib/python2.7
}
}
gtk-vnc-devel_package() {
depends="glib-devel gtk+3-devel gtk-vnc>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include/gvnc-1.0
vmove usr/include/gtk-vnc-2.0
vmove usr/lib/pkgconfig/gtk-vnc-2.0.pc
vmove usr/lib/pkgconfig/gvnc-1.0.pc
if [ "$build_option_gir" ]; then
vmove usr/share/vala/vapi/gtk-vnc-2.0.deps
vmove usr/share/vala/vapi/gtk-vnc-2.0.vapi
vmove usr/share/vala/vapi/gvnc-1.0.vapi
vmove usr/share/gir-1.0/GVnc-1.0.gir
vmove usr/share/gir-1.0/GtkVnc-2.0.gir
fi
vmove usr/lib/*.so
}
}