-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqq.Slackbuild
50 lines (39 loc) · 1.26 KB
/
qq.Slackbuild
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
#!/bin/sh
# Slackware build script for qq.
# Copyright 2021 MDrights <[email protected]>
# All rights reserved.
#
PRGNAM=qq
VERSION=${VERSION:-2.0.0_b2_1084}
DISTVERSION="2.0.0-b2-1084"
BUILD=${BUILD:-1}
TAG=${TAG:-_MD}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH="x86" ;;
arm*) ARCH=arm ;;
x86_64) ARCH="x86_64" ;;
*) ARCH=$( uname -m ) ;;
esac
fi
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
DOCFILES=""
set -e
rm -rf $PKG
rm -rf $TMP/$PRGNAM-$VERSION
mkdir -p $TMP $PKG $OUTPUT $TMP/$PRGNAM-$VERSION
cd $TMP/$PRGNAM-$VERSION
#tar xvf $CWD/v$VERSION.tar.gz
#unzip $CWD/$PRGNAM-$ARCH.zip -d $TMP/$PRGNAM-$ARCH
rpm2cpio $CWD/linuxqq_${DISTVERSION}_$ARCH.rpm | cpio -idmv
# Copy the unpacked things to Temp dir.
mkdir -p $PKG/usr/local/bin $PKG/usr/local/lib $PKG/usr/local/share $PKG/usr/share/applications
cp -a $TMP/$PRGNAM-$VERSION/usr/local/bin/qq $PKG/usr/local/bin/
cp -a $TMP/$PRGNAM-$VERSION/usr/local/lib/tencent-qq/ $PKG/usr/local/lib/
cp -a $TMP/$PRGNAM-$VERSION/usr/local/share/tencent-qq/ $PKG/usr/local/share/
cp -a $TMP/$PRGNAM-$VERSION/usr/share/applications/qq.desktop $PKG/usr/share/applications/
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}