blob: d01235a0bdd7740d4d3520417004823d18e0bd1c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
# Maintainer: devome <evinedeng@hotmail.com>
# Contributer: maz-1 <ohmygod19993@gmail.com>
# Contributer: plokid <910576949@qq.com>
_dotnet_ver=8.0
pkgname=imewlconverter
pkgver=3.1.1
pkgrel=2
pkgdesc="一款开源免费的输入法词库转换程序"
arch=('x86_64' 'armv7h' 'aarch64')
url="https://github.com/studyzy/${pkgname}"
license=('GPL-3.0-or-later')
provides=("${pkgname}")
conflicts=("${pkgname}")
replaces=("${pkgname}"{-bin,-cli})
depends=("dotnet-runtime-${_dotnet_ver}")
makedepends=("dotnet-sdk-${_dotnet_ver}")
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/v${pkgver}.tar.gz")
sha256sums=('b52bed95de6b3f435ba9d2df8016e82282f0ea2ecccc1d8fecab55d70d403f70')
prepare() {
cd "${pkgname}-${pkgver}"
sed -i -E "s|<Version>.+</Version>|<Version>${pkgver}</Version>|" src/ImeWlConverterCmd/ImeWlConverterCmd.csproj
sed -i "s|dotnet ImeWlConverterCmd.dll|${pkgname}|g" src/ImeWlConverterCmd/Program.cs
}
build() {
cd "${pkgname}-${pkgver}"
dotnet publish "src/ImeWlConverterCmd" \
--configuration Release \
--framework "net${_dotnet_ver}" \
--self-contained false \
--output builddir \
-p:DebugSymbols=false \
-p:DebugType=none
mv builddir/Readme.txt CHANGELOG.txt
}
package() {
local _binary="/usr/lib/${pkgname}/ImeWlConverterCmd"
cd "${pkgname}-${pkgver}"
install -Dm644 README.md *.txt -t "${pkgdir}/usr/share/doc/${pkgname}"
install -Dm644 builddir/* -t "${pkgdir}/usr/lib/${pkgname}"
install -dm755 "${pkgdir}/usr/bin"
ln -sf "${_binary}" "${pkgdir}/usr/bin/${pkgname}"
chmod 755 "${pkgdir}/${_binary}"
}
|