summaryrefslogtreecommitdiff
path: root/libre/icecat/PKGBUILD
blob: 7d6674f40c35ae9ff056b83d6a70293163e5a824 (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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# Maintainer: Figue <ffigue at gmail>
# Contributor: Figue <ffigue at gmail>
# Contributor (Parabola): fauno <fauno@kiwwwi.com.ar>
# Contributor (Parabola): vando <facundo@esdebian.org>
# Contributor (Parabola): emulatorman <andre.paulista@adinet.com.uy>
# Thank you very much to the older contributors:
# Contributor: evr <evanroman at gmail>
# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com> 

# Changelog
# =6.0
# * Build with PGO support
# =3.6.13
# * Installed Privacy Extension by default
# * DDG is now the default search engine
# =3.6.9
# * Added libnotify as required by configure
# =3.6.7
# * Added duckduckgo.com secure search engine
# =3.6.4
# * Disabled SafeBrowsing until we find a non-google alternative (25/6/10)
# * Disabled ContentHandlers and other Google/Yahoo! related services

pkgname=icecat
pkgver=10.0
pkgrel=1
pkgdesc="GNU version of the Firefox browser. SafeBrowsing and other Google services disabled!"
arch=('i686' 'x86_64' 'mips64el')
license=('MPL' 'GPL' 'LGPL')
depends=('gtk2' 'mozilla-common' 'nss' 'libxt' 'hunspell' 'startup-notification' 'mime-types' 'dbus-glib' 'alsa-lib' 'sqlite3' 'libnotify' 'desktop-file-utils' 'libvpx' 'libevent' 'hicolor-icon-theme')
makedepends=('p7zip-libre' 'zip' 'unzip-libre' 'pkg-config' 'diffutils' 'python2-libre' 'wireless_tools' 'yasm' 'mesa' 'autoconf2.13' 'libidl2' 'xorg-server-xvfb')
options=(!buildflags !distcc)
url="http://www.gnu.org/software/gnuzilla/"
install=icecat.install
source=(ftp://ftp.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${pkgver}.tar.xz
        mozconfig
        icecat.desktop
        icecat-safe.desktop
        mozilla-firefox-1.0-lang.patch
        firefox-version.patch
	libvpx.patch
# Search engines
		internet-archive.xml
		jamendo-en.xml
		logless-search.xml
		scroogle-ssl-english.xml
		yacy.xml
        duck-duck-go-ssl.xml
        duck-duck-go-lite.xml
        Makefile.in
# Default options
        firefox.js
        region.properties)
md5sums=('5a30f5c5422fb7c9b1a2d253028df9d7'
         '927c3ac9ad0ba682e0ec9b66ed8cc4d3'
         'e81ad01dbc16ba28bf92ba4b7c309ca7'
         'd93fe402b87cd000a869e1fd6badc6c9'
         'bd5db57c23c72a02a489592644f18995'
         'ff4654144499faf630271cddc2261b7c'
         'e5d6c83b98d2d2ac69ff4d277702ff55'
         '462c68585461f8cdc23c93c46f6ee4cf'
         '2d492295c4308f9bba9ece28d8b3af2d'
         '937ac0e5392b060d93bd33e761fbfa51'
         'cf97082e77e3ef5f1bd74b1db9329965'
         '24528ca3f7f1e1a0ba735231aa3ac1de'
         'c5f00b6b24222aacd5a749d1f59c4d24'
         'e1bda0854de7d764f7401c81bb82b5ef'
         'ff83f1796ee13d3aec494649491d93cc'
         '9952048383966926eea6d67384102425'
         'f1c76e7e244257856a386ca2de69bdf0')

build() {
  ICECATDIR="/usr/lib/${pkgname}-${pkgver}" && export ICECATDIR

  cd "${srcdir}/${pkgname}-${pkgver}/"
  patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch"
  patch -Np1 -i "${srcdir}/libvpx.patch"

# Solve missing reporter locales and preprocessor.pl
  cp --remove-destination ${srcdir}/Makefile.in ./browser/locales/

# Default prefs, remove Google stuff 
  cp --remove-destination ${srcdir}/region.properties ./browser/locales/en-US/chrome/browser-region/
  cp --remove-destination ${srcdir}/firefox.js ./browser/app/profile/

  cp "${srcdir}/mozconfig" .mozconfig
  patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch"
  patch -Np1 -i "${srcdir}/firefox-version.patch"

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

  export LDFLAGS="$LDFLAGS -Wl,-rpath,/usr/lib/icecat-${pkgver}"
  export PYTHON="/usr/bin/python2"

  LD_PRELOAD="" /usr/bin/Xvfb -nolisten tcp -extension GLX -screen 0 1280x1024x24 :99 &
  LD_PRELOAD="" DISPLAY=:99 make -j1 -f client.mk profiledbuild MOZ_MAKE_FLAGS="$MAKEFLAGS"
  kill $! || true
}

package() {
  ICECATDIR="/usr/lib/${pkgname}-${pkgver}" && export ICECATDIR

  cd "${srcdir}/${pkgname}-${pkgver}/"
  make -j1 -f client.mk DESTDIR="${pkgdir}" install

  msg2 "Finishing..."
  install -m755 -d ${pkgdir}/usr/share/applications
  install -m755 -d ${pkgdir}/usr/share/pixmaps
  install -m644 ${srcdir}/${pkgname}-${pkgver}/browser/branding/unofficial/default48.png ${pkgdir}/usr/share/pixmaps/icecat.png
  install -m644 ${srcdir}/icecat.desktop ${pkgdir}/usr/share/applications/
  install -m644 ${srcdir}/icecat-safe.desktop ${pkgdir}/usr/share/applications/

  cd ${pkgdir}/usr/lib
  ln -s ${ICECATDIR} icecat

  rm -rf "${pkgdir}"/usr/lib/icecat-${pkgver}/{dictionaries,hyphenation}
  ln -sf /usr/share/hunspell "${pkgdir}/usr/lib/icecat-${pkgver}/dictionaries"
  ln -sf /usr/share/hyphen "${pkgdir}/usr/lib/icecat-${pkgver}/hyphenation"

  # We don't want the development stuff
  rm -r "${pkgdir}"/usr/{include,lib/icecat-devel-$pkgver,share/idl}

  #workaround for now
  #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
  ln -sf /usr/lib/icecat-${pkgver}/icecat-bin "${pkgdir}/usr/lib/icecat-${pkgver}/icecat"

  msg2 "Removing proprietary and anti-privacy search engines"
  rm -f ${pkgdir}${ICECATDIR}/searchplugins/{google,answers,amazondotcom,eBay,yahoo,bing}.xml
  msg2 "And provide better ones..."
  install -m755 -d ${pkgdir}${ICECATDIR}/searchplugins/
  install -m644 ${srcdir}/*.xml ${pkgdir}${ICECATDIR}/searchplugins/
}