dev-python/conda-libmamba-solver: bump version to 24.11.1
[gentoo-zh.git] / net-im / deepin-wine-qq / deepin-wine-qq-9.5.2.27897.ebuild
blob1218edf25b54ef372ad463d2bbfb5291f488bc00
1 # Copyright 1999-2022 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
6 inherit desktop unpacker xdg
8 QQ_INSTALLER="PCQQ2021"
9 DP_QQ_VER="9.3.2deepin20"
10 DEB_PN="com.qq.im.deepin"
12 DESCRIPTION="Tencent QQ on Deepin Wine(${DEB_PN}) For Gentoo"
13 HOMEPAGE="https://aur.archlinux.org/packages/deepin-wine-qq"
15 _MIRROR="https://com-store-packages.uniontech.com"
16 _MIRROR_LIB="https://community-packages.deepin.com/deepin/pool/main"
17 SRC_URI="
18 ${_MIRROR}/appstore/pool/appstore/c/${DEB_PN}/${DEB_PN}_${DP_QQ_VER}_i386.deb
19 ${_MIRROR_LIB}/o/openldap/libldap-2.4-2_2.4.47+dfsg.4-1+eagle_i386.deb
20 ${_MIRROR_LIB}/c/cyrus-sasl2/libsasl2-2_2.1.27.1-1+dde_i386.deb
21 https://github.com/vufa/deepin-wine-qq-arch/releases/download/v${PV}-1/${P}-1-x86_64.pkg.tar.zst
24 LICENSE="Tencent"
25 SLOT="0"
26 KEYWORDS="~amd64"
27 RESTRICT="mirror"
28 QA_PREBUILT="*"
30 RDEPEND="
31 app-emulation/deepin-wine-helper
32 app-emulation/deepin-wine5
33 media-fonts/noto-cjk
34 media-fonts/wqy-microhei
35 media-libs/alsa-lib[abi_x86_32]
36 media-libs/libpulse[abi_x86_32]
37 media-libs/openal[abi_x86_32]
38 media-plugins/alsa-plugins[abi_x86_32]
39 media-sound/mpg123[abi_x86_32]
40 >=net-nds/openldap-2.4.0[abi_x86_32]
41 x11-apps/xwininfo
44 DEPEND="${RDEPEND}"
46 BDEPEND="
47 app-arch/p7zip
48 sys-apps/coreutils
49 virtual/awk
52 S=${WORKDIR}
54 src_prepare() {
55 default
57 local app_file="${S}/opt/apps/${DEB_PN}/entries/applications/${DEB_PN}.desktop"
58 sed -i "s/\(Categories.*$\)/\1Network;/" ${app_file} || die
59 sed -i "s/run.sh\".*/run.sh\"/" ${app_file} || die
61 7z x -aoa "${S}/opt/apps/${DEB_PN}/files/files.7z" -o"${S}/deepinqqdir" || die
62 rm -rf "${S}/deepinqqdir/drive_c/Program Files/Tencent/QQ" || die
64 ln -sf "/usr/share/fonts/wqy-microhei/wqy-microhei.ttc" "${S}/deepinqqdir/drive_c/windows/Fonts/wqy-microhei.ttc" || die
65 if [ -f "${DISTDIR}/${P}-${QQ_INSTALLER}.exe" ]; then
66 # User provided ${P}-${QQ_INSTALLER}.exe" installer
67 install -m644 "${DISTDIR}/${P}-${QQ_INSTALLER}.exe" "${S}/deepinqqdir/drive_c/Program Files/Tencent/${QQ_INSTALLER}-${PV}.exe" || die
69 7z a -t7z -r "${S}/files.7z" "${S}/deepinqqdir/*" || die
70 # Fix to avoid downgrading openldap
71 mkdir -p "${S}/opt/apps/${DEB_PN}/files/lib32" || die
72 cp -rf "${S}"/usr/lib/i386-linux-gnu/* "${S}/opt/apps/${DEB_PN}/files/lib32" || die
73 # Generate run.sh
74 cp -rf "${FILESDIR}"/${P}-run.sh "${S}"/run.sh || die
75 sed -i "s/APPVER=.*/APPVER=\"${DP_QQ_VER}\"/g" "${S}"/run.sh
76 sed -i "s/QQ_VER=.*/QQ_VER=\"${PV}\"/g" "${S}"/run.sh
77 # Generate files.md5sum to fit DeployApp in run.sh
78 # https://github.com/vufa/deepin-wine-wechat-arch/issues/217
79 md5sum "${S}/files.7z" | awk '{ print $1 }' > "${S}/opt/apps/${DEB_PN}/files/files.md5sum" || die
82 src_install() {
83 local OPN="opt/apps/${DEB_PN}"
85 insinto "${OPN}"/files
86 exeinto "${OPN}"/files
88 doins -r "${S}"/"${OPN}"/files/lib32 "${S}"/"${OPN}"/files/files.md5sum "${S}"/files.7z
89 doexe "${S}"/run.sh
91 insinto /usr/share/icons
92 doins -r "${S}"/"${OPN}"/entries/icons/hicolor
93 #local size
94 #for size in 16 24 32 48 64 128 256 ; do
95 # newicon -s ${size} "${S}"/"${OPN}"/entries/icons/hicolor/${size}x${size}/${DEB_PN}.svg
96 #done
98 domenu "${S}"/"${OPN}"/entries/applications/"${DEB_PN}".desktop
101 pkg_postinst() {
102 ewarn "Because deepin changed DeployApp, QQ will be reinstalled after"
103 ewarn "upgrading from the old version."
104 xdg_icon_cache_update