107 lines
2.7 KiB
Bash
107 lines
2.7 KiB
Bash
# Template file for 'gtk-vnc'
|
|
pkgname=gtk-vnc
|
|
version=0.9.0
|
|
revision=3
|
|
build_helper="gir"
|
|
build_style=gnu-configure
|
|
configure_args="$(vopt_enable gir introspection) $(vopt_enable vala)"
|
|
hostmakedepends="automake gettext-devel glib-devel intltool libgcrypt-devel
|
|
libtool pkg-config gobject-introspection $(vopt_if vala vala)"
|
|
makedepends="gnutls-devel gtk+-devel gtk+3-devel libsasl-devel
|
|
$(vopt_if vala 'vala')"
|
|
short_desc="VNC viewer widget for GTK"
|
|
maintainer="Enno Boland <gottox@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="https://wiki.gnome.org/Projects/gtk-vnc"
|
|
distfiles="${GNOME_SITE}/${pkgname}/${version%.*}/${pkgname}-${version}.tar.xz"
|
|
checksum=3a9a88426809a5df2c14353cd9839b8c8163438cb708b31d8048c79d180fcab7
|
|
|
|
build_options="gir vala"
|
|
build_options_default="gir vala"
|
|
|
|
post_extract() {
|
|
cp -a ${wrksrc} /tmp/gtk2-build
|
|
cp -a ${wrksrc} /tmp/gtk3-build
|
|
rm -r ${wrksrc}/*
|
|
mv /tmp/gtk[23]-build ${wrksrc}
|
|
}
|
|
pre_configure() {
|
|
local build
|
|
if [ "$CROSS_BUILD" ]; then
|
|
find . -name "Makefile.*" -exec sed -i "{}" \
|
|
-e"s;\(\$(CODEGENDIR)\);${XBPS_CROSS_BASE}/\1;" \
|
|
-e"s;\(\$(DEFSDIR)\);${XBPS_CROSS_BASE}/\1;" \
|
|
\;
|
|
fi
|
|
for build in gtk2-build gtk3-build; do
|
|
cd ${wrksrc}/${build}
|
|
autoreconf -if
|
|
done
|
|
}
|
|
|
|
do_configure() {
|
|
cd ${wrksrc}/gtk2-build
|
|
./configure ${configure_args} --with-gtk=2.0
|
|
|
|
cd ${wrksrc}/gtk3-build
|
|
./configure ${configure_args} --with-gtk=3.0
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|
|
|
|
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
|
|
}
|
|
}
|