diff options
author | ssfdust | 2017-10-12 17:13:06 +0800 |
---|---|---|
committer | ssfdust | 2017-10-12 17:13:06 +0800 |
commit | 0583aacb9d4db2cff45efb1af340bf17c624c24b (patch) | |
tree | 878b52dd0a51ebcf767263a9bf4d6f031c46fbd8 | |
download | aur-0583aacb9d4db2cff45efb1af340bf17c624c24b.tar.gz |
upload to archlinux git server
-rw-r--r-- | .SRCINFO | 26 | ||||
-rw-r--r-- | PKGBUILD | 54 | ||||
-rw-r--r-- | reg_files.tar.bz2 | bin | 0 -> 162076 bytes | |||
-rw-r--r-- | run.sh | 104 | ||||
-rw-r--r-- | update.policy | 33 |
5 files changed, 217 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..38890d5f4435 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,26 @@ +pkgbase = deepin-tim-for-arch + pkgdesc = Latest Tencent TIM (com.qq.office) on Deepin Wine For Archlinux + pkgver = 1.1.5 + pkgrel = 0 + url = http://tim.qq.com/ + arch = x86_64 + license = custom + depends = p7zip + depends = wine + depends = xorg-xwininfo + depends = xdotool + depends = wqy-microhei + conflicts = wine-tim + source = https://mirrors.ustc.edu.cn/deepin/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_1.0.4deepin4_i386.deb + source = http://dldir1.qq.com/qqfile/qq/TIM1.1.5/21175/TIM1.1.5.exe + source = run.sh + source = reg_files.tar.bz2 + source = update.policy + md5sums = 24de53e74f6917dad0693b57e1e6ba4b + md5sums = 4d63de9d589c2d60bb36107849fc87e2 + md5sums = 458c0f3c66cf2dbd653738fc82937aed + md5sums = e3fd501cbd6149c5bbcc48a33cf9be0b + md5sums = a66646b473a3fbad243ac1afd64da07a + +pkgname = deepin-tim-for-arch + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..39bf94f5a6e0 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,54 @@ +# Maintainer: wszqkzqk <wszqkzqk@gmail.com> +# Maintainer: ssfdust <ssfdust@gmail.com> + +pkgname=deepin-tim-for-arch +pkgver=1.1.5 +deepintimver=1.0.4deepin4 +pkgrel=0 +pkgdesc="Latest Tencent TIM (com.qq.office) on Deepin Wine For Archlinux" +arch=("x86_64") +url="http://tim.qq.com/" +license=('custom') +depends=('p7zip' 'wine' 'xorg-xwininfo' 'xdotool' 'wqy-microhei') +conflicts=('wine-tim') +_mirror="https://mirrors.ustc.edu.cn/deepin" +source=("$_mirror/pool/non-free/d/deepin.com.qq.office/deepin.com.qq.office_${deepintimver}_i386.deb" + "http://dldir1.qq.com/qqfile/qq/TIM${pkgver}/21175/TIM${pkgver}.exe" + "run.sh" + "reg_files.tar.bz2" + "update.policy") +md5sums=('24de53e74f6917dad0693b57e1e6ba4b' + '4d63de9d589c2d60bb36107849fc87e2' + '458c0f3c66cf2dbd653738fc82937aed' + 'e3fd501cbd6149c5bbcc48a33cf9be0b' + 'a66646b473a3fbad243ac1afd64da07a') + +build() { + msg "Extracting DPKG package ..." + mkdir -p "${srcdir}/dpkgdir" + tar -xvf data.tar.xz -C "${srcdir}/dpkgdir" + msg "Extracting Deepin Wine TIM archive ..." + 7z x -aoa "${srcdir}/dpkgdir/opt/deepinwine/apps/Deepin-TIM/files.7z" -o"${srcdir}/deepintimdir" + msg "Removing original outdated TIM directory ..." + rm -r "${srcdir}/deepintimdir/drive_c/Program Files/Tencent/TIM" + msg "Adding config files and fonts" + tar -jxvf reg_files.tar.bz2 -C "${srcdir}/" + cp userdef.reg "${srcdir}/deepintimdir/userdef.reg" + cp system.reg "${srcdir}/deepintimdir/system.reg" + cp update.policy "${srcdir}/deepintimdir/update.policy" + cp user.reg "${srcdir}/deepintimdir/user.reg" + cp "/usr/share/fonts/wenquanyi/wqy-microhei/wqy-microhei.ttc" "${srcdir}/deepintimdir/drive_c/windows/Fonts/wqy-microhei.ttc" + msg "Repackaging app archive ..." + 7z a -t7z -r "${srcdir}/files.7z" "${srcdir}/deepintimdir/*" +} + +package() { + msg "Preparing icons ..." + mkdir -p "${pkgdir}/usr/share" + mv ${srcdir}/dpkgdir/usr/local/share/* "${pkgdir}/usr/share/" + msg "Copying TIM to /opt/deepinwine/apps/Deepin-TIM ..." + mkdir -p "${pkgdir}/opt/deepinwine/apps/Deepin-TIM" + install -m644 "${srcdir}/files.7z" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/" + install -m755 "${srcdir}/run.sh" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/" + install -m644 "${srcdir}/TIM$pkgver.exe" "${pkgdir}/opt/deepinwine/apps/Deepin-TIM/" +} diff --git a/reg_files.tar.bz2 b/reg_files.tar.bz2 Binary files differnew file mode 100644 index 000000000000..ad9d72d503a2 --- /dev/null +++ b/reg_files.tar.bz2 diff --git a/run.sh b/run.sh new file mode 100644 index 000000000000..d9e5cb123670 --- /dev/null +++ b/run.sh @@ -0,0 +1,104 @@ +#!/bin/sh + +# Copyright (C) 2016 Deepin, Inc. +# +# Author: Li LongYu <lilongyu@linuxdeepin.com> +# Peng Hao <penghao@linuxdeepin.com> + +# wszqkzqk <wszqkzqk@gmail.com> + +WINEPREFIX="$HOME/.deepinwine/Deepin-TIM" +APPDIR="/opt/deepinwine/apps/Deepin-TIM" +APPVER="1.1.5" +TIMVER="1.1.5" +APPTAR="files.7z" +PACKAGENAME="com.qq.tim" + +HelpApp() +{ + echo " Extra Commands:" + echo " -r/--reset Reset app to fix errors" + echo " -e/--remove Remove deployed app files" + echo " -h/--help Show program help info" +} +CallApp() +{ + if [ ! -f $WINEPREFIX/reinstalled ] + then + env WINEPREFIX=$WINEPREFIX wine $APPDIR/TIM$TIMVER.exe + touch $WINEPREFIX/reinstalled + else + bash "$WINEPREFIX/drive_c/deepin/EnvInit.sh" + fi +} +ExtractApp() +{ + mkdir -p "$1" + 7z x "$APPDIR/$APPTAR" -o"$1" + mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER" + sed -i "s#@current_user@#$USER#" $1/*.reg + sed -i "s/deepin-wine/wine/" $1/drive_c/deepin/EnvInit.sh +} +DeployApp() +{ + ExtractApp "$WINEPREFIX" + echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION" +} +RemoveApp() +{ + rm -rf "$WINEPREFIX" +} +ResetApp() +{ + echo "Reset $PACKAGENAME....." + read -p "* Are you sure?(Y/N)" ANSWER + if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" -o -z "$ANSWER" ]; then + EvacuateApp + DeployApp + CallApp + fi +} +UpdateApp() +{ + if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then + return + fi + if [ -d "${WINEPREFIX}.tmpdir" ]; then + rm -rf "${WINEPREFIX}.tmpdir" + fi + ExtractApp "${WINEPREFIX}.tmpdir" + /opt/deepinwine/tools/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v + rm -rf "${WINEPREFIX}.tmpdir" + echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION" +} +RunApp() +{ + if [ -d "$WINEPREFIX" ]; then + UpdateApp + else + DeployApp + fi + CallApp +} + +if [ -z $1 ]; then + RunApp + exit 0 +fi +case $1 in + "-r" | "--reset") + ResetApp + ;; + "-e" | "--remove") + RemoveApp + ;; + "-h" | "--help") + HelpApp + ;; + *) + echo "Invalid option: $1" + echo "Use -h|--help to get help" + exit 1 + ;; +esac +exit 0 diff --git a/update.policy b/update.policy new file mode 100644 index 000000000000..75535d3e8b1e --- /dev/null +++ b/update.policy @@ -0,0 +1,33 @@ +[File] +;;============================================================= +;; Registry - Mask this file is a registry file. +;; Keep - Default. Use template file. +;; Override - Use file in current prefix. +;; Replace - If it's different type in current prefix and +;; in template, use template one to replace it. +;; Ingore - Ingore file when copy. + +;; Ingore update.policy itself. +"^update.policy$" = "Ingore" +"^.update-timestamp$" = "Ingore" + +;; System registry files. +"^(system|userdef|user).reg$" = "Registry" + +;; Addtional assist files. +"^drive_c/Deepin" = "Keep" + +;; Microsoft Office files. +"^drive_c/Windows/(?:control\.ini|hh\.dat|mapiuid\.ini|Reg Save Log\.txt)$" = "Override" + + + +[Registry] +;;============================================================= +;; Keep - Use template key section +;; Override - Use user current key section +;; Merge - Default. Merge two section, user current values + override template + +"^Software\\Wine\\DllOverrides$" = "Keep" +"^Software\\Wine\\Fonts\\Replacements$" = "Keep" |