# $Id: PKGBUILD 280134 2016-11-07 20:45:42Z heftig $ # Maintainer (Arch): Jan de Groot # Maintainer: André Silva # Contributor: Márcio Silva pkgname=epiphany pkgver=3.22.2 pkgrel=1.parabola1 pkgdesc="A GNOME web browser based on the WebKit rendering engine, with DuckDuckGo HTML support" url="https://wiki.gnome.org/Apps/Web" arch=(i686 x86_64 armv7h) license=(GPL) depends=(webkit2gtk gcr gnome-desktop) makedepends=(intltool itstool docbook-xml startup-notification gobject-introspection yelp-tools autoconf-archive appstream-glib git) groups=(gnome) replaces=(${pkgname}-libre) conflicts=(${pkgname}-libre) _commit=061956662d43c8f2e966228f2379e04004e86dd9 # tags/3.22.2^0 source=("git://git.gnome.org/epiphany#commit=$_commit" "git://git.gnome.org/libgd" pluginsdir.diff) sha256sums=('SKIP' 'SKIP' '42a7b820fd659fee8508a9b9a57e385c658b3b312c7a8f9456078223e4d78f22') pkgver() { cd $pkgname git describe --tags | sed 's/-/+/g' } prepare() { cd $pkgname patch -Np1 -i ../pluginsdir.diff git submodule init git config --local submodule.libgd.url "$srcdir/libgd" git submodule update NOCONFIGURE=1 ./autogen.sh # 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 ./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 make DESTDIR="$pkgdir" install }