wok-next view QtWeb/receipt @ rev 20080

fix
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Wed Oct 25 11:39:56 2017 +0200 (2017-10-25)
parents d69dcf6fcb1c
children a31657918496
line source
1 # SliTaz package receipt.
3 PACKAGE="QtWeb"
4 COMMIT="5ba3e1c0cf22fba7bdfc97f14727843c11c9d556"
5 VERSION=${COMMIT:0:4}
6 CATEGORY="network"
7 SHORT_DESC="Customizable Qt4 WebKit browser with opera-like gestures"
8 MAINTAINER="psychomaniak@xakep.ru"
9 LICENSE="GPL2"
10 WEB_SITE="http://qtweb.googlecode.com/"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 #WGET_URL="https://github.com/magist3r/$PACKAGE/archive/fffaddce36.tar.gz"
13 WGET_URL="https://github.com/RomanChebotarev/$PACKAGE/archive/$COMMIT.tar.gz"
14 TAGS="web-browser"
16 DEPENDS="qt5 cacerts "
17 BUILD_DEPENDS="wget cacerts qmake qt5-dev qtwebkit mesa17-dev xorg-dev"
19 # Rules to configure and make the package.
20 compile_rules()
21 {
22 cd $src/src
23 sed -i 's/static/shared/' QtWeb.pro
24 sed -i 's/QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico//' QtWeb.pro
25 sed -i 's|http://www.qtweb.net/")|file:/usr/share/webhome/index.html")|g' \
26 settings.cpp browsermainwindow.cpp tabwidget.cpp
28 # sed -i 's/* 0.9;/* ;/' browsermainwindow.cpp
29 sed 's|<QPrint|<QtPrintSupport/QPrint|' -i browsermainwindow.cpp
31 # Save profile to ~./config ; ~/.local/share/data instead of /tmp:
32 sed -i 's/unins000.exe/QtWeb/' browserapplication.cpp
34 RTOOLBAR="./data/defaultbookmarks.xbel"
35 sed -i '33d' $RTOOLBAR
36 sed -i 33i\ '<bookmark href="http://root:root@tazpanel:82/pkgs.cgi?info=libQtWebkit-video">' $RTOOLBAR
37 sed -i 's/NTFS Disk Tools/WebkitVideo/' $RTOOLBAR
38 sed -i "15,29d" $RTOOLBAR
40 qmake && sed -i 's|-O2|'"$CFLAGS"'|g' Makefile && make $MAKEFLAGS
41 mkdir -p $install
42 install $src/src/$PACKAGE $install/$PACKAGE
43 rm -rf $src/src/$PACKAGE
44 }
46 # Rules to gen a SliTaz package suitable for Tazpkg.
47 genpkg_rules()
48 {
49 mkdir -p $fs/usr/bin $fs/usr/share/applications
50 cp -f $install/* $fs/usr/bin
51 cd $fs/usr/share/applications
52 cat>'QtWeb.desktop' << EOT
53 [Desktop Entry]
54 Type=Application
55 Name=QtWeb
56 Exec=/usr/bin/QtWeb
57 Icon=browser
58 Categories=Network;WebBrowser;
59 EOT
61 }
63 post_install()
64 {
65 cd "$1/tmp" ; cat>'QtWeb Internet Browser.conf' << EOT
66 [MainWindow]
67 downloadAudioVideo=true
68 style=Cleanlooks
69 home=file:/usr/share/webhome/index.html
70 ToolbarSize=80%
71 ShowTabbarWhenOneTab=true
72 [AddressBar]
73 showGoHome=true
74 showAppStyle=false
75 showPrivacyMode=false
76 showPreferences=true
77 showCompatibility=false
78 showDisableJavascript=true
79 EOT
81 for i in $(ls "$1/home" 2> /dev/null); do
82 [ -f "$1/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] && continue
83 mkdir -p "$1/home/$i/.config/QtWeb.NET"
84 cp "$1/tmp/QtWeb Internet Browser.conf" "$1/home/$i/.config/QtWeb.NET"
85 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config/QtWeb.NET"
86 done
87 }