summaryrefslogtreecommitdiff
path: root/libre/qupzilla-libre
diff options
context:
space:
mode:
authorNicolás Reynolds <fauno@endefensadelsl.org>2014-02-18 01:56:34 +0000
committerNicolás Reynolds <fauno@endefensadelsl.org>2014-02-18 01:56:34 +0000
commit8185891e28635bdb83fdf4ba4391030912dae596 (patch)
tree66a946535bdd228514750233b2cc99dd1866ff64 /libre/qupzilla-libre
parent60a11f87366fdfbd114cdc91ff813518858e5f8d (diff)
Tue Feb 18 01:56:27 UTC 2014
Diffstat (limited to 'libre/qupzilla-libre')
-rw-r--r--libre/qupzilla-libre/PKGBUILD88
-rw-r--r--libre/qupzilla-libre/qupzilla.install12
-rw-r--r--libre/qupzilla-libre/searchenginesmanager.cpp.sed19
-rw-r--r--libre/qupzilla-libre/speeddial.cpp.sed4
-rw-r--r--libre/qupzilla-libre/start.html.sed1
5 files changed, 124 insertions, 0 deletions
diff --git a/libre/qupzilla-libre/PKGBUILD b/libre/qupzilla-libre/PKGBUILD
new file mode 100644
index 000000000..3d23a89f8
--- /dev/null
+++ b/libre/qupzilla-libre/PKGBUILD
@@ -0,0 +1,88 @@
+# $Id: PKGBUILD 104845 2014-01-27 14:16:51Z 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.1
+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=("$_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"
+md5sums=('ca6fee487c9871d37d2dd09b3617b88f'
+ '1d926e97a5b287d40fb695f6516f2a06'
+ '0f166fa102af975b3b8ac030d477e9b8'
+ '77120a0c39ba8254e5b2c273910f029a')
+
+prepare() {
+ # 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-libre' "qupzilla-qt5=$pkgver")
+ conflicts=('qupzilla-libre' 'qupzilla-qt5')
+ 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:
diff --git a/libre/qupzilla-libre/qupzilla.install b/libre/qupzilla-libre/qupzilla.install
new file mode 100644
index 000000000..029294d67
--- /dev/null
+++ b/libre/qupzilla-libre/qupzilla.install
@@ -0,0 +1,12 @@
+post_install() {
+ xdg-icon-resource forceupdate --theme hicolor 2> /dev/null
+ update-desktop-database -q
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
diff --git a/libre/qupzilla-libre/searchenginesmanager.cpp.sed b/libre/qupzilla-libre/searchenginesmanager.cpp.sed
new file mode 100644
index 000000000..76011d058
--- /dev/null
+++ b/libre/qupzilla-libre/searchenginesmanager.cpp.sed
@@ -0,0 +1,19 @@
+s|DuckDuckGo|DuckDuckGo HTML|
+\|m_startingEngineName = settings[.]value("activeEngine", "Google")[.]toString();| s|Google|DuckDuckGo HTML|
+\|m_defaultEngineName = settings[.]value("DefaultEngine", "Google")[.]toString();| s|Google|DuckDuckGo HTML|
+\|Engine google;|d
+\|google[.]name = "Google";|d
+\|google[.]icon = QIcon(":icons/sites/google[.]png");|d
+\|google[.]url = "http://www[.]google[.]com/search?client=qupzilla[&]q=%s";|d
+\|google[.]shortcut = "g";|d
+\|google[.]suggestionsUrl = "http://suggestqueries[.]google[.]com/complete/search?output=firefox[&]q=%s";|d
+\|Engine yt;|d
+\|yt[.]name = "YouTube";|d
+\|yt[.]icon = QIcon(":/icons/sites/youtube.png");|d
+\|yt[.]url = "http://www[.]youtube[.]com/results?search_query=%s[&]search=Search";|d
+\|yt[.]shortcut = "yt";|d
+\|yt[.]suggestionsUrl = "http://suggestqueries[.]google[.]com/complete/search?ds=yt[&]output=firefox[&]q=%s";|d
+\|https://duckduckgo[.]com/?q=%s[&]t=qupzilla| s|duckduckgo[.]com|duckduckgo.com/html|
+\|addEngine(google);|d
+\|addEngine(yt);|d
+\|m_defaultEngine = google;| s|google|duck|
diff --git a/libre/qupzilla-libre/speeddial.cpp.sed b/libre/qupzilla-libre/speeddial.cpp.sed
new file mode 100644
index 000000000..b8f591e87
--- /dev/null
+++ b/libre/qupzilla-libre/speeddial.cpp.sed
@@ -0,0 +1,4 @@
+s|www[.]google[.]com|duckduckgo.com/html|
+s|Google|DuckDuckGo HTML|
+\#"url:[\]"https://github[.]com/QupZilla/qupzilla[\]"|title:[\]"QupZilla GitHub[\]";"# s#$#;#
+\#"url:[\]"https://duckduckgo[.]com[\]"|title:[\]"DuckDuckGo[\]";";#d
diff --git a/libre/qupzilla-libre/start.html.sed b/libre/qupzilla-libre/start.html.sed
new file mode 100644
index 000000000..f59a65979
--- /dev/null
+++ b/libre/qupzilla-libre/start.html.sed
@@ -0,0 +1 @@
+\|<form action="https://duckduckgo[.]com/" method="GET">| s|duckduckgo[.]com|duckduckgo.com/html|