From 8601717be1d96167ba1d8c7ab47c46fe02522d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Thu, 3 Sep 2020 18:55:25 +0700 Subject: [PATCH] ibus-bamboo: cross-compile --- srcpkgs/ibus-bamboo/template | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/srcpkgs/ibus-bamboo/template b/srcpkgs/ibus-bamboo/template index d9a5fa8431..9d6b3d8c0a 100644 --- a/srcpkgs/ibus-bamboo/template +++ b/srcpkgs/ibus-bamboo/template @@ -1,8 +1,8 @@ # Template file for 'ibus-bamboo' pkgname=ibus-bamboo version=0.6.6 -revision=1 -hostmakedepends="go" +revision=2 +build_style=go makedepends="libXtst-devel libX11-devel" depends="ibus" short_desc="Vietnamese input method for ibus" @@ -11,19 +11,21 @@ license="GPL-3.0-or-later" homepage="https://github.com/BambooEngine/ibus-bamboo" distfiles="${homepage}/archive/v${version}.tar.gz>${pkgname}-${version}.tar.gz" checksum="c51651bea965fe66ae89a2f08521ae1840ca5d89b57ab41472ba0ef9fdb9b60d" -nocross="armv7l-linux-gnueabihf-gcc: error: unrecognized command line option '-m64'" -_engine_dir="usr/share/ibus-bamboo/" -_ibus_dir="usr/share/ibus" +conf_files="/usr/share/ibus-bamboo/data/macro.tpl.txt" + +do_configure() { + vsed -i -e 's,/usr/lib/ibus-,/usr/lib/ibus/ibus-,' bamboo.xml +} do_build() { - GOPATH=$wrksrc go build -buildmode=pie -o ibus-bamboo -ldflags="-s -w -extld=$CC" ./src/ibus-bamboo + GOPATH=$wrksrc \ + go build -buildmode=pie -o ibus-engine-bamboo \ + -ldflags="$go_ldflags" ibus-bamboo } do_install() { - mkdir -p ${PKGDESTDIR}/${_engine_dir} - mkdir -p ${PKGDESTDIR}/usr/lib/ - mkdir -p ${PKGDESTDIR}/${_ibus_dir}/component - cp ${wrksrc}/ibus-bamboo ${PKGDESTDIR}/usr/lib/ibus-engine-bamboo - cp -R -f viet-on.png data ${PKGDESTDIR}/${_engine_dir} - cp -f bamboo.xml ${PKGDESTDIR}/${_ibus_dir}/component/ + vinstall ibus-engine-bamboo 755 usr/lib/ibus + vinstall bamboo.xml 644 usr/share/ibus/component + vinstall viet-on.png 644 usr/share/ibus-bamboo + vcopy data usr/share/ibus-bamboo }