#!/bin/bash # This is Remmina bundle update script for Porteus # Version 2024-10-06 # Copyright 2024-2030, Blaze, Dankov, Russia # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Root check if [ `whoami` != "root" ]; then echo -e "\nYou need to be root to run this script.\n" exit 1 fi PRGNAM=${PRGNAM:-remmina} VERSION=$(lynx -source "https://gitlab.com/Remmina/Remmina/-/tags" | grep "Release v" | head -n1 | cut -d'v' -f2 | cut -d'<' -f1) SLACKVER=$(lynx -source "https://slackbuilds.org/repository/15.0/network/remmina/" | grep "remmina (" | cut -d'(' -f2 | cut -d')' -f1) MASTER=$(echo https://gitlab.com/Remmina/Remmina/-/archive/master/Remmina-master.tar.bz2) BOLD=${BOLD:-"\e[1m"} CYAN=${CYAN:-"\e[96m"} GREEN=${GREEN:-"\e[92m"} RED=${RED:-"\e[31m"} RESET=${RESET:-"\e[0m"} CWD=$(pwd) TMPDIR=/tmp/portch PKG=$TMPDIR/package-$PRGNAM PKGINFO=$PKG/var/lib/pkgtools/packages OUTPUT=${OUTPUT:-/tmp} systemFullVersion=$(cat /etc/slackware-version) if [[ ${systemFullVersion//* } != *"+" ]]; then export SLACKWAREVERSION=15.0 AVAHI=${AVAHI:-OFF} KWALLET=${KWALLET:-OFF} TELEPATHY=${TELEPATHY:-OFF} else export SLACKWAREVERSION=current AVAHI=${AVAHI:-ON} KWALLET=${KWALLET:-OFF} TELEPATHY=${TELEPATHY:-OFF} fi if [ -z "$ARCH" ]; then case "$( uname -m )" in i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac fi if [ "$ARCH" = "i586" ]; then SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIRSUFFIX="64" else SLKCFLAGS="-O2" LIBDIRSUFFIX="" fi set -e cleanup(){ [ -d $TMPDIR ] && rm -rf $TMPDIR [ -d $PKG ] && rm -rf $PKG exit } # Check if remmina installed in the system if [[ -f "/usr/bin/remmina" ]]; then MYVER=${MYVER:-`ls /var/lib/pkgtools/packages/*remmina* | cut -d'-' -f2`} fi if [ "$MYVER" == "$VERSION" ]; then echo -e "You have the latest ${GREEN}$MYVER${RESET} version of $PRGNAM" sleep 5 exit else read -p "$(echo -e Would you like to build $PRGNAM ${GREEN}$VERSION${RESET} xzm module? [y/n])" -n 1 -r -s && echo if [[ $REPLY =~ ^[Yy]$ ]]; then echo "We continue the execution of the $0 script" &>/dev/null else exit fi fi echo -e "\nDownloading dependencies for ${BOLD}$PRGNAM-$VERSION-$ARCH${RESET}" rm -f ${OUTPUT}/*.{txz,xzm} getpkg -q cups freerdp gst-plugins-base json-glib libappindicator libdbusmenu libindicator libsodium libvncserver txz2xzm ${OUTPUT}/*.txz > /dev/null && rm ${OUTPUT}/*.txz echo -e "\nActivating dependencies for ${BOLD}$PRGNAM-$VERSION-$ARCH${RESET}" activate ${OUTPUT}/*.xzm -q rm -rf $TMPDIR $PKG mkdir -p $PKG # build xzm module of remmina echo -e "\nCompiling ${BOLD}${PRGNAM}-${VERSION}-${ARCH}${RESET}" cd $PKG && wget -q $MASTER tar -xjf Remmina-master.tar.bz2 && rm -f Remmina-master.tar.bz2 cd Remmina-master chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ -o -perm 511 \) -exec chmod 755 {} \; -o \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \ -DWITH_AVAHI=${AVAHI} \ -DWITH_TELEPATHY=${TELEPATHY} \ -DWITH_VTE=ON \ -DWITH_APPINDICATOR=OFF \ -DWITH_WWW=OFF \ -DWITH_KF5WALLET=${KWALLET} \ -DCMAKE_BUILD_TYPE=Release .. make VERBOSE=1 make install DESTDIR=$PKG cd $PKG && rm -rf $PKG/Remmina-master find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true ### fake Slackware type package info: super dumb version mkdir -p $PKGINFO echo "PACKAGE NAME: $PRGNAM-$VERSION-$ARCH" > $PKGINFO/$PRGNAM-$VERSION-$ARCH cat >> $PKGINFO/$PRGNAM-$VERSION-$ARCH << EOM PACKAGE DESCRIPTION: remmina: remmina (GTK+ Remote Desktop Client) remmina: remmina: Remmina is a remote desktop client written in GTK+, aiming to be remmina: useful for system administrators and travellers, who need to work remmina: with lots of remote computers in front of either large monitors or remmina: tiny netbooks. Remmina supports multiple network protocols in an remmina: integrated and consistant user interface. Currently RDP, VNC, SPICE, remmina: and SSH are supported. remmina: remmina: homepage: https://remmina.org/ remmina: FILE LIST: EOM deactivate ${OUTPUT}/*.xzm -q && rm -f $OUTPUT/cups-*.xzm for i in `find /tmp -type f | fgrep .xzm | sort`; do unsquashfs -n -f $i >/dev/null; done cp -arf $PKG/squashfs-root/* $PKG rm -rf $PKG/squashfs-root $OUTPUT/*.xzm # clean unusful stuff rm -rf $PKG/usr/{doc,man,include,info,src} rm -rf $PKG/usr/lib{,64}/{cmake,girepository-1.0,pkgconfig} rm -rf $PKG/usr/lib{,64}/python*/site-packages/*.egg-info rm -rf $PKG/usr/share/{doc,gir-1.0,gst-plugins-base,gtk-doc,help,licenses,man,pkgconfig} rm -rf $PKG/usr/share/locale/{ab,af,as,az,bn_IN,fur,ky,ml,ne,or,pa,sr@latin,tg,zh_HK} rm -rf $PKG/var/lib/pkgtools/douninst.sh rm -f $PKG/var/log/scripts/* rm -f $PKG/{,usr/}lib{,64}/*.la find $PKG -type f -name "*.la" -delete find $PKG -type f -name "*.a" -delete find $PKG -type f -name "*.h" -delete find $PKG -type f -iname "README" -delete find $PKG -type f -iname "README*.txt" -delete find $PKG -type f -iname "LICENSE*.txt" -delete find $PKG/usr/share/locale -type f ! -name 'remmina.mo' -delete # Choose locales echo -e "\nChoose a locale from the list:\n" echo '1) ar | 16) en_AU | 31) hu | 46) ms | 61) sq 2) ast | 17) en_GB | 32) id | 47) my | 62) sr 3) be | 18) en_US | 33) ie | 48) nb | 63) sv 4) ber | 19) eo | 34) it | 49) nl | 64) te 5) bg | 20) es | 35) ja | 50) oc | 65) th 6) bn | 21) es_VE | 36) ka | 51) pl | 66) tr 7) br | 22) et | 37) kab | 52) pt | 67) ug 8) bs | 23) eu | 38) kk | 53) pt_BR | 68) uk 9) ca | 24) fa | 39) km | 54) pt_PT | 69) uz 10) 'ca\@valencia' | 25) fi | 40) kn | 55) ro | 70) 'uz\@cyrillic' 11) ckb | 26) fr | 41) ko | 56) ru | 71) vi 12) cs | 27) gl | 42) lt | 57) shn | 72) zh_CN 13) da | 28) he | 43) lv | 58) si | 73) zh_TW 14) de | 29) hi | 44) mk | 59) sk | 15) el | 30) hr | 45) mr | 60) sl |' | column -ts $'\|' read -p "$(echo -e "\n${BOLD}All other locales will be removed.${RESET}\n\n#? ")" if [[ $REPLY = 1 ]]; then RLANG=ar for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ar' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 2 ]]; then RLANG=ast for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ast' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 3 ]]; then RLANG=be for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'be' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 4 ]]; then RLANG=ber for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ber' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 5 ]]; then RLANG=bg for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'bg' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 6 ]]; then RLANG=bn for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'bn' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 7 ]]; then RLANG=br for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'br' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 8 ]]; then RLANG=bs for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'bs' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 9 ]]; then RLANG=ca for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ca' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 10 ]]; then RLANG=ca-val for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ca\@valencia' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 11 ]]; then RLANG=ckb for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ckb' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 12 ]]; then RLANG=cs for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'cs' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 13 ]]; then RLANG=da for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'da' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 14 ]]; then RLANG=de for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'de' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 15 ]]; then RLANG=el for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'el' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 16 ]]; then RLANG=en_AU for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'en_AU' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 17 ]]; then RLANG=en_GB for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'en_GB' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 18 ]]; then RLANG=en_US for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 19 ]]; then RLANG=eo for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'eo' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 20 ]]; then RLANG=es for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'es' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 21 ]]; then RLANG=es_VE for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'es_VE' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 22 ]]; then RLANG=et for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'et' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 23 ]]; then RLANG=eu for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'eu' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 24 ]]; then RLANG=fa for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'fa' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 25 ]]; then RLANG=fi for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'fi' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 26 ]]; then RLANG=fr for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'fr' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 27 ]]; then RLANG=gl for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'gl' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 28 ]]; then RLANG=he for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'he' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 29 ]]; then RLANG=hi for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'hi' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 30 ]]; then RLANG=hr for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'hr' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 31 ]]; then RLANG=hu for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'hu' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 32 ]]; then RLANG=id for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'id' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 33 ]]; then RLANG=ie for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ie' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 34 ]]; then RLANG=it for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'it' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 35 ]]; then RLANG=ja for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ja' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 36 ]]; then RLANG=ka for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ka' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 37 ]]; then RLANG=kab for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'kab' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 38 ]]; then RLANG=kk for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'kk' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 39 ]]; then RLANG=km for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'km' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 40 ]]; then RLANG=kn for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'kn' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 41 ]]; then RLANG=ko for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ko' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 42 ]]; then RLANG=lt for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'lt' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 43 ]]; then RLANG=lv for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'lv' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 44 ]]; then RLANG=mk for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'mk' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 45 ]]; then RLANG=mr for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'mr' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 46 ]]; then RLANG=ms for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ms' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 47 ]]; then RLANG=my for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'my' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 48 ]]; then RLANG=nb for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'nb' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 49 ]]; then RLANG=nl for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'nl' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 50 ]]; then RLANG=oc for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'oc' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 51 ]]; then RLANG=pl for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'pl' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 52 ]]; then RLANG=pt for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'pt' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 53 ]]; then RLANG=pt_BR for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'pt_BR' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 54 ]]; then RLANG=pt_PT for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'pt_PT' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 55 ]]; then RLANG=ro for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ro' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 56 ]]; then RLANG=ru for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ru' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 57 ]]; then RLANG=shn for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'shn' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 58 ]]; then RLANG=si for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'si' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 59 ]]; then RLANG=sk for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'sk' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 60 ]]; then RLANG=sl for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'sl' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 61 ]]; then RLANG=sq for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'sq' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 62 ]]; then RLANG=sr for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'sr' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 63 ]]; then RLANG=sv for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'sv' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 64 ]]; then RLANG=te for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'te' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 65 ]]; then RLANG=th for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'th' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 66 ]]; then RLANG=tr for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'tr' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 67 ]]; then RLANG=ug for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'ug' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 68 ]]; then RLANG=uk for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'uk' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 69 ]]; then RLANG=uz for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'uz' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 70 ]]; then RLANG=uz-cyr for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'uz\@cyrillic' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 71 ]]; then RLANG=vi for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'vi' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 72 ]]; then RLANG=zh_CN for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'zh_CN' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done elif [[ $REPLY = 73 ]]; then RLANG=zh_TW for i in `find $PKG/usr/share/locale -maxdepth 1 -type d ! -name 'locale' ! -name 'zh_TW' ! -name 'en_US'`; do rm -rf $i &>/dev/null; done fi # build remmina as xzm bundle dir2xzm $PKG $OUTPUT/$PRGNAM-$VERSION-$ARCH-$RLANG.xzm # Check on remmina xzm file exists in /tmp if [ -f "$OUTPUT/$PRGNAM-$VERSION-$ARCH-$RLANG.xzm" ]; then echo -e "\n${BOLD}Your $PRGNAM module is at: ${GREEN}${BOLD}$OUTPUT/$PRGNAM-$VERSION-$ARCH-$RLANG.xzm${RESET}\n${BOLD}Please copy it to your modules folder to survive a reboot.${RESET}\n" else echo -e "\n${RED}${BOLD}Faile. Your $PRGNAM module is not built.${RESET}\n" fi cleanup