mirror of
				https://git.koehlerweb.org/frodovdr/guac-install
				synced 2025-10-31 04:56:39 +01:00 
			
		
		
		
	Remove GCC7 Hack
This commit is contained in:
		| @@ -60,24 +60,9 @@ mkdir /etc/guacamole | ||||
|  | ||||
| # Install guacd | ||||
| cd guacamole-server-${GUACVERSION} | ||||
|  | ||||
| # Hack for gcc7 | ||||
| if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]] | ||||
| then | ||||
|     apt-get -y install gcc-6 | ||||
|     if [ $? -ne 0 ] | ||||
|     then | ||||
|         echo "apt-get failed to install gcc-6" | ||||
|         exit | ||||
|     fi | ||||
|     CC="gcc-6" ./configure --with-init-dir=/etc/init.d | ||||
|     CC="gcc-6" make | ||||
|     CC="gcc-6" make install | ||||
| else | ||||
| ./configure --with-init-dir=/etc/init.d | ||||
| make | ||||
| make install | ||||
| fi | ||||
|  | ||||
| ldconfig | ||||
| cd .. | ||||
|   | ||||
| @@ -116,10 +116,11 @@ fi | ||||
| # Install features | ||||
| echo -e "${BLUE}Installing dependencies${NC}" | ||||
|  | ||||
| apt-get -qq -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \ | ||||
| apt-get -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \ | ||||
| libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \ | ||||
| libvorbis-dev libwebp-dev mysql-server mysql-client mysql-common mysql-utilities libmysql-java ${TOMCAT} freerdp-x11 \ | ||||
| ghostscript wget dpkg-dev | ||||
| ghostscript wget dpkg-dev &>> ${LOG} | ||||
|  | ||||
| if [ $? -ne 0 ]; then | ||||
|     echo -e "${RED}Failed${NC}" | ||||
|     exit 1 | ||||
| @@ -171,33 +172,8 @@ mkdir -p /etc/guacamole/extensions | ||||
| # Install guacd | ||||
| cd guacamole-server-${GUACVERSION} | ||||
|  | ||||
| # Patch leftover for Guacamole Server 0.9.14 | ||||
| #wget -q --show-progress -O ./src/terminal/cd0e48234a079813664052b56c501e854753303a.patch https://github.com/apache/guacamole-server/commit/cd0e48234a079813664052b56c501e854753303a.patch | ||||
| #if [ $? -ne 0 ]; then | ||||
| #    echo -e "${RED}Failed to download cd0e48234a079813664052b56c501e854753303a.patch" | ||||
| #    echo -e "https://github.com/apache/guacamole-server/commit/cd0e48234a079813664052b56c501e854753303a.patch" | ||||
| #    echo -e "Attempting to proceed without patch...${NC}" | ||||
| #else | ||||
| #    patch ./src/terminal/typescript.c ./src/terminal/cd0e48234a079813664052b56c501e854753303a.patch | ||||
| #fi | ||||
| echo -e "${BLUE}Building Guacamole with GCC $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}') ${NC}" | ||||
|  | ||||
| # Hack for gcc7 | ||||
| if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]] | ||||
| then | ||||
|     echo -e "${BLUE}Building Guacamole with GCC6...${NC}" | ||||
|     apt-get -qq -y install gcc-6 | ||||
|     if [ $? -ne 0 ]; then | ||||
|         echo -e "${RED}apt-get failed to install gcc-6${NC}" | ||||
|         exit 1 | ||||
|         else | ||||
|         echo -e "${GREEN}GCC6 Installed${NC}" | ||||
|     fi | ||||
|     CC="gcc-6" | ||||
|  | ||||
| else | ||||
|     echo -e "${BLUE}Building Guacamole with GCC7...${NC}" | ||||
|     CC="gcc-7" | ||||
| fi | ||||
| echo -e "${BLUE}Configuring...${NC}" | ||||
| ./configure --with-init-dir=/etc/init.d  &>> ${LOG} | ||||
| if [ $? -ne 0 ]; then | ||||
| @@ -206,6 +182,7 @@ fi | ||||
| else | ||||
|     echo -e "${GREEN}OK${NC}" | ||||
| fi | ||||
|  | ||||
| echo -e "${BLUE}Running Make...${NC}" | ||||
| make &>> ${LOG} | ||||
| if [ $? -ne 0 ]; then | ||||
| @@ -214,6 +191,7 @@ fi | ||||
| else | ||||
|     echo -e "${GREEN}OK${NC}" | ||||
| fi | ||||
|  | ||||
| echo -e "${BLUE}Running Make Install...${NC}" | ||||
| make install &>> ${LOG} | ||||
| if [ $? -ne 0 ]; then | ||||
|   | ||||
| @@ -78,24 +78,9 @@ fi | ||||
| # Upgrade Guacamole Server | ||||
| tar -xzf guacamole-server-${GUACVERSION}.tar.gz | ||||
| cd guacamole-server-${GUACVERSION} | ||||
|  | ||||
| # Hack for gcc-7 | ||||
| if [[ $(gcc --version | head -n1 | grep -oP '\)\K.*' | awk '{print $1}' | grep "^7" | wc -l) -gt 0 ]] | ||||
| then | ||||
|     apt-get -y install gcc-6 | ||||
|     if [ $? -ne 0 ] | ||||
|     then | ||||
|         echo "apt-get failed to install gcc-6" | ||||
|         exit | ||||
|     fi | ||||
|     CC="gcc-6" ./configure --with-init-dir=/etc/init.d | ||||
|     CC="gcc-6" make | ||||
|     CC="gcc-6" make install | ||||
| else | ||||
| ./configure --with-init-dir=/etc/init.d | ||||
| make | ||||
| make install | ||||
| fi | ||||
|  | ||||
| ldconfig | ||||
| systemctl enable guacd | ||||
|   | ||||
		Reference in New Issue
	
	Block a user