summaryrefslogtreecommitdiff
path: root/libre/midori/PKGBUILD
blob: 5bd0ca35bea21c0ccfa890facfe6fb2e063d1085 (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
# Maintainer (Arch): Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor (Arch): Andreas Radke <andyrtr@archlinux.org>
# Contributor (Arch): rabyte <rabyte@gmail.com>
# Contributor (Arch): Johannes Krampf <wuischke@amule.org>
# Contributor (Arch): Bartłomiej Piotrowski <barthalion@gmail.com>
# Contributor (Arch): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=midori
pkgver=8.0
pkgrel=1
pkgrel+=.par1
pkgdesc='Lightweight web browser'
pkgdesc+=', without non-privacy search engines'
arch=(x86_64)
arch+=(i686 armv7h)
url='https://midori-browser.org/'
license=(LGPL)
depends=(aria2 gcr gobject-introspection-runtime libpeas libxss webkit2gtk
         zeitgeist)
makedepends=(bzr cmake git gobject-introspection intltool ninja vala)
optdepends=('gst-plugins-base: HTML5 OGG videos support'
            'gst-plugins-good: HTML5 H264 and WebM videos support'
            'gst-libav: HTML5 H264 videos support')
options=(!emptydirs)
source=("$pkgname::git+https://github.com/midori-browser/core.git#tag=v$pkgver")
md5sums=('SKIP')

prepare() {
  cd $pkgname

  # Remove non-privacy search engines
  sed -i 's|Duck Duck Go|DuckDuckGo HTML|
          s|duckduckgo[.]com|duckduckgo.com/html|
          \|Yahoo|d
          \|Google|d
         ' core/preferences.vala

  # Use DuckDuckGo HTML
  sed -i 's|duckduckgo[.]com|duckduckgo.com/html|g' core/settings.vala
}

build() {
  mkdir -p build
  cd build
  cmake "$srcdir/$pkgname" \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    -DCMAKE_C_FLAGS="$CFLAGS -fPIC -w" \
    -DVALA_CFLAGS="$CFLAGS -fPIC -w" \
    -G Ninja
  ninja
}

package() {
  DESTDIR="$pkgdir" ninja -C build install
}

# getver: -u 8 raw.githubusercontent.com/midori-browser/core/master/CMakeLists.txt
# vim:set ts=2 sw=2 et: