wok view QtWeb/receipt @ rev 19626

Up libssh2 (1.8.0), sshfs-fuse (2.8)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jan 12 09:42:44 2017 +0100 (2017-01-12)
parents 9e01bc6321ea
children 04434444ef20
line source
1 # SliTaz package receipt.
3 PACKAGE="QtWeb"
4 COMMIT="c7c4a47d81"
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="libQtWebkit libQtXml cacerts xdg-utils"
17 BUILD_DEPENDS="wget cacerts qmake Qt4-dev"
18 SUGGESTED="libQtWebkit-video"
20 # Rules to configure and make the package.
21 compile_rules()
22 {
23 cd $src/src
24 sed -i 's/static/shared/' QtWeb.pro
25 sed -i 's/QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico//' QtWeb.pro
26 sed -i 's|http://www.qtweb.net/")|file:/usr/share/webhome/index.html")|g' \
27 settings.cpp browsermainwindow.cpp tabwidget.cpp
29 # sed -i 's/* 0.9;/* ;/' 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 }