LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-21-2012, 03:10 AM   #1
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,489

Rep: Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662
Need a little help on SlackBuild for mozilla-firefox-l10n


Hi,

About a year ago, I wrote a SlackBuild for system-wide mozilla-firefox-l10n that worked quite well. At the time, IIRC, it was for version 5.x, and heavily inspired by the SlackBuild I found in a Salix repository (and which I can't seem to locate anymore).

I've updated the SlackBuild and gave it a spin on the current 14.0.1 version (I'm running Slackware 13.37), and it doesn't work unfortunately.

Here's the SlackBuild:

Code:
#!/bin/sh

# Slackware build script for mozilla-firefox-l10n

# Written by Niki Kovacs <info@microlinux.fr)

PRGNAM=mozilla-firefox-l10n
VERSION=${VERSION:-14.0.1}	 
BUILD=${BUILD:-1}
TAG=${TAG:-_microlinux}		

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) ARCH=i486 ;;
    arm*) ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}	
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}	

# Build translations for the following languages
FOXLANGS="de fr"

set -e # Exit on most errors

for FOXLANG in $FOXLANGS; do

	# Download tarball
	if [ ! -r $FOXLANG.xpi ] ; then
	   wget -c http://mozilla.osuosl.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$FOXLANG.xpi
	fi

	# Check tarball
	md5sum -c $FOXLANG.xpi.md5

done

rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION

for FOXLANG in $FOXLANGS; do
	mkdir -p $PRGNAM-$VERSION/$FOXLANG
	unzip $CWD/$FOXLANG.xpi -d $PRGNAM-$VERSION/$FOXLANG
	cd $PRGNAM-$VERSION/$FOXLANG
	chown -R root:root .
	find . \
	 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
	 -exec chmod 755 {} \; -o \
	 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
	 -exec chmod 644 {} \;
	mkdir -p $PKG/usr/lib/firefox-$VERSION/extensions/langpack-$FOXLANG@firefox.mozilla.org
	cp -a * $PKG/usr/lib/firefox-$VERSION/extensions/langpack-$FOXLANG@firefox.mozilla.org
done

mkdir -p $PKG/usr/lib/firefox-$VERSION/defaults/pref
cp -a $CWD/defaultlocale.js $PKG/usr/lib/firefox-$VERSION/defaults/pref/

if [ $ARCH = "x86_64" ]; then
				mv $PKG/usr/lib $PKG/usr/lib64
fi

mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Here's defaultlocale.js:

Code:
// This forces Firefox language to switch to locale of machine
// // if available.
pref("intl.locale.matchOS", true);
Everything is available in my SVN repository:

Code:
$ svn co svn://svn.tuxfamily.org/svnroot/slackware/slick
Take a peek in the 13.37/source/mozilla-firefox-l10n directory, everything's in there.

If you're asking me why I'm doing this: I'll soon be managing networks with 200+ users. I'd like to use the Slackware+XFCE combination for the clients. But I can't ask of every user to manually download and install language packs locally. So I need these installed system-wide.

Any suggestions on how I might get this to work?
 
Old 07-21-2012, 07:26 AM   #2
san
Member
 
Registered: Jan 2006
Location: vienna, .at
Distribution: Slackware64 13.37
Posts: 50

Rep: Reputation: 12
in your script, there is one thing that i do not understand: where did you get $FOXLANG.xpi.md5 from?

on the server, there is just one general MD5SUMS file, so you will have to add some grep-magic

Last edited by san; 07-21-2012 at 07:28 AM.
 
Old 07-21-2012, 10:54 AM   #3
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,489

Original Poster
Rep: Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662
I generated it myself. Once I downloaded de.xpi of fr.xpi for the first time, I simple did this:

Code:
$ md5sum de.xpi > de.xpi.md5
 
Old 07-21-2012, 12:06 PM   #4
san
Member
 
Registered: Jan 2006
Location: vienna, .at
Distribution: Slackware64 13.37
Posts: 50

Rep: Reputation: 12
o.k., sorry. i just looked at the script without checking out your svn repository before.
good news: it builds and installs without any issues.
bad news: this doesn't answer the question why it won't build on your machine.
 
Old 07-21-2012, 01:46 PM   #5
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,489

Original Poster
Rep: Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662
It builds and installs on my machine without any issues too. Only the addon is not there when I launch Firefox.
 
Old 07-21-2012, 02:00 PM   #6
san
Member
 
Registered: Jan 2006
Location: vienna, .at
Distribution: Slackware64 13.37
Posts: 50

Rep: Reputation: 12
aaaah... i see.
even though i had to confirm the installation upon first startup, i still had to activate it manually in the addons>languages menu (which might not be a desirable situation in case of 200 users).
 
1 members found this post helpful.
Old 07-21-2012, 03:52 PM   #7
kikinovak
Senior Member
 
Registered: Jun 2011
Location: Montpezat (South France)
Distribution: Slackware, Slackware64
Posts: 1,489

Original Poster
Rep: Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662Reputation: 662
Quote:
Originally Posted by san View Post
aaaah... i see.
even though i had to confirm the installation upon first startup, i still had to activate it manually in the addons>languages menu (which might not be a desirable situation in case of 200 users).
Hey! I didn't notice this. That's quite helpful. I just thought the two modules had vanished, sort of. I sense we're getting closer now. The question now is: how can they be enabled by default? Probably by digging into the myriads of Firefox runtime variables and defining the right one.

Any suggestion on that one?

Edit: I *think* the new thing here is the extensions.enabledAddons variable that has to be explicitly set for any single Firefox extension module. I'll try to check this out tomorrow, since it's late here, and I need a fresh head for this sort of thing.

Last edited by kikinovak; 07-21-2012 at 03:58 PM.
 
  


Reply

Tags
firefox, language, slackbuild, translation


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with mozilla-firefox slackbuild Phorize Slackware 6 02-19-2012 08:49 AM
[SOLVED] x64 Mozilla Sunbird slackbuild/package brooky9999 Slackware 12 04-27-2010 08:51 AM
LXer: Mozilla Thunderbird to Find New Home as Mozilla Foundation Focuses on Mozilla Firefox LXer Syndicated Linux News 0 07-27-2007 09:16 AM
LXer: Mozilla Corporation Signs Mozilla Firefox Distribution Deal with RealNetworks LXer Syndicated Linux News 0 08-03-2006 03:21 PM
a small omission in mozilla.slackbuild perfect_circle Slackware 1 10-05-2005 10:08 AM


All times are GMT -5. The time now is 06:13 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration