wok view QtWeb/receipt @ rev 25740
Fix vlc build, 3.x required Qt5
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Sun Aug 25 19:45:07 2024 +0200 (3 months ago) |
parents | 04434444ef20 |
children |
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="https://github.com/RomanChebotarev/QtWeb"
11 TARBALL="$PACKAGE-$VERSION.tar.gz"
12 WGET_URL="$WEB_SITE/archive/$COMMIT.tar.gz"
13 TAGS="web-browser"
15 DEPENDS="libQtWebkit libQtXml cacerts xdg-utils"
16 BUILD_DEPENDS="wget cacerts qmake Qt4-dev"
17 SUGGESTED="libQtWebkit-video"
19 # What is the latest version available today?
20 current_version()
21 {
22 wget -O - $WEB_SITE/tags 2>/dev/null | \
23 sed '/archive.*tar/!d;s|.*/[A-Za-z_-]*\(.*\).tar.*|\1|;q'
24 }
26 # Rules to configure and make the package.
27 compile_rules()
28 {
29 cd $src/src
30 sed -i 's/static/shared/' QtWeb.pro
31 sed -i 's/QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico//' QtWeb.pro
32 sed -i 's|http://www.qtweb.net/")|file:/usr/share/webhome/index.html")|g' \
33 settings.cpp browsermainwindow.cpp tabwidget.cpp
35 # sed -i 's/* 0.9;/* ;/' browsermainwindow.cpp
37 # Save profile to ~./config ; ~/.local/share/data instead of /tmp:
38 sed -i 's/unins000.exe/QtWeb/' browserapplication.cpp
40 RTOOLBAR="./data/defaultbookmarks.xbel"
41 sed -i '33d' $RTOOLBAR
42 sed -i 33i\ '<bookmark href="http://root:root@tazpanel:82/pkgs.cgi?info=libQtWebkit-video">' $RTOOLBAR
43 sed -i 's/NTFS Disk Tools/WebkitVideo/' $RTOOLBAR
44 sed -i "15,29d" $RTOOLBAR
46 qmake && sed -i 's|-O2|'"$CFLAGS"'|g' Makefile && make $MAKEFLAGS
47 mkdir -p $install
48 install $src/src/$PACKAGE $install/$PACKAGE
49 rm -rf $src/src/$PACKAGE
50 }
52 # Rules to gen a SliTaz package suitable for Tazpkg.
53 genpkg_rules()
54 {
55 mkdir -p $fs/usr/bin $fs/usr/share/applications
56 cp -f $install/* $fs/usr/bin
57 cd $fs/usr/share/applications
58 cat>'QtWeb.desktop' << EOT
59 [Desktop Entry]
60 Type=Application
61 Name=QtWeb
62 Exec=/usr/bin/QtWeb
63 Icon=browser
64 Categories=Network;WebBrowser;
65 EOT
67 }
69 post_install()
70 {
71 cd "$1/tmp" ; cat>'QtWeb Internet Browser.conf' << EOT
72 [MainWindow]
73 downloadAudioVideo=true
74 style=Cleanlooks
75 home=file:/usr/share/webhome/index.html
76 ToolbarSize=80%
77 ShowTabbarWhenOneTab=true
78 [AddressBar]
79 showGoHome=true
80 showAppStyle=false
81 showPrivacyMode=false
82 showPreferences=true
83 showCompatibility=false
84 showDisableJavascript=true
85 EOT
87 for i in $(ls "$1/home" 2> /dev/null); do
88 [ -f "$1/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] && continue
89 mkdir -p "$1/home/$i/.config/QtWeb.NET"
90 cp "$1/tmp/QtWeb Internet Browser.conf" "$1/home/$i/.config/QtWeb.NET"
91 chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config/QtWeb.NET"
92 done
93 }