mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
92 lines
2.6 KiB
Bash
92 lines
2.6 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-2023 Florian Bruhin (The Compiler)"
|
||
LICENSE="GNU GPL v3"
|
||
REVISION="1"
|
||
SOURCE_URI="https://github.com/qutebrowser/qutebrowser/archive/v$portVersion.tar.gz"
|
||
CHECKSUM_SHA256="e24344e25ad66ed94b9f9c280523124d8966c490b1480acb8f6af483ecb46b75"
|
||
PYTHON_VERSION="3.9"
|
||
ADDITIONAL_FILES="qutebrowser.rdef.in"
|
||
|
||
ARCHITECTURES="all !x86_gcc2"
|
||
SECONDARY_ARCHITECTURES="x86"
|
||
|
||
PROVIDES="
|
||
qutebrowser$secondaryArchSuffix = $portVersion
|
||
app:QuteBrowser$secondaryArchSuffix = $portVersion
|
||
"
|
||
REQUIRES="
|
||
haiku$secondaryArchSuffix
|
||
importlib_metadata_python39
|
||
jinja_python39
|
||
pyqt5_python39
|
||
pyyaml_python39
|
||
setuptools_python39
|
||
cmd:python$PYTHON_VERSION
|
||
lib:libQt5Core$secondaryArchSuffix
|
||
"
|
||
|
||
BUILD_REQUIRES="
|
||
haiku${secondaryArchSuffix}_devel
|
||
importlib_metadata_python39
|
||
jinja_python39
|
||
pyqt5_python39
|
||
pyyaml_python39
|
||
setuptools_python39
|
||
devel:libQt5Core$secondaryArchSuffix
|
||
"
|
||
BUILD_PREREQUIRES="
|
||
cmd:python$PYTHON_VERSION
|
||
cmd:a2x
|
||
cmd:make
|
||
"
|
||
|
||
BUILD()
|
||
{
|
||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python$PYTHON_VERSION
|
||
make -f misc/Makefile PYTHON=python$PYTHON_VERSION all
|
||
}
|
||
|
||
INSTALL()
|
||
{
|
||
# GENERIC: all python_setuptools-based installs need this
|
||
python=$portPackageLinksDir/cmd~python$PYTHON_VERSION/bin/python$PYTHON_VERSION
|
||
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
|
||
|
||
make -f misc/Makefile PREFIX=$prefix PYTHON=$python DATAROOTDIR=$dataDir 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
|
||
|
||
mv $prefix/bin/qutebrowser $appsDir/QuteBrowser
|
||
rm -rf $prefix/bin
|
||
|
||
settype -t application/x-vnd.Be-elfexecutable \
|
||
$appsDir/QuteBrowser
|
||
|
||
# Installing extra-attribs
|
||
rc qutebrowser.rdef
|
||
resattr -o $appsDir/QuteBrowser \
|
||
qutebrowser.rsrc
|
||
|
||
addAppDeskbarSymlink $appsDir/QuteBrowser
|
||
}
|