Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
92 lines (67 sloc) 4.15 KB
# -*- coding: utf-8 -*-
# Copyleft 2012 Pardus ANKA Community
# Copyright 2005-2011 TUBITAK/UEAKE
# Licensed under the GNU General Public License, version 2.
# See the file
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import shelltools
from pisi.actionsapi import get
WorkDir = "mozilla-release"
# Set object directory name correctly. This directory is specific to the build host, and its name is generated by
# value returned by config.guess script.
# config.guess returns 'x86_64-unknown-linux-gnu' on x86_64 machines, and 'i686-pc-linux-gnu' on x86 machines
ObjDir = "obj-%s-unknown-linux-gnu" % get.ARCH() if get.ARCH() == "x86_64" else "obj-%s-pc-linux-gnu" % get.ARCH()
#locales = ["de", "es-AR", "es-ES", "fr", "hu", "it", "nl", "pl", "ru", "sv-SE", "tr"]
def setup():
# Mozilla sticks on with autoconf-213
shelltools.chmod("autoconf-213/autoconf-2.13", 0755)
# Set job count for make
pisitools.dosed(".mozconfig", "%%JOBS%%", get.makeJOBS())
shelltools.system("/bin/bash ./autoconf-213/autoconf-2.13 --macro-dir=autoconf-213/m4")"js/src")
shelltools.system("/bin/bash ../../autoconf-213/autoconf-2.13 --macro-dir=../../autoconf-213/m4")"../..")
shelltools.system("../configure --prefix=/usr --libdir=/usr/lib --disable-strip --disable-install-strip")
def build():
# FIXME: Change library path and version with variables
shelltools.export("LDFLAGS", "%s -Wl,-rpath,/usr/lib/%s-%s" % (get.LDFLAGS(), get.srcNAME(), get.srcVERSION()))
autotools.make("-f ../ build")
# See:
# FIXME: Find an elegant solution to create the Makefile from
# We need to execute configure, otherwise the Makefile in browser/locales doesn't generate.
# Don't execute it before "make -f". Otherwise it's conflicts with mozconfig
# With 'make -f' call, build action takes place in $TOPSRCDIR/$OBJDIR by default. No need to specify l10n dir again, it's read from mozconfig
autotools.make("-f ../ configure")
#for locale in locales:
#autotools.make("-C browser/locales langpack-%s" % locale)
def install():
autotools.rawInstall("-f DESTDIR=%s" % get.installDIR())
# Any reason to do this renaming ?
pisitools.rename("/usr/lib/%s-%s" % (get.srcNAME(), get.srcVERSION()), "MozillaFirefox")
pisitools.remove("/usr/bin/firefox") # new Additional File will replace that
#install locales
#for locale in locales:
#pisitools.insinto("/usr/lib/MozillaFirefox/extensions/" % locale, "%s/dist/xpi-stage/locale-%s/*" % (ObjDir, locale), sym=False)
#pisitools.removeDir("/usr/lib/MozillaFirefox/extensions/" % locale)
#pisitools.remove("/usr/lib/MozillaFirefox/extensions/" % (locale, locale))
#pisitools.dosym("../../../../../../", "/usr/lib/MozillaFirefox/extensions/" % (locale, locale))
shelltools.touch("%s%s/dictionaries/tr-TR.aff" % (get.installDIR(), "/usr/lib/MozillaFirefox"))
shelltools.touch("%s%s/dictionaries/tr-TR.dic" % (get.installDIR(), "/usr/lib/MozillaFirefox"))
# Install fix language packs
pisitools.insinto("/usr/lib/MozillaFirefox/extensions", "./langpack-ff/*")
# Create profile dir, we'll copy bookmarks.html in post-install script
# Install branding icon
pisitools.insinto("/usr/share/pixmaps", "browser/branding/official/default256.png", "firefox.png")
# Install docs
pisitools.dodoc("LEGAL", "LICENSE")