wok-next diff QtWeb/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents d43bf7aae921
children
line diff
     1.1 --- a/QtWeb/receipt	Wed Mar 21 15:58:17 2018 +0200
     1.2 +++ b/QtWeb/receipt	Fri Nov 02 14:15:08 2018 +0200
     1.3 @@ -2,88 +2,68 @@
     1.4  
     1.5  PACKAGE="QtWeb"
     1.6  COMMIT="5ba3e1c0cf22fba7bdfc97f14727843c11c9d556"
     1.7 -VERSION=${COMMIT:0:4}
     1.8 +VERSION=${COMMIT:0:4}	# FIXME
     1.9  CATEGORY="network"
    1.10  SHORT_DESC="Customizable Qt4 WebKit browser with opera-like gestures"
    1.11  MAINTAINER="psychomaniak@xakep.ru"
    1.12  LICENSE="GPL2"
    1.13  WEB_SITE="http://qtweb.googlecode.com/"
    1.14 +
    1.15  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.16  #WGET_URL="https://github.com/magist3r/$PACKAGE/archive/fffaddce36.tar.gz"
    1.17  WGET_URL="https://github.com/RomanChebotarev/$PACKAGE/archive/$COMMIT.tar.gz"
    1.18 -TAGS="web-browser"
    1.19  
    1.20 -DEPENDS="qt5 cacerts"
    1.21  BUILD_DEPENDS="qmake qt5-dev qtwebkit mesa-dev xorg-dev"
    1.22  
    1.23 -# Rules to configure and make the package.
    1.24 -compile_rules()
    1.25 -{
    1.26 +compile_rules() {
    1.27  	cd $src/src
    1.28  	sed -i 's/static/shared/' QtWeb.pro
    1.29  	sed -i 's/QTPLUGIN += qcncodecs qjpcodecs qkrcodecs qtwcodecs qico//' QtWeb.pro
    1.30  	sed -i 's|http://www.qtweb.net/")|file:/usr/share/webhome/index.html")|g' \
    1.31  	settings.cpp browsermainwindow.cpp tabwidget.cpp
    1.32 -	
    1.33 -	# sed -i 's/* 0.9;/* ;/' browsermainwindow.cpp
    1.34 +
    1.35 +	# sed -i 's|* 0.9;|* ;|' browsermainwindow.cpp
    1.36  	sed 's|<QPrint|<QtPrintSupport/QPrint|' -i browsermainwindow.cpp savepdf.cpp
    1.37  
    1.38  	export CXXFLAGS="$CXXFLAGS -std=gnu++98"
    1.39  
    1.40 -	# Save profile to ~./config ; ~/.local/share/data instead of /tmp:
    1.41 +	# Save profile to ~./config; ~/.local/share/data instead of /tmp:
    1.42  	sed -i 's/unins000.exe/QtWeb/' browserapplication.cpp
    1.43 -	
    1.44 +
    1.45  	RTOOLBAR="./data/defaultbookmarks.xbel"
    1.46  	sed -i '33d' $RTOOLBAR
    1.47  	sed -i 33i\ '<bookmark href="http://tazpanel:82/">' $RTOOLBAR
    1.48  	sed -i 's/NTFS Disk Tools/WebkitVideo/' $RTOOLBAR
    1.49  	sed -i "15,29d" $RTOOLBAR
    1.50 -	
    1.51 -	qmake && sed -i 's|-O2|'"$CFLAGS"'|g' Makefile && make $MAKEFLAGS
    1.52 +
    1.53 +	qmake &&
    1.54 +	sed -i 's|-O2|'"$CFLAGS"'|g' Makefile &&
    1.55 +	make $MAKEFLAGS || return 1
    1.56 +
    1.57  	mkdir -p $install
    1.58  	install $src/src/$PACKAGE $install/$PACKAGE
    1.59  	rm -rf  $src/src/$PACKAGE
    1.60  }
    1.61  
    1.62 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.63 -genpkg_rules()
    1.64 -{
    1.65 -	mkdir -p $fs/usr/bin $fs/usr/share/applications
    1.66 +genpkg_rules() {
    1.67 +	mkdir -p $fs/usr/bin
    1.68  	cp -f $install/* $fs/usr/bin
    1.69 -	cd $fs/usr/share/applications
    1.70 -	cat>'QtWeb.desktop' << EOT
    1.71 -[Desktop Entry]
    1.72 -Type=Application
    1.73 -Name=QtWeb
    1.74 -Exec=/usr/bin/QtWeb
    1.75 -Icon=browser
    1.76 -Categories=Network;WebBrowser;
    1.77 -EOT
    1.78 -
    1.79 +	install -Dm644 $stuff/qtweb.desktop $fs/usr/share/applications/QtWeb.desktop
    1.80 +	install -Dm644 $stuff/QtWeb\ Internet\ Browser.conf \
    1.81 +		$fs/etc/skel/.config/QtWeb.NET/QtWeb\ Internet\ Browser.conf
    1.82 +	DEPENDS="qt5 cacerts"
    1.83 +	TAGS="web-browser"
    1.84  }
    1.85  
    1.86 -post_install()
    1.87 -{
    1.88 -	cd "$1/tmp" ; cat>'QtWeb Internet Browser.conf' << EOT
    1.89 -[MainWindow]
    1.90 -downloadAudioVideo=true
    1.91 -style=Cleanlooks
    1.92 -home=file:/usr/share/webhome/index.html
    1.93 -ToolbarSize=80%
    1.94 -ShowTabbarWhenOneTab=true
    1.95 -[AddressBar]
    1.96 -showGoHome=true
    1.97 -showAppStyle=false
    1.98 -showPrivacyMode=false
    1.99 -showPreferences=true
   1.100 -showCompatibility=false
   1.101 -showDisableJavascript=true
   1.102 -EOT
   1.103 +post_install() {
   1.104 +	for i in $(ls "$1/home" 2>/dev/null); do
   1.105 +		[ -f "$1/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] &&
   1.106 +			continue
   1.107  
   1.108 -	for i in $(ls "$1/home" 2> /dev/null); do
   1.109 -		[ -f "$1/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] && continue
   1.110  		mkdir -p "$1/home/$i/.config/QtWeb.NET"
   1.111 -		cp "$1/tmp/QtWeb Internet Browser.conf" "$1/home/$i/.config/QtWeb.NET"
   1.112 -		chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config/QtWeb.NET"
   1.113 +		cp "$1/etc/skel/.config/QtWeb.NET/QtWeb Internet Browser.conf" \
   1.114 +			"$1/home/$i/.config/QtWeb.NET"
   1.115 +		chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") \
   1.116 +			"/home/$i/.config/QtWeb.NET"
   1.117  	done
   1.118  }