wok-6.x view get-linuxqq/stuff/get-linuxqq @ rev 24418

clamtk: replaced perl-gtk2 by perl-gtk3
author Hans-G?nter Theisgen
date Fri Feb 11 09:25:31 2022 +0100 (2022-02-11)
parents 7f0fea8ad9f4
children
line source
1 #!/bin/sh
2 #
3 # get-linuxqq - create and install SliTaz package linuxqq (Tencent QQ)
4 #
5 # (C) 2020 SliTaz - GNU General Public License v3.
6 # Author : unknown
7 # modified by HGT on 2020-02-11
8 #
10 # === Initialisations ===
12 PKGS_DB="/var/lib/tazpkg" # packages database directory
13 PACKAGE="linuxqq"
14 VERSION="1.0.2" # latest versions as 64-bit variants only
15 CATEGORY="non-free"
16 TAGS="chat im"
17 SHORT_DESC="QQ for Linux $VERSION."
18 WEB_SITE="http://im.qq.com/"
19 DEPENDS="gtk+ gdk-pixbuf"
21 # Declare functions check_root, status, ...
22 . /lib/libtaz.sh
23 # and make commandline options (if any) available as variables
25 is_installed()
26 {
27 if [ -d $ROOT$PKGS_DB/installed/$PACKAGE ]
28 then #package is deemed to be installed
29 return 0
30 else
31 return 1
32 fi
33 }
35 # Show commandline options, if requested by --help
36 if [ "$help" == "yes" ]
37 then
38 echo "Commandline options:
39 $0
40 --root=<path-to-root>
41 --install=yes|no
42 --keep=no|yes
43 --tmpdir=<directory-to-build-package>"
44 exit
45 fi
47 # Check for system administrator privileges
48 check_root
50 title "Package $PACKAGE will be build as SliTaz package and installed"
52 # Fetch latest version, unless version is set by option --version
53 [ -z "$version" ] && version="latest" # unused
55 # Install SliTaz package, unless inhibited by option --install=no
56 [ -z "$install" ] && install="yes"
58 # Delete SliTaz package file $PACKAGE-$VERSION.tazpkg after installation,
59 # unless option --keep=yes is given
60 [ -z "$keep" ] && keep="no"
62 # Directory for temporary files
63 TMP_DIR="$tmpdir"
64 [ -z "$tmpdir" ] && TMP_DIR="/tmp/get-$PACKAGE"
66 # Logging file (unused by now)
67 LOG="$logfile"
68 [ -z "$logfile" ] && LOG=$TMP_DIR/get-$PACKAGE.log
70 cat <<EOT
71 Options in use:
72 root : $root/
73 install package: $install
74 keep tazpkg : $keep
75 build directory: $TMP_DIR
77 EOT
79 separator; newline
81 # === Remove package, if installed ===
82 if is_installed
83 then
84 echo "$PACKAGE is already installed."
85 echo -n "Would you like to remove and reinstall this package [y/n]? "
86 read answer
87 case "$answer" in
88 y|Y)
89 action "Removing installed version..."
90 tazpkg remove $PACKAGE --root="$root/"
91 [ ! is_installed ] &&
92 die "Can't remove installed version. Exiting."
93 ;;
94 *)
95 echo "Leaving $PACKAGE untouched."
96 exit 0
97 ;;
98 esac
99 fi
101 # === Fetch archive file, if not existing ===
102 CUR_DIR=$(pwd)
103 mkdir -p $TMP_DIR
104 cd $TMP_DIR
105 FILE="${PACKAGE}_v${VERSION}_i386.tar.gz"
106 WGET_URL="http://dl_dir.qq.com/linuxqq/$FILE"
107 if [ -f $FILE ]
108 then
109 echo "Using existing archive file $FILE"
110 else
111 action "Fetching the archive"
112 newline
113 wget --no-check-certificate $WGET_URL
114 if [ ! -f $FILE ]
115 then
116 cd $CUR_DIR
117 rm -rf $TMP_DIR
118 echo "Could not transfer $FILE from $WGET_URL. Exiting."
119 exit 1
120 fi
121 fi
123 # === Extract files from archive ===
124 action "Extracting the archive"
125 newline
127 tar xzf $FILE
128 mkdir -p $PACKAGE-$VERSION/fs/usr/share/tencent/
129 mkdir -p $PACKAGE-$VERSION/fs/usr/share/applications/
130 mkdir -p $PACKAGE-$VERSION/fs/usr/bin/
131 mv $TMP_DIR/${PACKAGE}_v${VERSION}_i386 \
132 $TMP_DIR/$PACKAGE-$VERSION/fs/usr/share/tencent/qq
134 # Remove archive file
135 rm -f $FILE
137 cd $TMP_DIR
139 # === Create SliTaz package ===
141 cat > $PACKAGE-$VERSION/fs/usr/bin/qq << EOT
142 #!/bin/sh
143 cd /usr/share/tencent/qq/
144 ./qq
145 EOT
146 chmod +x $PACKAGE-$VERSION/fs/usr/bin/qq
148 cat > $PACKAGE-$VERSION/fs/usr/share/applications/qq.desktop << EOT
149 [Desktop Entry]
150 Version=1.0
151 Encoding=UTF-8
152 Name=腾讯QQ
153 Comment=腾讯QQ
154 Exec=/usr/bin/qq
155 Icon=qq
156 Terminal=false
157 Type=Application
158 Categories=Application;Network;Tencent Software;
159 StartupNotify=true
160 Name[zh_CN]=腾讯QQ
161 GenericName[zh_CN]=
162 Comment[zh_CN]=腾讯QQ
163 EOT
165 # Create recipe for SliTaz package
166 cat > $PACKAGE-$VERSION/receipt << EOT
167 # SliTaz package receipt.
169 PACKAGE="$PACKAGE"
170 VERSION="$VERSION"
171 CATEGORY="$CATEGORY"
172 TAGS="$TAGS"
173 SHORT_DESC="$SHORT_DESC"
174 WEB_SITE="$WEB_SITE"
176 DEPENDS="$DEPENDS"
178 post_install()
179 {
180 chroot $1/ /usr/bin/gdk-pixbuf-query-loaders --update-cache
181 }
182 EOT
184 # for qq.png
185 { uudecode <<-!
186 begin-base64 664 -
187 iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAABHNCSVQICAgI
188 fAhkiAAAAAlwSFlzAAAK8AAACvABQqw0mAAAAB90RVh0U29mdHdhcmUATWFj
189 cm9tZWRpYSBGaXJld29ya3MgOLVo0ngAABPPSURBVGiB1ZlplJ1Vme9/e7/T
190 Gavq1Km5KkVlIiMZCCHEQIAwB5S2MYI0BBGkUWxb5XqbFqSFdikX7GXbDVzt
191 VkZRkcE0CCEYIcxzIAQImSqVpObhzOe857zD3vdDAfZdEhPQD/c+a70fzjpr
192 ve/vv//72ft59hZaa/5/DvMv9aJjjlxlOjFnSiweP8qrVk9y3ep8pXRaqdCw
193 batkmNYOHerfD+/rfXbPYO9uX/veX+K74i/hwEknfXJ5IZP/m3LZPdPzvDYd
194 hobpRGQkFhOOY2HZtrajMS2FGSgVFsNabePw3t47dva/84TWOvhzvv1nOfDZ
195 v147Z3dv3/8sFotnBp6fVFo7pmkKOx4j6kSxIw6mYxGJxqhvbCTV1GbG6hoi
196 geef037Y9NXNu7ufsYX5XU8HL31c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IVqDaVlU
265 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
303 ====
304 !
305 } > $TMP_DIR/$PACKAGE-$VERSION/fs/usr/share/tencent/qq/qq.png
307 action "Creating the package $PACKAGE..."
308 # Pack
309 tazpkg pack $PACKAGE-$VERSION
311 # Remove package tree
312 rm -rf $PACKAGE-$VERSION
314 # === Install the SliTaz package ===
315 [ "$install" == "yes" ] &&
316 yes y | tazpkg install $PACKAGE-$VERSION.tazpkg --root="$root"
318 # === Cleanup ===
319 # Preserve package file, if requested
320 [ "$keep" == "yes" ] &&
321 ( mv $PACKAGE-$VERSION.tazpkg $CUR_DIR &&
322 echo Saved $PACKAGE-$VERSION.tazpkg to $CUR_DIR )
324 # Remove temporary build directory
325 cd $CUR_DIR
326 rm -rf $TMP_DIR