# Maintainer: Mattias Andrée <`base64 -d`(bWFhbmRyZWUK)@member.fsf.org> pkgname=dooble pkgver=1.47 pkgrel=4 pkgdesc='A safe WebKit Web browser' url='http://dooble.sourceforge.net/' arch=('i686' 'x86_64') license=('custom:3-clause BSD') depends=('libpng' 'qt5-base' 'qt5-webkit' 'openssl' 'libspoton=0.09.04-1' "dooble-common=${pkgver}") makedepends=('libpng' 'qt5-base' 'qt5-webkit' 'openssl' 'qt5-tools' 'sed' 'coreutils') source=("http://downloads.sourceforge.net/project/dooble/Version%20${pkgver}/Dooble.d.tar.gz") sha256sums=('1840074b5648bd3755f7cefa65388e562c8d7159c119240e5c5efe0f7e1316b8') options=('!emptydirs') # Dependency (from ldd output) tree: # libpng # qt5-base # icu # gcc-libs # libjpeg-turbo # sqlite # mesa-libgl # mesa # libdrm # libxdamage # libxxf86vm # libxrender # qt5-webkit # libxcomposite # libxfixes # libx11 # libxcb # libxdmcp & libxau # glibc # libxext # libxslt # libgcrypt # libgpg-error # libxml2 # xz # zlib # qt5-sensors & qt5-location # qt5-declarative # gstreamer0.10-base # gstreamer0.10 # glib2 # libffi # pcre # orc # openssl build() { cd "$srcdir/dooble.d/trunk/browser/" sed -i 's_-Werror__g' dooble.qt5.pro qmake-qt5 -o Makefile dooble.qt5.pro make distclean qmake-qt5 -o Makefile dooble.qt5.pro sed -i '/^INCPATH/s:=:= -I/usr/include/qt/QtWidgets:' Makefile sed -i '/^INCPATH/s:=:= -I/usr/include/qt/QtWebKitWidgets:' Makefile sed -i '/#include/s:QtGui/\([^>]*\)QAction:\1:' Include/*.h make } package() { cd "$srcdir/dooble.d/trunk/browser/" make INSTALL_ROOT="$pkgdir" install msg "Fixing file structure" mkdir -- "${pkgdir}/opt" mv -- "${pkgdir}/usr/local/dooble" "${pkgdir}/opt/${pkgname}" mv -- "${pkgdir}/usr/share/"* "${pkgdir}/opt/${pkgname}" msg "Editing files for the file structure modification" sed -i s_"/usr/local/dooble"_"/opt/${pkgname}"_g \ -- "${pkgdir}/opt/${pkgname}/dooble.sh" \ "${pkgdir}/opt/${pkgname}/applications/dooble.desktop" sed -i /LD_LIBRARY_PATH/d \ -- "${pkgdir}/opt/${pkgname}/dooble.sh" sed -i s_'/usr/local/dooble/Lib\x00'_'/usr/lib\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'_g \ -- "${pkgdir}/opt/${pkgname}/Dooble" # The replacements's length must match the pattern's length sed -i s_'\.sh$'__g \ -- "${pkgdir}/opt/${pkgname}/applications/dooble.desktop" msg "Renaming files" mv -- "${pkgdir}/opt/${pkgname}/dooble.sh" \ "${pkgdir}/opt/${pkgname}/dooble" if [ ! "${pkgname}" = "dooble" ]; then mv -- "${pkgdir}/opt/${pkgname}/applications/dooble.desktop" \ " ${pkgdir}/opt/${pkgname}/applications/${pkgname}.desktop" fi msg "Remove files an replace with those provided by dooble-common" for d in Icons Images Plugins Tab; do rm -rf -- "${pkgdir}/opt/${pkgname}/${d}" ln -sf "../../usr/share/dooble/${d}" -- "${pkgdir}/opt/${pkgname}/${d}" done rm -r -- "${pkgdir}/opt/${pkgname}/icons" rm -r -- "${pkgdir}/usr/local/include" rmdir -- "${pkgdir}/usr/local/" rmdir -- "${pkgdir}/usr/share/" rmdir -- "${pkgdir}/usr/" }