summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorredchenjs2019-06-21 22:56:11 +0800
committerredchenjs2019-06-21 22:56:11 +0800
commit468d2045e11b6961d3bb2fbdf20d7d026544a865 (patch)
tree278f9a1b2073aab238ec2f76c25dae5cba094581
downloadaur-468d2045e11b6961d3bb2fbdf20d7d026544a865.tar.gz
init commit
-rw-r--r--.SRCINFO15
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD52
3 files changed, 70 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..058251ab11e
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,15 @@
+pkgbase = mitalk
+ pkgdesc = MiTalk Messenger
+ pkgver = 4.0.13
+ pkgrel = 1
+ url = http://www.miliao.com/
+ arch = x86_64
+ license = custom
+ makedepends = imagemagick
+ makedepends = p7zip
+ makedepends = sed
+ source = appimage::https://s1.zb.mi.com/miliao/apk/miliao/7.4/MiTalk_4.0.13.AppImage
+ md5sums = 692fc2549674c10a86c01d9b13d8bea3
+
+pkgname = mitalk
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..a7b8f64b98b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/
+src/
+*.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..5f3cb68ffad
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,52 @@
+# Maintainer: Jack Chen <redchenjs@live.com>
+
+pkgname=mitalk
+pkgver=4.0.13
+pkgrel=1
+pkgdesc="MiTalk Messenger"
+arch=('x86_64')
+url="http://www.miliao.com/"
+license=('custom')
+makedepends=(
+ 'imagemagick'
+ 'p7zip'
+ 'sed'
+)
+source=(
+ 'appimage::https://s1.zb.mi.com/miliao/apk/miliao/7.4/MiTalk_4.0.13.AppImage'
+)
+md5sums=(
+ '692fc2549674c10a86c01d9b13d8bea3'
+)
+
+package() {
+ 7z x appimage -o"${pkgdir}"/opt/mitalk/
+
+ chmod 755 "${pkgdir}"/opt/
+ chmod 755 "${pkgdir}"/opt/mitalk/
+ chmod 755 "${pkgdir}"/opt/mitalk/米聊
+ chmod 755 "${pkgdir}"/opt/mitalk/lib/
+ chmod 755 "${pkgdir}"/opt/mitalk/locales/
+ chmod 755 "${pkgdir}"/opt/mitalk/resources/
+ chmod 755 "${pkgdir}"/opt/mitalk/swiftshader/
+
+ for i in 16x16 22x22 24x24 32x32 48x48 64x64 128x128 256x256; do
+ convert -adaptive-resize $i "${pkgdir}"/opt/mitalk/usr/share/icons/hicolor/0x0/apps/米聊.png \
+ "${pkgdir}"/opt/mitalk/usr/share/icons/hicolor/0x0/apps/mitalk_$1.png
+ install -Dm644 "${pkgdir}"/opt/mitalk/usr/share/icons/hicolor/0x0/apps/mitalk_$1.png \
+ "${pkgdir}"/usr/share/icons/hicolor/$i/apps/mitalk.png
+ done
+
+ mv "${pkgdir}"/opt/mitalk/米聊 "${pkgdir}"/opt/mitalk/mitalk
+
+ sed -i "s/Icon=米聊/Icon=mitalk/" "${pkgdir}"/opt/mitalk/米聊.desktop
+ sed -i "s/Exec=AppRun/Exec=\/opt\/mitalk\/mitalk/" "${pkgdir}"/opt/mitalk/米聊.desktop
+
+ install -Dm644 "${pkgdir}"/opt/mitalk/米聊.desktop "${pkgdir}"/usr/share/applications/mitalk.desktop
+
+ rm "${pkgdir}"/opt/mitalk/米聊.*
+ rm "${pkgdir}"/opt/mitalk/AppRun
+
+ rm -r "${pkgdir}"/opt/mitalk/usr/
+ rm -r "${pkgdir}"/opt/mitalk/resources/app.asar.unpacked/
+}