blob: 93e37befc768d7dadb40aa667b5294b2b73156fe (
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
# Maintainer: taotieren <admin@taotieren.com>
pkgname=koishipro-bin
pkgver=Desire
pkgrel=1
pkgdesc="KoishiPro 是一个 YGOPro 的衍生项目。KoishiPro 比 YGOPro 具有更多的扩展功能和游戏体验。"
arch=('any')
url="https://koishi.pro/"
license=('GPL2')
provides=(${pkgname})
conflicts=(${pkgname} ${pkgname%-bin} ${pkgname}-git ygopro ygopro-bin)
#replaces=(${pkgname})
depends=('mono')
makedepends=('libarchive')
backup=(opt/${pkgname%-bin}/system.conf)
options=('!strip')
#install=${pkgname}.install
source=("https://cdn02.moecube.com:444/koishipro/archive/KoishiPro-master-linux-zh-CN.tar.gz")
sha256sums=('3334bf21d0a981ee4eceb94c8cf9a8385db09ac649ca2a06cf9c62cedd482976')
noextract=(KoishiPro-master-linux-zh-CN.tar.gz)
package() {
install -dm0755 "${pkgdir}/opt/${pkgname%-bin}" \
"${pkgdir}/usr/share/pixmaps/" \
"${pkgdir}/usr/share/applications/" \
"${pkgdir}/usr/share/licenses/${pkgname%-bin}/"
_pkg=ygopro
bsdtar xf "${srcdir}/KoishiPro-master-linux-zh-CN.tar.gz" -C "${pkgdir}/opt/${pkgname%-bin}"
install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${pkgname%-bin}" << EOF
#!/bin/sh
/opt/${pkgname%-bin}/bot "\$@"
EOF
install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/${_pkg}" << EOF
#!/bin/sh
/opt/${pkgname%-bin}/${_pkg} "\$@"
EOF
install -Dm0644 /dev/stdin "${pkgdir}/opt/${pkgname%-bin}/${pkgname%-bin}.desktop" << EOF
[Desktop Entry]
Name=KoishiPro
Name[en_US]=KoishiPro
Categories=Game
Exec=${pkgname%-bin} %U
Terminal=false
Type=Application
Icon=${pkgname%-bin}.png
Encoding=UTF-8
Hidden=false
StartupNotify=false
Comment=KoishiPro
Comment[zh_CN]=KoishiPro
EOF
install -Dm0644 /dev/stdin "${pkgdir}/opt/${pkgname%-bin}/${_pkg}.desktop" << EOF
[Desktop Entry]
Name=YGOPro
Name[en_US]=YGOPro
Categories=Game
Exec=${_pkg} %U
Terminal=false
Type=Application
Icon=${_pkg}.png
Encoding=UTF-8
Hidden=false
StartupNotify=false
Comment=YGOPro
Comment[zh_CN]=YGOPro
EOF
ln -sf "/opt/${pkgname%-bin}/${pkgname%-bin}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
ln -sf "/opt/${pkgname%-bin}/${_pkg}.desktop" "${pkgdir}/usr/share/applications/${_pkg}.desktop"
ln -sf "/opt/${pkgname%-bin}/${pkgname%-bin}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
ln -sf "/opt/${pkgname%-bin}/${_pkg}.png" "${pkgdir}/usr/share/pixmaps/${_pkg}.png"
ln -sf "/opt/${pkgname%-bin}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname%-bin}/LICENSE"
}
|