summaryrefslogtreecommitdiffstats
path: root/firefox/Pkgfile
blob: a65223bce347df2ebb0400043285545a25d56773 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# Description: Navigateur internet de Mozilla
# URL: http://www.mozilla.com/firefox/
# Maintainer: NuTyX core team
# Packager: thierryn1 at hispeed dot ch
# Depends on: libevent,yasm, desktop-file-utils, startup-notification, alsa-lib, mesa3d, gtk, libidl, pango, curl, nss, libnotify, dbus-glib, hunspell
# Run on: libevent,desktop-file-utils,startup-notification,alsa-lib,mesa3d,gtk,libidl,pango,curl,nss,libnotify,dbus-glib,hunspell

name=firefox
version=13.0

release=3

branch=test

[ "`uname -m`" == "i686"   ] && _ARCH=i686
[ "`uname -m`" == "x86_64"   ] && _ARCH=x86_64

source=(ftp://ftp.mozilla.org/pub/mozilla.org/$name/releases/$version/source/$name-$version.source.tar.bz2
        firefox.desktop firefox-install-dir.patch vendor.js)
    
build() {
 
  wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/$version/linux-`uname -m`/xpi/fr.xpi

  cd "mozilla-release"   
  patch -Np1 -i $SRC/firefox-install-dir.patch

	# Création du mozconfig
	
	cat > mozconfig << EOF
# for multicore machine you can speed up the build by running
mk_add_options MOZ_MAKE_FLAGS="-j5"


# If you have installed wireless-tools delete this option:
ac_add_options --disable-necko-wifi


# If you have installed xulrunner uncomment these two lines:
# ac_add_options --with-system-libxul
# ac_add_options --with-libxul-sdk=$(pkg-config --variable=sdkdir libxul)

# Uncomment these if you have installed them:
ac_add_options --enable-startup-notification
# ac_add_options --with-system-libvpx

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir
ac_add_options --enable-official-branding
ac_add_options --prefix=/usr

# The rest of these options have no effect if you're
# building against an already installed xulrunner:
ac_add_options --disable-crashreporter
ac_add_options --disable-debug
ac_add_options --disable-installer
ac_add_options --disable-static
ac_add_options --disable-tests
ac_add_options --disable-updater
ac_add_options --enable-shared
ac_add_options --enable-system-cairo
ac_add_options --enable-system-ffi
ac_add_options --with-pthreads
ac_add_options --with-system-jpeg
ac_add_options --with-system-png
ac_add_options --with-system-zlib
ac_add_options --with-system-nspr
ac_add_options --with-system-nss
ac_add_options --enable-system-hunspell
ac_add_options --enable-system-sqlite
EOF

	# Fix PRE_RELEASE_SUFFIX
  sed -i '/^PRE_RELEASE_SUFFIX := ""/s/ ""//' browser/base/Makefile.in

  export PYTHON="/usr/bin/python2"

  LD_PRELOAD="" DISPLAY=:99 make -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"

  make -f client.mk DESTDIR="$PKG" install
  
  mkdir -p $PKG/usr/lib/firefox/defaults/pref
  install -m644 $SRC/vendor.js $PKG/usr/lib/firefox/defaults/pref  

  for i in 16 22 24 32 48 256; do
      install -Dm644 browser/branding/official/default$i.png \
        "$PKG/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png"
  done

  install -Dm644 "$SRC/firefox.desktop" \
    "$PKG/usr/share/applications/firefox.desktop"

   rm -rf $PKG/usr/lib/firefox/{dictionaries,hyphenation}
   ln -s /usr/share/hunspell $PKG/usr/lib/firefox/dictionaries
   ln -s /usr/share/hyphen $PKG/usr/lib/firefox/hyphenation

    rm -r $PKG/usr/{include,lib/firefox-devel,share/idl}

    install -Dm644 $SRC/fr.xpi \
        $PKG/usr/lib/firefox/extensions/langpack-fr@firefox.mozilla.org.xpi

}