brise: drop noarch

This commit is contained in:
Đoàn Trần Công Danh 2020-09-06 09:03:44 +07:00
parent f2a71f53a5
commit b96b19cd3c
3 changed files with 45 additions and 7 deletions

7
srcpkgs/brise/INSTALL Normal file
View file

@ -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

23
srcpkgs/brise/REMOVE Normal file
View file

@ -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

View file

@ -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 <youngjinpark20@gmail.com>"
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.