desktop/falkon/PKGBUILD
2019-01-05 00:01:50 +01:00

65 lines
2.2 KiB
Bash

pkgname='falkon'
pkgver=3.0.1
pkgrel=4
pkgdesc="Cross-platform QtWebEngine browser"
url="https://github.com/KDE/falkon"
arch=('x86_64')
license=('GPL3')
depends=('qt5-webengine' 'qt5-x11extras' 'qt5-svg')
makedepends=('qt5-tools' 'kwallet' 'extra-cmake-modules' 'lcms2')
optdepends=('bash-completion: bash completion support'
'kwallet: kf5 kwallet integration')
conflicts=('qupzilla')
replaces=('qupzilla')
categories=('network')
source=("http://download.kde.org/stable/$pkgname/$pkgver/$pkgname-$pkgver.tar.xz"
'0001-branded-speeddial.patch'
'start-white.png')
sha1sums=('1c3b75b8c156b4f28ebb3c30e60e72c57233d47c'
'0045ac3a37a6a16347acf82046b63cd772bbd377'
'6ec67993bda3054d4210cc08177b124f873774e3')
prepare() {
msg 'Applying browserUI patch...'
cd $pkgname-$pkgver/src/lib/app/
sed -e 's|"falkon:start"|"https://www.chakralinux.org/?welcome"|' \
-e 's|"showStatusBar", true|"showStatusBar", false|' \
-e 's|"showMenubar", true|"showMenubar", false|g' -i browserwindow.cpp
cd $srcdir/$pkgname-$pkgver/src/lib/plugins/
sed -e 's|"background", QString()|"file:///usr/share/pixmaps/start-white.png", QString()|' \
-e 's|"backsize", "auto"|"backsize", "contain"|' -i speeddial.cpp
cd $srcdir/$pkgname-$pkgver
# patch -Np1 -i ../0001-branded-speeddial.patch
msg 'Applying preference patch'
cd src/lib/preferences/
sed -e 's|"homepage", QUrl(QSL("falkon:start"))|"homepage", QUrl(QSL("https://www.chakralinux.org/?welcome"))|' \
-e 's|"showStatusBar", true|"showStatusBar", false|g' -i preferences.cpp
msg 'Applying search engine patch...'
cd ../opensearch/
sed 's,\?q=\%s\&t=qupzilla,\?q=\%s\&t=chakra,g' -i searchenginesmanager.cpp
}
build() {
export USE_WEBGL="true"
export ENABLE_OPACITY_EFFECT="true"
cd $pkgname-$pkgver
cmake \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release
make
}
package() {
cd $pkgname-$pkgver
make DESTDIR=$pkgdir install
install -Dm 644 ../start-white.png $pkgdir/usr/share/pixmaps/start-white.png
# zsh completion
install -Dm644 linux/completion/_$pkgname \
$pkgdir/usr/share/zsh/site-functions/_$pkgname
}