diff options
author | ChenShiSheng | 2022-10-27 15:25:36 +0800 |
---|---|---|
committer | ChenShiSheng | 2022-10-27 15:25:36 +0800 |
commit | 1d7dec7d43033f2cf1fbfb8673b507fa56dee780 (patch) | |
tree | 3764357516d864fe34dc69c9971b707d1dbeec25 | |
download | aur-awstudio-community.tar.gz |
init
-rw-r--r-- | .SRCINFO | 30 | ||||
-rw-r--r-- | PKGBUILD | 24 | ||||
-rw-r--r-- | awstudio-community.install | 110 |
3 files changed, 164 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..e04384a07d1c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,30 @@ +pkgbase = awstudio-community + pkgdesc = The commercial grade solution of low-code application development base on AWTK. + pkgver = 1.1.18 + pkgrel = 1 + url = https://awtk.zlg.cn + install = awstudio-community.install + arch = x86_64 + groups = + license = CUSTOM + depends = alsa-lib + depends = desktop-file-utils + depends = gcc + depends = glu + depends = gtk3 + depends = harfbuzz + depends = hicolor-icon-theme + depends = libgl + depends = libibus + depends = readline + depends = scons + depends = sndio + depends = tracker3-docs + depends = libgit2 + depends = openssl + options = !strip + options = !emptydirs + source = https://zlgcloud.oss-cn-shenzhen.aliyuncs.com/awstudio/AWStudio-Community-amd64-1.1.18.deb + sha512sums = 68b4b68d2118a75a2894aa57ad71055ba3c6bcd099dd843ffbbf3287c47265f39fa25ba3178ae5a16c0115ae86af72ea208165f1efdd9b192016aa268875dcbd + +pkgname = awstudio-community diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ca4b0e974802 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,24 @@ +# Maintainer: Chance Chen <ufbycd@163.com> + +pkgname=awstudio-community +pkgver=1.1.18 +pkgrel=1 +pkgdesc="The commercial grade solution of low-code application development base on AWTK." +arch=('x86_64') +url="https://awtk.zlg.cn" +license=('CUSTOM') +groups=('') +depends=('alsa-lib' 'desktop-file-utils' 'gcc' 'glu' 'gtk3' 'harfbuzz' 'hicolor-icon-theme' 'libgl' 'libibus' 'readline' 'scons' 'sndio' 'tracker3-docs' 'libgit2' 'openssl') +options=('!strip' '!emptydirs') +install=${pkgname}.install +source=("https://zlgcloud.oss-cn-shenzhen.aliyuncs.com/awstudio/AWStudio-Community-amd64-${pkgver}.deb") +sha512sums=('68b4b68d2118a75a2894aa57ad71055ba3c6bcd099dd843ffbbf3287c47265f39fa25ba3178ae5a16c0115ae86af72ea208165f1efdd9b192016aa268875dcbd') + +package(){ + + # Extract package data + tar -xJ -f data.tar.xz -C "${pkgdir}" + + #install -D -m644 "usr/share/AWStudio/resources/sign/license" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + +} diff --git a/awstudio-community.install b/awstudio-community.install new file mode 100644 index 000000000000..53e096bc74a3 --- /dev/null +++ b/awstudio-community.install @@ -0,0 +1,110 @@ +post_install() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + + TARGET_INSTALL_PATH=/usr/share + LIB_PATH=/usr/lib + + # Name of AWTK SDK package + AWTK_RELEASES_VERSION="awtk-sdk-v22.05.1.tar.gz" + + # Install path of AWStudio + AW_STUDIO_INSTALL_PATH="$TARGET_INSTALL_PATH/AWStudio" + + # Install path of AWTK-Designer + AWTK_DESIGNER_INSTALL_PATH="$AW_STUDIO_INSTALL_PATH/AWTK" + + # AWTK SDK extract path + AWTK_SDK_PATH="$AWTK_DESIGNER_INSTALL_PATH/SDK" + + # User configuration path. Equivalent to %appdata% on windows + USER_CONFIG_PATH="${HOME}/.config/awstudio" + + # Create AWTK SDK and user config path + if [ ! -d "$AWTK_SDK_PATH" ]; then + mkdir -p "$AWTK_SDK_PATH" + fi + if [ ! -d "$USER_CONFIG_PATH" ]; then + mkdir -p "$USER_CONFIG_PATH" + fi + + # Extract AWTK SDK + echo "Extract AWTK SDK ..." + + SDK_TMP_EXTRACT_PATH="$AWTK_DESIGNER_INSTALL_PATH/tmp" + if [ -d "$SDK_TMP_EXTRACT_PATH" ]; then + rm -r "$SDK_TMP_EXTRACT_PATH" + fi + mkdir -p "$SDK_TMP_EXTRACT_PATH" + tar -xzvf "$AWTK_DESIGNER_INSTALL_PATH/Installer/$AWTK_RELEASES_VERSION" -C "$AWTK_DESIGNER_INSTALL_PATH/tmp" + + # if tmp folder has awtk-v1.5+rc.5 sub folder, enter. + AWTK_RELEASES_VERSION_NAME="${AWTK_RELEASES_VERSION:0:-7}" + if [ -d "$SDK_TMP_EXTRACT_PATH/$AWTK_RELEASES_VERSION_NAME" ]; then + SDK_TMP_EXTRACT_PATH="$SDK_TMP_EXTRACT_PATH/$AWTK_RELEASES_VERSION_NAME" + fi + + # clear old SDK folder except user_apps + for file in `ls "$AWTK_SDK_PATH"` + do + if [ "$file" = "user_apps" ]; then + continue + fi + echo "remove $AWTK_SDK_PATH/$file" + rm -rf "$AWTK_SDK_PATH/$file" + done + + echo "$SDK_TMP_EXTRACT_PATH" + + # mv to SDK + for file in `ls "$SDK_TMP_EXTRACT_PATH"` + do + if [ "$file" = "user_apps" ] && + [ -d "$AWTK_SDK_PATH/user_apps" ] + then + continue + fi + echo "mv $SDK_TMP_EXTRACT_PATH/$file -> $AWTK_SDK_PATH" + mv "$SDK_TMP_EXTRACT_PATH/$file" "$AWTK_SDK_PATH" + done + + echo remove "$AWTK_DESIGNER_INSTALL_PATH/tmp" + rm -rf "$AWTK_DESIGNER_INSTALL_PATH/tmp" + + # chmod SDK dir + chmod -R 777 "$AW_STUDIO_INSTALL_PATH" + chmod -R 777 "$USER_CONFIG_PATH" + + # chown current user + current_user=`who | awk '{print $1}'` + chown -R $current_user "$AWTK_DESIGNER_INSTALL_PATH" + + echo "Done." + update-desktop-database -q +} + +post_upgrade() { + post_install +} + +post_remove() { + gtk-update-icon-cache -q -t -f usr/share/icons/hicolor + + AWSTUDIO_PATH=/usr/share/AWStudio + AWTK_PATH=$AWSTUDIO_PATH/AWTK + AWTK_SDK_PATH=$AWTK_PATH/SDK + LIB_PATH=/usr/lib + + # delete SDK + echo "remove SDK ..." + + for file in `ls $AWTK_SDK_PATH` + do + if [ "$file" = "user_apps" ]; then + continue + fi + echo "remove $AWTK_SDK_PATH/$file" + rm -rf "$AWTK_SDK_PATH/$file" + done + + update-desktop-database -q +} |