From b96b19cd3c70044028be69adbd0ad0032190ed3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sun, 6 Sep 2020 09:03:44 +0700 Subject: [PATCH] brise: drop noarch --- srcpkgs/brise/INSTALL | 7 +++++++ srcpkgs/brise/REMOVE | 23 +++++++++++++++++++++++ srcpkgs/brise/template | 22 +++++++++++++++------- 3 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 srcpkgs/brise/INSTALL create mode 100644 srcpkgs/brise/REMOVE diff --git a/srcpkgs/brise/INSTALL b/srcpkgs/brise/INSTALL new file mode 100644 index 00000000000..5b33d99c9cf --- /dev/null +++ b/srcpkgs/brise/INSTALL @@ -0,0 +1,7 @@ +case "$ACTION" in +post) + [ -x usr/bin/rime_deployer ] || exit 1 + [ -d usr/share/rime-data ] || exit 0 + usr/bin/rime_deployer --build usr/share/rime-data + ;; +esac diff --git a/srcpkgs/brise/REMOVE b/srcpkgs/brise/REMOVE new file mode 100644 index 00000000000..d2460648241 --- /dev/null +++ b/srcpkgs/brise/REMOVE @@ -0,0 +1,23 @@ +case "$ACTION" in +post) + for _file in usr/share/rime-data/build/*.schema.yaml + do + _filename=${_file##*/} + if [ ! -f "usr/share/rime-data/$_filename" ]; then + _basename=${_file%.schema.yaml} + rm -f "$_file" + rm -f "${_basename}.prism.bin" + rm -f "${_basename}.reverse.bin" + rm -f "${_basename}.table.bin" + fi + done + rm -f usr/share/rime-data/build/default.yaml + rmdir usr/share/rime-data/build >/dev/null 2>&1 || true + rm -f usr/share/rime-data/user.yaml + if ! rmdir usr/share/rime-data >/dev/null 2>&1 && + [ -x usr/bin/rime_deployer ] + then + usr/bin/rime_deployer --build usr/share/rime-data + fi + ;; +esac diff --git a/srcpkgs/brise/template b/srcpkgs/brise/template index 442ffddc383..1bc43c6cd00 100644 --- a/srcpkgs/brise/template +++ b/srcpkgs/brise/template @@ -1,12 +1,13 @@ # Template file for 'brise' +# TODO: Upstream has changed to new release schema, +# They split into multiple small repositories for different input systems. pkgname=brise version=0.38.20180515 -revision=2 -archs=noarch +revision=3 wrksrc=brise build_style=gnu-makefile -hostmakedepends="pkg-config librime-devel" -makedepends="librime-devel" +hostmakedepends="pkg-config librime" +depends="librime" short_desc="Rime schema repository" maintainer="Young Jin Park " license="GPL-3.0-or-later" @@ -14,6 +15,13 @@ homepage="https://rime.im/" distfiles="https://github.com/rime/brise/releases/download/brise-0.38/${pkgname}-${version}.tar.gz" checksum=b6a9a2a6eca046db707b0b2dfbf52faa629b62ba26c8224c641afae3831293d4 -post_build() { - rime_deployer --build output -} +# NOTE: don't run either: +# make preset-bin +# make all-bin +# rime_deployer --build output +# +# Although, it'll save our users some time on first start up +# However, it's not fully compatible, at least native x86_64-musl +# and armv7l-musl artifacts differ. +# +# And the binary files will be recompiled if librime is updated.