summaryrefslogtreecommitdiff
path: root/libre/epiphany/PKGBUILD
blob: f30a5634f08ad8c367d3d0aae879a534caca8272 (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
# $Id: PKGBUILD 225938 2014-11-10 23:06:59Z heftig $
# Maintainer (Arch): Jan de Groot <jgc@archlinux.org>
# Maintainer: André Silva <emulatorman@parabola.nu>
# Contributor: Márcio Silva <coadde@parabola.nu>

pkgname=epiphany
pkgver=3.14.2
pkgrel=1.parabola1
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' 'webkit2gtk' 'nss' 'iso-codes' 'dconf' 'desktop-file-utils' 'gcr' 'gnome-desktop' 'libwnck3' 'gnome-themes-standard')
makedepends=('intltool' 'itstool' 'docbook-xml' 'startup-notification' 'gobject-introspection' 'python2')
replaces=(${pkgname}-libre)
conflicts=(${pkgname}-libre)
options=('!emptydirs')
groups=('gnome')
url="https://wiki.gnome.org/Apps/Web"
source=(http://ftp.gnome.org/pub/GNOME/sources/$pkgname/${pkgver:0:4}/$pkgname-$pkgver.tar.xz)
sha256sums=('cc69403b3b7addf30dd6eb703265a77102b8ab3c6194678ad0d2433f251492d0')

prepare() {
  cd $pkgname-$pkgver

  # Replace DuckDuckGo to DuckDuckGo HTML
  sed -i 's|duckduckgo[.]com|duckduckgo.com/html|g' $(grep -rlI 'duckduckgo[.]com')

  # Replace Google support to DuckDuckGo HTML
  sed -i 's|http://www[.]google[.]com/search?q=%s[&]ie=UTF-8[&]oe=UTF-8|https://duckduckgo.com/html/?q=search|g' $(grep -rlI 'http://www[.]google[.]com/search?q=%s&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 --libexecdir=/usr/lib/$pkgname

  # 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
}