desktop/qupzilla/PKGBUILD

120 lines
3.6 KiB
Bash
Raw Normal View History

2014-01-02 08:53:44 +08:00
# Contributor: Anke Boersma <abveritas@chakra-project.org>
# Maintainer: Bruce Liu <brli@users.sourceforge.net>
# Note: this is a messive splittion PKGBUILD, we want it simpler as soon as we migrate to kf5
2014-10-10 19:00:44 +08:00
2014-05-13 09:12:01 +08:00
_pkgname=QupZilla
pkgbase=qupzilla
pkgname=('qupzilla-qt5' 'qupzilla' 'qupzilla-common')
2015-01-27 17:30:16 +08:00
pkgver=1.8.6
2015-01-29 23:52:51 +08:00
pkgrel=3
2011-10-18 04:35:31 +08:00
pkgdesc="A very fast open source browser based on WebKit core"
2012-02-02 10:07:43 +08:00
url="http://www.qupzilla.com"
arch=('x86_64')
2011-10-18 04:35:31 +08:00
license=('GPL3')
makedepends=('qt5-tools' 'qt5-webkit' 'qt5-script' 'kwallet' 'kdelibs' 'qt')
2013-09-02 15:44:49 +08:00
optdepends=('bash-completion: bash completion support')
2012-04-25 01:04:25 +08:00
categories=('network')
screenshot='http://www.qupzilla.com/screens/kde.png'
2014-05-13 09:12:01 +08:00
source=("https://github.com/QupZilla/qupzilla/releases/download/v${pkgver}/${_pkgname}-${pkgver}.tar.xz"
2014-12-15 20:06:22 +08:00
'browserui.patch'
'preference.patch'
'searchmanager.patch'
'start-white.png'
'qupzilla-qt5.desktop') # only for now
2015-01-27 17:30:16 +08:00
sha1sums=('e1164dd6afb1ee121c2d53acc95b1c7b7d51603e'
2014-12-15 20:06:22 +08:00
'c3d9f661c3243764afc24c661678ad96d5c423f9'
'ac27b9415e74f2b6771b9011b7e415f8086abf5a'
'86ead03eb48b2eca44125755ff55f76eedde3b10'
'6ec67993bda3054d4210cc08177b124f873774e3'
'995413e503c4cd3b49edc711200174f09c5e649e')
2011-10-18 04:35:31 +08:00
2013-09-02 15:44:49 +08:00
prepare() {
2014-09-28 09:34:59 +08:00
cd ${srcdir}/${_pkgname}-${pkgver}
2014-12-15 20:06:22 +08:00
msg 'Applying browserUI patch...'
patch -Np1 -i ${srcdir}/browserui.patch
msg 'Applying preference patch'
patch -Np1 -i ${srcdir}/preference.patch
msg 'Applying search engine patch...'
patch -Np1 -i ${srcdir}/searchmanager.patch
# split
mkdir ${srcdir}/qt{4,5}
cp -rv ${srcdir}/${_pkgname}-${pkgver}/* ${srcdir}/qt4
cp -rv ${srcdir}/${_pkgname}-${pkgver}/* ${srcdir}/qt5
}
2013-09-02 15:44:49 +08:00
build_qupzilla() {
2013-09-02 15:44:49 +08:00
export USE_WEBGL="true"
2014-01-07 23:04:11 +08:00
export KDE_INTEGRATION="true"
2014-12-15 20:06:22 +08:00
export ENABLE_OPACITY_EFFECT="true"
2013-09-02 15:44:49 +08:00
cd "${srcdir}/qt4"
qmake
make
}
build_qupzilla-qt5() {
export USE_WEBGL="true"
export KDE_INTEGRATION="true"
cd "${srcdir}/qt5"
2015-01-27 17:30:16 +08:00
/usr/lib/qt5/bin/qmake
export USE_LIBPATH="/usr/lib/qupzilla-qt5"
export USE_DATADIR="/usr/share/qupzilla-qt5"
2013-09-02 15:44:49 +08:00
make
2011-10-18 04:35:31 +08:00
}
build() {
build_qupzilla
build_qupzilla-qt5
}
package_qupzilla-common() {
pkgdesc+=('(Common files)')
depends=('desktop-file-utils' 'hicolor-icon-theme')
install=${pkgbase}.install
cd "${srcdir}/qt4"
2013-09-02 15:44:49 +08:00
make INSTALL_ROOT="${pkgdir}" install
2014-10-01 22:34:57 +08:00
install -Dm 644 "${srcdir}/start-white.png" "${pkgdir}/usr/share/pixmaps/start-white.png"
2013-09-02 15:44:49 +08:00
2014-01-02 08:53:44 +08:00
# shell completion
install -Dm644 linux/completion/_${pkgbase} "${pkgdir}/usr/share/zsh/site-functions/_${pkgbase}"
install -Dm644 linux/completion/${pkgbase} "${pkgdir}/usr/share/bash-completion/completions/${pkgbase}"
# remove libs and bins
2015-01-29 23:52:51 +08:00
rm -rfv ${pkgdir}/usr/{bin,lib,share/applications}
}
package_qupzilla() {
pkgdesc+=('(Qt4 build)')
depends=('qt' 'qtwebkit-plugins' 'qtwebkit' 'qupzilla-common')
optdepends=('kdelibs: kwallet integration')
cd "${srcdir}/qt4"
make INSTALL_ROOT="${pkgdir}" install
# remove common files
rm -rfv "${pkgdir}/usr/share"
# install back .desktop files
install -Dm644 "${srcdir}/qt4/linux/applications/qupzilla.desktop" "${pkgdir}/usr/share/applications/qupzilla.desktop"
}
package_qupzilla-qt5() {
pkgdesc+=('(Qt5 build)')
depends=('qt5-webkit' 'qt5-script' 'qupzilla-common')
optdepends=('kwallet: kf5 kwallet integration')
cd "${srcdir}/qt5"
make INSTALL_ROOT="${pkgdir}" install
# seperate the binary
mv -v "${pkgdir}/usr/bin/qupzilla" "${pkgdir}/usr/bin/qupzilla-qt5"
# remove common files
rm -rfv "${pkgdir}/usr/share"
# install qupzilla-qt5.desktop
install -Dm644 "${srcdir}/qupzilla-qt5.desktop" "${pkgdir}/usr/share/applications/qupzilla-qt5.desktop"
2015-01-29 23:52:51 +08:00
}