summaryrefslogtreecommitdiff
path: root/libre/epiphany-libre/PKGBUILD
blob: c9f94d446818ba6b35d0eaa6f67d41df56465f0b (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
# $Id: PKGBUILD 195129 2013-09-25 11:58:35Z jgc $
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Maintainer (Parabola): André Silva <emulatorman@lavabit.com>
# Contributor (Parabola): Márcio Silva <coadde@lavabit.com>

_pkgname=epiphany
pkgname=epiphany-libre
pkgver=3.10.0
pkgrel=2
install=epiphany.install
pkgdesc="A GNOME web browser based on the WebKit rendering engine, with DuckDuckGo HTML support"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL')
depends=('libsoup' 'libnotify' 'gsettings-desktop-schemas' 'webkitgtk' 'nss' 'iso-codes' 'dconf' 'desktop-file-utils' 'gnome-icon-theme-symbolic' 'gcr' 'gnome-desktop' 'libwnck3' 'gnome-themes-standard')
makedepends=('intltool' 'itstool' 'docbook-xml' 'startup-notification' 'gobject-introspection')
replaces=$_pkgname
conflicts=$_pkgname
provides=$_pkgname=$pkgver
options=('!libtool' '!emptydirs')
groups=('gnome')
url="http://www.gnome.org/projects/epiphany/"
source=(http://ftp.gnome.org/pub/GNOME/sources/$_pkgname/${pkgver:0:4}/$_pkgname-$pkgver.tar.xz)
sha256sums=('7bd2c3b21464a83909d75befe2f9501c1ab2f00e2371f26023f79818faec351e')

prepare() {
  cd $_pkgname-$pkgver

  # Replace Google support to DuckDuckGo HTML
  sed -i 's|http://www[.]google[.]com/search?q=search[&]ie=UTF-8[&]oe=UTF-8|https://duckduckgo.com/html/?q=search|g' $(grep -rlI 'http://www[.]google[.]com/search?q=search&ie=UTF-8&oe=UTF-8')
  sed -i 's|http://www[.]google[.]com/search?q=lala%2Elala[&]ie=UTF-8[&]oe=UTF-8|https://duckduckgo.com/html/?q=lala.lala|g' $(grep -rlI 'http://www[.]google[.]com/search?q=lala%2Elala&ie=UTF-8&oe=UTF-8')
  sed -i 's|http://www[.]google[.]com/search?q=totalgarbage0xdeadbeef[&]ie=UTF-8[&]oe=UTF-8|https://duckduckgo.com/html/?q=totalgarbage0xdeadbeef|g' $(grep -rlI 'http://www[.]google[.]com/search?q=totalgarbage0xdeadbeef&ie=UTF-8&oe=UTF-8')
  sed -i 's|http://www[.]google[.]com/search?q=search+separated+words+please[&]ie=UTF-8[&]oe=UTF-8|https://duckduckgo.com/html/?q=search+separated+words+please|g' $(grep -rlI 'http://www[.]google[.]com/search?q=search+separated+words+please&ie=UTF-8&oe=UTF-8')
  sed -i '\|a quoted string should be searched|d' $(grep -rlI 'a quoted string should be searched')
  sed -i 's|http://www[.]google[.]com/search?q=%s[&]amp;ie=UTF-8[&]amp;oe=UTF-8|https://duckduckgo.com/html/?q=%s|g' $(grep -rlI 'http://www[.]google[.]com/search')
  sed -i 's|http://www[.]google[.]com|https://duckduckgo.com/html|g' $(grep -rlI 'google[.]com')
  sed -i 's|http://google[.]com|https://duckduckgo.com/html|g' $(grep -rlI 'google[.]com')
  sed -i 's|mail[.]google[.]com|mail.com|g' $(grep -rlI 'mail[.]google[.]com')
  sed -i 's|google[.]com|duckduckgo.com/html|g' $(grep -rlI 'google[.]com')
}

build() {
  cd $_pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc \
      --localstatedir=/var

  # https://bugzilla.gnome.org/show_bug.cgi?id=655517
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool

  make
}

package() {
  cd $_pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}