HOWTO Module Google-chrome current version for porteus 1.1 (

Post tutorials, HOWTO's and other useful resources here.
liguero
White ninja
White ninja
Posts: 14
Joined: 16 Mar 2012, 09:13
Location: FRANCE

HOWTO Module Google-chrome current version for porteus 1.1 (

Post#1 by liguero » 27 Mar 2012, 21:54

Module Google-chrome current version for porteus 1.1 (i386)

Thanks to Mutaku
http://www.mutaku.com/wp/index.php/2011 ... -13-13-37/

From its documentation I had the idea to write a small script that performs all the tasks required to create a new module.
There's always some awkwardness. The improvements are welcome.

1. code: SELECT ALL
2. copy and paste under Kwrite.
3. save as "module-chrome.sh" for instance.
4. run this script as root (su, password) then ./module-chrome.sh

The Hope Is Vital!

If all goes well then you will find google-chrome in the KDE menu "Internet".

Code: Select all

#!/bin/bash
#Google Chrome requires google-chrome-pam-solibs-1.1.3-i486-1, ORBit2-2.14.19-i486-1, GConf-2.32.1-i486-1, mozilla-nss-3.13.3-i486
mkdir g-chrome
cd g-chrome

carroll="ftp://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware-13.37/extra/google-chrome"
packlist="google-chrome-pam-solibs-1.1.3-i486-1 ORBit2-2.14.19-i486-1 GConf-2.32.1-i486-1 mozilla-nss-3.13.3-i486-1alien"
PKGNAM="google-chrome-stable_current_i386.deb"

wget --no-check-certificate https://dl.google.com/linux/direct/$PKGNAM
wget $carroll/google-chrome.SlackBuild
wget $carroll/slack-desc

# Get the version from the Debian/Ubuntu .deb (thanks to Fred Richards):
case "$(uname -m)" in
  i?86) DEBARCH="i386" ;;
  x86_64) DEBARCH="amd64" ;;
  *) echo "Package for $(uname -m) architecture is not available." ; exit 1 ;;
esac
VERSION=$(ar p $PKGNAM control.tar.gz 2> /dev/null | tar zxO ./control 2> /dev/null | grep Version | awk '{print $2}' | cut -d- -f1)
BUILD=${BUILD:-1}

#real package's name
pack_name="google-chrome-"$VERSION"-"$DEBARCH"-"$BUILD

if [ ! -s /mnt/live/memory/modules/$pack_name.xzm ]; then
	chmod +x google-chrome.SlackBuild
	echo "Create package /tmp/"$pack_name".txz"
	./google-chrome.SlackBuild
	else
	echo "Sorry, package " $pack_name " is already installed !"
	echo 
	pack_name=""
fi

for pack in $packlist
do
	if [ ! -s /mnt/live/memory/modules/$pack.xzm ]; then
		loadpack=$loadpack$pack" "
			else echo $pack".xzm: already installed."
	fi
done

if [ ${#loadpack} != 0 -o ${#pack_name} != 0 ]; then
	
	for pack in $loadpack
	do
		if [ ${pack:0:7} = "mozilla" ]; then 
		carroll="http://connie.slackware.com/~alien/slackbuilds/mozilla-nss/pkg/13.37"
		fi
		wget -P /tmp $carroll/$pack.txz
		done

	read -p 'make modules for porteus 1.1 ? [y/n] : ' -n 1 -s yes
	echo
	if [ $yes = "y" ]; then
	loadpack=$pack_name" "$loadpack
		for pack in $loadpack
			do
				txz2xzm /tmp/$pack.txz /tmp/$pack.xzm
			done
	
		read -p 'activate modules for porteus 1.1 ? [y/n] : ' -n 1 -s yes
		echo
		if [ $yes = "y" ]; then
			for pack in $loadpack
				do
					activate /tmp/$pack.xzm
				done
		fi
	fi
	cd ..
	read -p 'remove directory g-chrome created later ? [y/n] : ' -n 1 -s yes
	echo
	if [ $yes = "y" ]; then
	rm -r g-chrome
	fi
fi
echo "all is done"
Publié after 1 day 2 hours 20 minutes 10 seconds:
Sorry, don't forget to make the script executable.

chmod +x module-chrome.sh

bye

azrash
Ronin
Ronin
Posts: 2
Joined: 16 Dec 2013, 19:06
Distribution: porteus, ubuntu, win7
Location: Malaysia

Re: HOWTO Module Google-chrome current version for porteus 1

Post#2 by azrash » 16 Dec 2013, 19:21

would the script work on 64 bits porteus as well?

Post Reply