app-shells/zfe: add nvchecker
[gentoo-zh.git] / app-text / imewlconverter / imewlconverter-9999.ebuild
blob690f5f533b127114b1c5d23e0a8f0dacf9e2c993
1 # Copyright 2024 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 DOTNET_PKG_COMPAT="8.0"
7 NUGETS="
8 sharpziplib@1.4.2
9 utf.unknown@2.5.1
12 inherit dotnet-pkg
14 DESCRIPTION="An open source and free input method dictionary conversion program"
15 HOMEPAGE="https://github.com/studyzy/imewlconverter"
17 if [[ "${PV}" == 9999 ]] ; then
18 inherit git-r3
20 EGIT_REPO_URI="https://github.com/studyzy/imewlconverter.git"
21 else
22 SRC_URI="https://github.com/studyzy/imewlconverter/archive/v${PV}.tar.gz -> ${P}.tar.gz"
24 KEYWORDS="~amd64"
27 SRC_URI+=" ${NUGET_URIS} "
29 LICENSE="GPL-3+"
30 SLOT="0"
32 DOTNET_PKG_PROJECTS=( src/ImeWlConverterCmd/ImeWlConverterCmd.csproj )
34 src_unpack() {
35 dotnet-pkg_src_unpack
37 if [[ "${PV}" == 9999 ]] ; then
38 git-r3_src_unpack
42 src_prepare() {
43 sed -i -E "s|<Version>.+</Version>|<Version>${PV}</Version>|" src/ImeWlConverterCmd/ImeWlConverterCmd.csproj
44 sed -i -e 's/dotnet ImeWlConverterCmd.dll/ImeWlConverterCmd/g' src/ImeWlConverterCmd/Program.cs
46 dotnet-pkg_src_prepare
49 src_install() {
50 mv "${DOTNET_PKG_OUTPUT}/Readme.txt" CHANGELOG || die
52 dotnet-pkg-base_install
53 dotnet-pkg-base_dolauncher "/usr/share/${P}/ImeWlConverterCmd"
55 einstalldocs