summaryrefslogtreecommitdiff
path: root/libre/qupzilla-libre/PKGBUILD
blob: 6f7efe816ebd9a8c1906b03cdcc71a30f55c1d4c (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
# $Id: PKGBUILD 103292 2014-01-02 18:15:35Z speps $
# Maintainer: speps <speps at aur dot archlinux dot org>
# Maintainer (Parabola): André Silva <emulatorman@parabola.nu>

_pkgbase=qupzilla
pkgbase=qupzilla-libre
pkgname=(qupzilla-libre qupzilla-libre-qt5)
pkgver=1.6.0
pkgrel=1
arch=(i686 x86_64 mips64el)
url="http://www.qupzilla.com/"
license=('GPL3')
makedepends=('qtwebkit' 'qt5-webkit' 'qt5-script' 'hunspell')
optdepends=('bash-completion: bash completion support')
source=("http://repo.parabolagnulinux.org/sources/$pkgbase-$pkgver.tar.gz")
md5sums=('57f51852d14c66a030bb75febcf1eabb')
mksource=("$_pkgbase-$pkgver.tar.gz::https://github.com/QupZilla/qupzilla/archive/v$pkgver.tar.gz"
         'searchenginesmanager.cpp.sed'
         'speeddial.cpp.sed'
         'start.html.sed')
noextract=("$_pkgbase-$pkgver.tar.gz")
install="$_pkgbase.install"
mkmd5sums=('2988c3afbef2612fd4acdb78ebb1fc35'
           '1d926e97a5b287d40fb695f6516f2a06'
           '0f166fa102af975b3b8ac030d477e9b8'
           '77120a0c39ba8254e5b2c273910f029a')

mksource() {
  # extract
  mkdir -p qt{4,5}
  bsdtar --strip-components 1 -zxf $_pkgbase-$pkgver.tar.gz -C qt4
  bsdtar --strip-components 1 -zxf $_pkgbase-$pkgver.tar.gz -C qt5

  # configure
  export USE_WEBGL=true \
         QUPZILLA_PREFIX=/usr/

  # remove Google and Youtube support, replaces it to DDG HTML
  cd qt4
  sed -i -f $srcdir/searchenginesmanager.cpp.sed src/lib/opensearch/searchenginesmanager.cpp
  sed -i -f $srcdir/speeddial.cpp.sed src/lib/plugins/speeddial.cpp
  sed -i -f $srcdir/start.html.sed src/lib/data/html/start.html

  cd ../qt5
  sed -i -f $srcdir/searchenginesmanager.cpp.sed src/lib/opensearch/searchenginesmanager.cpp
  sed -i -f $srcdir/speeddial.cpp.sed src/lib/plugins/speeddial.cpp
  sed -i -f $srcdir/start.html.sed src/lib/data/html/start.html
}

build() {
  cd qt4
  qmake-qt4
  make

  cd ../qt5
  qmake
  make
}

package_qupzilla-libre() {
  pkgdesc="Cross-platform QtWebKit browser, without non-privacy search providers"
  depends=('qtwebkit' 'hunspell')
  provides=qupzilla=$pkgver
  conflicts=qupzilla
  replaces=qupzilla

  cd qt4
  make INSTALL_ROOT="$pkgdir/" install

  # zsh completion
  install -Dm644 linux/completion/_$_pkgbase \
    "$pkgdir/usr/share/zsh/site-functions/_$_pkgbase"
}

package_qupzilla-libre-qt5() {
  pkgdesc="Cross-platform QtWebKit browser (Qt5), without non-privacy search providers"
  depends=('qt5-webkit' 'qt5-script' 'hunspell' 'desktop-file-utils' 'hicolor-icon-theme')
  provides=("qupzilla-qt5=$pkgver" 'qupzilla-libre')
  conflicts=('qupzilla-qt5' 'qupzilla-libre')
  replaces=qupzilla-qt5

  cd qt5
  make INSTALL_ROOT="$pkgdir/" install

  # zsh completion
  install -Dm644 linux/completion/_$_pkgbase \
    "$pkgdir/usr/share/zsh/site-functions/_$_pkgbase"
}

# vim:set ts=2 sw=2 et: