65 lines
1.9 KiB
Bash
65 lines
1.9 KiB
Bash
# This is an example PKGBUILD file. Use this as a start to creating your own,
|
|
# and remove these comments. For more information, see 'man PKGBUILD'.
|
|
# NOTE: Please fill out the license field for your package! If it is unknown,
|
|
# then please put 'unknown'.
|
|
|
|
# Maintainer: Future Linux Team <future_linux@163.com>
|
|
pkgname=libime
|
|
pkgver=1.1.8
|
|
_lmver=20230712
|
|
_dictver=20240416
|
|
_tablever=20240108
|
|
pkgrel=1
|
|
pkgdesc="A library to support generic input method implementation"
|
|
arch=('x86_64')
|
|
url="https://github.com/fcitx/libime"
|
|
license=('LGPL-2.1-or-later')
|
|
depends=('boost' 'fcitx5')
|
|
makedepends=('git' 'extra-cmake-modules' 'cmake' 'python')
|
|
source=(git+https://github.com/fcitx/libime.git#tag=${pkgver}
|
|
git+https://github.com/kpu/kenlm.git
|
|
https://download.fcitx-im.org/data/lm_sc.arpa-${_lmver}.tar.xz
|
|
https://download.fcitx-im.org/data/dict-${_dictver}.tar.zst
|
|
https://download.fcitx-im.org/data/table-${_tablever}.tar.gz)
|
|
noextract=(lm_sc.arpa-${_lmver}.tar.xz
|
|
dict-${_dictver}.tar.zst
|
|
table-${_tablever}.tar.gz)
|
|
sha256sums=(SKIP
|
|
SKIP
|
|
badd62c16c6373787a0fda8f09cd452d12f60d5868856f651ceecf1a07baba32
|
|
9c262cbfa306cb4c3b055991b7e22b453e0f267f20ceb5d9d9e5f8fbe4f2d367
|
|
729c596d86907de727c74d0fc3fd241c406c5debd2b4cb74eefe022387ee9dae)
|
|
|
|
prepare() {
|
|
cd ${pkgname}
|
|
|
|
git submodule init
|
|
git config submodule.src/libime/kenlm.url ${srcdir}/kenlm
|
|
git -c protocol.file.allow=always submodule update
|
|
|
|
mv ${srcdir}/lm_sc.arpa-${_lmver}.tar.xz data/
|
|
mv ${srcdir}/dict-${_dictver}.tar.zst data/
|
|
mv ${srcdir}/table-${_tablever}.tar.gz data/
|
|
# grep to make sure the version is correct
|
|
grep lm_sc.arpa-${_lmver}.tar.xz data/CMakeLists.txt
|
|
grep dict-${_dictver}.tar.zst data/CMakeLists.txt
|
|
grep table-${_tablever}.tar.gz data/CMakeLists.txt
|
|
|
|
}
|
|
|
|
build() {
|
|
cd ${pkgname}
|
|
|
|
cmake -Bbuild \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=/usr/lib64
|
|
|
|
cmake --build build
|
|
}
|
|
|
|
package() {
|
|
cd ${pkgname}
|
|
|
|
DESTDIR=${pkgdir} cmake --install build
|
|
}
|