summaryrefslogtreecommitdiff
path: root/libre/icecat/PKGBUILD
blob: a3e757401866f65bd24606427b64d4fdbe5c68fb (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
# Contributor: figue <ffigue at gmail>
# Contributor (Parabola): fauno <fauno@kiwwwi.com.ar>
# Thank you very much to the older contributors:
# Contributor: evr <evanroman at gmail>
# Contributor: Muhammad 'MJ' Jassim <UnbreakableMJ@gmail.com> 

# Changelog
# =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=3.6.13
_pkgver=3.6
pkgrel=2
_xulver=1.9.2.13
pkgdesc="GNU version of the Firefox browser. SafeBrowsing and other Google services disabled!"
arch=(i686 x86_64)
url="http://www.gnu.org/software/gnuzilla/"
license=('GPL2' 'MPL' 'LGPL')
depends=("xulrunner=$_xulver" 'desktop-file-utils' 'mime-types' 'shared-mime-info' 'libnotify')
makedepends=('unzip' 'zip' 'pkg-config' 'diffutils' 'python2' 'wireless_tools' 'autoconf2.13')
provides=('firefox')
conflicts=('firefox')
replaces=("firefox=$pkgver")
install=icecat.install
source=(http://ftp.gnu.org/gnu/gnuzilla/${pkgver}/${pkgname}-${pkgver}.tar.xz
        mozconfig
        icecat.desktop
        icecat-safe.desktop
        mozilla-firefox-1.0-lang.patch
	    xulrunner-copy-stub.patch
    	python2.7.patch
# Search engines
		arch-linux-wiki.xml
		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
# Default options
        firefox.js
        region.properties)

build() {
  cd "${srcdir}/${pkgname}-${pkgver}/"

  ICECATDIR="/usr/lib/${pkgname}-${_pkgver}" && export ICECATDIR

  msg2 "Patching some files..."
  patch -Np1 -i "${srcdir}/mozilla-firefox-1.0-lang.patch"
  patch -Np0 -i "${srcdir}/xulrunner-copy-stub.patch"
  patch -Np0 -i "${srcdir}/python2.7.patch"
  
  cp --remove-destination ${srcdir}/firefox.js ./browser/app/profile/
  cp --remove-destination ${srcdir}/region.properties ./browser/locales/en-US/chrome/browser-region/

  msg2 "Starting build..."
  cp "${srcdir}/mozconfig" .mozconfig
  unset CFLAGS
  unset CXXFLAGS

  export LDFLAGS="-Wl,-rpath,${ICECATDIR}"

  make -j1 -f client.mk build MOZ_MAKE_FLAGS="${MAKEFLAGS}" || return 1
  msg2 "Build complete"
}

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

  make -j1 DESTDIR="${pkgdir}" install

  msg2 "Finishing..."
  mv ${pkgdir}/usr/lib/${pkgname}-${pkgver} ${pkgdir}${ICECATDIR}
  cd ${pkgdir}${ICECATDIR}
  ln -s ${pkgname} firefox
  ln -s ${pkgname}-bin firefox-bin
  cd ${pkgdir}/usr/bin
  ln -sf ${ICECATDIR}/icecat icecat
  cd ${pkgdir}/usr/lib
  ln -s ${ICECATDIR} icecat

  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 || return 1
  install -m644 ${srcdir}/icecat.desktop ${pkgdir}/usr/share/applications/ || return 1
  install -m644 ${srcdir}/icecat-safe.desktop ${pkgdir}/usr/share/applications/ || return 1

  ##copy default prefs manually, icecat fails to start otherwise
  cp -rf ${srcdir}/${pkgname}-${pkgver}/dist/bin/defaults/preferences ${pkgdir}${ICECATDIR}/defaults

  msg2 "Removing proprietary and anti-privacy search engines"
  rm -f ${pkgdir}${ICECATDIR}/searchplugins/{google,answers,amazondotcom,eBay,yahoo}.xml

  msg2 "And provide better ones..."
  install -m644 ${srcdir}/*.xml ${pkgdir}${ICECATDIR}/searchplugins/

  msg2 "Installing the privacy extension"
  install -d ${pkgdir}${ICECATDIR}/extensions/privacy_features\@gnuzilla.gnu.org

  cd ${pkgdir}${ICECATDIR}/extensions/privacy_features\@gnuzilla.gnu.org
  unzip ../privacy_ext.xpi

  rm -f ../privacy_ext.xpi
}
md5sums=('1c268e5f803a3989552158932940468c'
         'df304f6eb858922a0703bac7903aecc8'
         'e81ad01dbc16ba28bf92ba4b7c309ca7'
         'd93fe402b87cd000a869e1fd6badc6c9'
         'bd5db57c23c72a02a489592644f18995'
         '5a1938673a367b20ecfa009a5eb767aa'
         'ab3dc9aecae7f08b9492fb3c00a5fd28'
         '3403175087e584a8c5e840cc62310cd9'
         '462c68585461f8cdc23c93c46f6ee4cf'
         '2d492295c4308f9bba9ece28d8b3af2d'
         '937ac0e5392b060d93bd33e761fbfa51'
         'cf97082e77e3ef5f1bd74b1db9329965'
         '24528ca3f7f1e1a0ba735231aa3ac1de'
         'c5f00b6b24222aacd5a749d1f59c4d24'
         'e1bda0854de7d764f7401c81bb82b5ef'
         'eeac4b61ea403d18efa9597921741075'
         'f1c76e7e244257856a386ca2de69bdf0')