Files
haikuports/media-gfx/flameshot/flameshot-0.6.0.recipe
2020-08-21 23:31:13 +10:00

91 lines
2.2 KiB
Bash

SUMMARY="Powerful yet simple to use screenshot software"
DESCRIPTION="Features
* Customizable appearance.
* Easy to use.
* In-app screenshot edition.
* DBus interface.
* Upload to Imgur."
HOMEPAGE="https://github.com/lupoDharkael/flameshot/"
COPYRIGHT="2019 lupoDharkael"
LICENSE="GNU GPL v3"
REVISION="3"
SOURCE_URI="https://github.com/lupoDharkael/flameshot/archive/v$portVersion.tar.gz"
CHECKSUM_SHA256="61b3a1969d6e17d80d5d90a3fce53ca5ae78fa21f9a45e5a19b0b32ea815a589"
PATCHES="flameshot-$portVersion.patchset"
ADDITIONAL_FILES="
flameshot.rdef.in
flameshot.png
"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
flameshot$secondaryArchSuffix = $portVersion
app:Flameshot$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libGL$secondaryArchSuffix
lib:libQt5Core$secondaryArchSuffix
lib:libQt5DBus$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5Svg$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libQt5Core$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:lrelease$secondaryArchSuffix >= 5
cmd:make
cmd:qmake$secondaryArchSuffix >= 5
"
PATCH()
{
cp -f $sourceDir/../../additional-files/flameshot.png $sourceDir/img/app/flameshot.png
}
BUILD()
{
qmake PREFIX=$appsDir/Flameshot
make $jobArgs
}
INSTALL()
{
make install
mv $appsDir/Flameshot/bin/flameshot \
$appsDir/Flameshot/Flameshot
mv $appsDir/Flameshot/share/flameshot/translations \
$appsDir/Flameshot
rm -rf $appsDir/Flameshot/bin
rm -rf $appsDir/Flameshot/share
local APP_SIGNATURE="application/x-vnd.flameshot"
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/flameshot.rdef.in > flameshot.rdef
addResourcesToBinaries flameshot.rdef $appsDir/Flameshot/Flameshot
addAppDeskbarSymlink $appsDir/Flameshot/Flameshot
}