1 # Copyright 1999-2021 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 inherit unpacker desktop xdg
8 WECHAT_INSTALLER
="WeChatSetup"
9 DP_WECHAT_VER
="3.2.1.154deepin13"
10 DEB_PN
="com.qq.weixin.deepin"
12 DESCRIPTION
="Tencent WeChat on Deepin Wine(${DEB_PN}) For Gentoo"
13 HOMEPAGE
="https://aur.archlinux.org/packages/deepin-wine-wechat"
15 _MIRROR
="https://com-store-packages.uniontech.com"
16 SRC_URI
="${_MIRROR}/appstore/pool/appstore/c/${DEB_PN}/${DEB_PN}_${DP_WECHAT_VER}_i386.deb
17 https://github.com/oatiz/lyraile-overlay/releases/download/tempfile/${WECHAT_INSTALLER}-${PV}.exe -> ${P}-${WECHAT_INSTALLER}.exe
29 media-fonts/wqy-microhei
31 app-emulation/deepin-wine6-stable
32 app-emulation/deepin-wine-helper
40 local app_file
="${S}/opt/apps/${DEB_PN}/entries/applications/${DEB_PN}.desktop"
41 sed -i "s/\(Categories.*$\)/\1Network;/" ${app_file}
42 sed -i "13s/WeChat.exe/wechat.exe/" ${app_file}
43 sed -i "s/run.sh\".*/run.sh\"/" ${app_file}
45 7z x
-aoa "${S}/opt/apps/${DEB_PN}/files/files.7z" -o"${S}/deepinwechatdir"
46 rm -r "${S}/deepinwechatdir/drive_c/Program Files/Tencent/WeChat"
47 patch -p1 -d "${S}/deepinwechatdir/" < "${FILESDIR}/reg.patch"
48 ln -sf "/usr/share/fonts/wqy-microhei/wqy-microhei.ttc" "${S}/deepinwechatdir/drive_c/windows/Fonts/wqy-microhei.ttc"
49 install -m644 "${DISTDIR}/${P}-${WECHAT_INSTALLER}.exe" "${S}/deepinwechatdir/drive_c/Program Files/Tencent/${WECHAT_INSTALLER}-${PV}.exe"
50 7z a
-t7z -r "${S}"/files
.7z
"${S}"/deepinwechatdir
/*
54 local OPN
="opt/apps/${DEB_PN}"
56 insinto
"${OPN}"/files
57 exeinto
"${OPN}"/files
59 doins
-r "${OPN}"/files
/dlls
"${S}"/files
.7z
60 doexe
"${FILESDIR}"/run.sh
62 insinto
/usr
/share
/icons
63 doins
-r opt
/apps
/"${DEB_PN}"/entries
/icons
/hicolor
65 #for size in 16 24 32 48 64 128 256 ; do
66 # newicon -s ${size} ${OPN}/entries/icons/hicolor/${size}x${size}/${DEB_PN}.svg
69 domenu
"${OPN}"/entries
/applications
/"${DEB_PN}".desktop