void-packages/srcpkgs/fcitx5-gtk/template

75 lines
1.9 KiB
Bash

# Template file for 'fcitx5-gtk'
pkgname=fcitx5-gtk
version=5.1.1
revision=1
build_style=cmake
build_helper=gir
configure_args="$(vopt_bool gir ENABLE_GIR)"
hostmakedepends="cldr-emoji-annotation pkg-config gettext doxygen
extra-cmake-modules glib-devel"
makedepends="libfcitx5-devel libglib-devel fmt-devel
gtk+-devel gtk+3-devel gtk4-devel"
short_desc="Fcitx v5 - GTK common"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="LGPL-2.1-or-later"
homepage="https://fcitx-im.org/wiki/Fcitx"
distfiles="https://download.fcitx-im.org/fcitx5/fcitx5-gtk/fcitx5-gtk-${version}.tar.xz"
checksum=d6cda72de020031daf8da4dbc6c7923c8025edadec1a3acb9aa28e9efb78b013
lib32disabled=yes
build_options="gir"
build_options_default="gir"
post_configure() {
find build -name cmake_install.cmake -exec \
sed -i -e 's,"//\+usr,"/usr,' {} +
}
post_install() {
sed -i '/prefix=/!s,/usr,${exec_prefix},' \
"${DESTDIR}/usr/lib/pkgconfig"/*.pc
sed -i '/INTERFACE_INCLUDE_DIRECTORIES/s,/usr,${_IMPORT_PREFIX},g' \
"${DESTDIR}/usr/lib/cmake"/*/*Targets.cmake
}
fcitx5-gtk+2_package() {
short_desc="${short_desc% common}+2 IM Modules"
lib32disabled=yes
pkg_install() {
vmove usr/lib/gtk-2.0
vmove usr/bin/fcitx5-gtk2-immodule-probing
}
}
fcitx5-gtk+3_package() {
short_desc="${short_desc% common}+3 IM Modules"
lib32disabled=yes
pkg_install() {
vmove usr/lib/gtk-3.0
vmove usr/bin/fcitx5-gtk3-immodule-probing
}
}
fcitx5-gtk4_package() {
short_desc="${short_desc% common}4 IM Modules"
lib32disabled=yes
pkg_install() {
vmove usr/lib/gtk-4.0
vmove usr/bin/fcitx5-gtk4-immodule-probing
}
}
fcitx5-gtk-devel_package() {
short_desc="${short_desc%common}- development files"
depends="fcitx5-gtk>=${version}_${revision} libglib-devel"
pkg_install() {
vmove usr/include
vmove usr/lib/cmake
vmove usr/lib/pkgconfig
vmove "usr/lib/*.so"
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0
fi
}
}