wok-next view QtWeb/receipt @ rev 20730
glib: up (2.56.1) with static libs and Python2
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Tue May 29 15:17:41 2018 +0300 (2018-05-29) |
parents | c0521c689857 |
children | d5aab818505e |
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="qmake qt5-dev qtwebkit mesa-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 savepdf.cpp
31 export CXXFLAGS="$CXXFLAGS -std=gnu++98"
33 # Save profile to ~./config ; ~/.local/share/data instead of /tmp:
34 sed -i 's/unins000.exe/QtWeb/' browserapplication.cpp
36 RTOOLBAR="./data/defaultbookmarks.xbel"
37 sed -i '33d' $RTOOLBAR
38 sed -i 33i\ '<bookmark href="http://tazpanel:82/">' $RTOOLBAR
39 sed -i 's/NTFS Disk Tools/WebkitVideo/' $RTOOLBAR
40 sed -i "15,29d" $RTOOLBAR
42 qmake && sed -i 's|-O2|'"$CFLAGS"'|g' Makefile && make $MAKEFLAGS
43 mkdir -p $install
44 install $src/src/$PACKAGE $install/$PACKAGE
45 rm -rf $src/src/$PACKAGE
46 }
48 # Rules to gen a SliTaz package suitable for Tazpkg.
49 genpkg_rules()
50 {
51 mkdir -p $fs/usr/bin $fs/usr/share/applications
52 cp -f $install/* $fs/usr/bin
53 cd $fs/usr/share/applications
54 cat>'QtWeb.desktop' << EOT
55 [Desktop Entry]
56 Type=Application
57 Name=QtWeb
58 Exec=/usr/bin/QtWeb
59 Icon=browser
60 Categories=Network;WebBrowser;
61 EOT
63 }
65 post_install()
66 {
67 cd "$1/tmp" ; cat>'QtWeb Internet Browser.conf' << EOT
68 [MainWindow]
69 downloadAudioVideo=true
70 style=Cleanlooks
71 home=file:/usr/share/webhome/index.html
72 ToolbarSize=80%
73 ShowTabbarWhenOneTab=true
74 [AddressBar]
75 showGoHome=true
76 showAppStyle=false
77 showPrivacyMode=false
78 showPreferences=true
79 showCompatibility=false
80 showDisableJavascript=true
81 EOT
83 for i in $(ls "$1/home" 2> /dev/null); do
84 [ -f "$1/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] && continue
85 mkdir -p "$1/home/$i/.config/QtWeb.NET"
86 cp "$1/tmp/QtWeb Internet Browser.conf" "$1/home/$i/.config/QtWeb.NET"
87 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config/QtWeb.NET"
88 done
89 }