mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-04 22:18:55 +02:00
96 lines
2.5 KiB
Bash
96 lines
2.5 KiB
Bash
SUMMARY="A VIM-like web browser"
|
||
DESCRIPTION="QuteBrowser is a keyboard-focused browser with a minimal GUI. \
|
||
It’s based on Python and PyQt5 and free software, licensed under the GPL. \
|
||
It was inspired by other browsers/addons like dwb and Vimperator/Pentadactyl."
|
||
HOMEPAGE="https://qutebrowser.org/"
|
||
COPYRIGHT="2014-2018 Florian Bruhin (The Compiler)"
|
||
LICENSE="GNU GPL v3"
|
||
REVISION="1"
|
||
SOURCE_URI="https://github.com/qutebrowser/qutebrowser/archive/v$portVersion.tar.gz"
|
||
CHECKSUM_SHA256="04265b55898a9c4addc25d08bf322e2e37b0f661113b6075c7715caca24e3292"
|
||
PYTHON_VERSION="3.6"
|
||
ADDITIONAL_FILES="qutebrowser.rdef.in"
|
||
|
||
ARCHITECTURES="!x86_gcc2 x86_64"
|
||
SECONDARY_ARCHITECTURES="x86"
|
||
|
||
PROVIDES="
|
||
qutebrowser$secondaryArchSuffix = $portVersion
|
||
app:QuteBrowser$secondaryArchSuffix = $portVersion
|
||
"
|
||
|
||
REQUIRES="
|
||
haiku$secondaryArchSuffix
|
||
lib:libQt5Core$secondaryArchSuffix
|
||
cmd:python$PYTHON_VERSION
|
||
attrs_python3
|
||
jinja_python3
|
||
pygments_python3
|
||
pypeg2_python3
|
||
pyqt_python3
|
||
pyyaml_python3
|
||
setuptools_python3
|
||
"
|
||
|
||
BUILD_REQUIRES="
|
||
haiku${secondaryArchSuffix}_devel
|
||
attrs_python3
|
||
jinja_python3
|
||
setuptools_python3
|
||
pygments_python3
|
||
pypeg2_python3
|
||
pyyaml_python3
|
||
"
|
||
|
||
BUILD_PREREQUIRES="
|
||
cmd:gcc$secondaryArchSuffix
|
||
cmd:python$PYTHON_VERSION
|
||
"
|
||
|
||
BUILD()
|
||
{
|
||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python3
|
||
$python ./setup.py build $jobArgs
|
||
}
|
||
|
||
INSTALL()
|
||
{
|
||
# Add Haiku resources
|
||
local APP_SIGNATURE="application/x-vnd.qutebrowser"
|
||
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
||
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
||
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
||
local LONG_INFO="$SUMMARY"
|
||
sed \
|
||
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
||
-e "s|@MAJOR@|$MAJOR|" \
|
||
-e "s|@MIDDLE@|$MIDDLE|" \
|
||
-e "s|@MINOR@|$MINOR|" \
|
||
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
||
$portDir/additional-files/qutebrowser.rdef.in \
|
||
> qutebrowser.rdef
|
||
|
||
# GENERIC: all python_setuptools-based installs need this
|
||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python3
|
||
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
|
||
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
|
||
export PYTHONPATH=$installLocation:$PYTHONPATH
|
||
mkdir -p $installLocation $appsDir
|
||
|
||
$python setup.py install --prefix $prefix
|
||
|
||
mv $binDir/qutebrowser $appsDir/QuteBrowser
|
||
|
||
settype -t application/x-vnd.Be-elfexecutable \
|
||
$appsDir/QuteBrowser
|
||
|
||
# Installing extra-attribs
|
||
rc qutebrowser.rdef
|
||
resattr -o $appsDir/QuteBrowser \
|
||
qutebrowser.rsrc
|
||
|
||
addAppDeskbarSymlink $appsDir/QuteBrowser
|
||
|
||
rm -rf $binDir
|
||
}
|