void-packages/srcpkgs/fcitx5-gtk/template
2021-05-21 18:24:12 +07:00

71 lines
1.8 KiB
Bash

# Template file for 'fcitx5-gtk'
pkgname=fcitx5-gtk
version=5.0.7
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=bb64a6b39c4e1bd3ba1c7b0d0ff53bce434786fe484e7908ed62593896e73d75
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
}
}
fcitx5-gtk+3_package() {
short_desc="${short_desc% common}+3 IM Modules"
lib32disabled=yes
pkg_install() {
vmove usr/lib/gtk-3.0
}
}
fcitx5-gtk4_package() {
short_desc="${short_desc% common}4 IM Modules"
lib32disabled=yes
pkg_install() {
vmove usr/lib/gtk-4.0
}
}
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
}
}