Files
haikuports/media-gfx/yacreader/yacreader-9.0.0.recipe
2018-08-09 09:05:12 +02:00

105 lines
2.9 KiB
Bash

SUMMARY="A comic reader"
DESCRIPTION="YACReader is a Qt based comic reader for cross-platform reading \
and managing your digital comic collection."
HOMEPAGE="https://www.yacreader.com/"
COPYRIGHT="2018 Luis Ángel San Martín Rodríguez"
LICENSE="GNU GPL v3"
REVISION="1"
SOURCE_URI="https://bitbucket.org/luisangelsm/yacreader/downloads/yacreader-$portVersion-src.tar.xz"
CHECKSUM_SHA256="60bfefeb4cd0ce9e60cd2a6b0f976315e1781c2c1f8c5f43128ff9ebee760cc0"
PATCHES="yacreader-$portVersion.patchset"
ADDITIONAL_FILES="yacreader.rdef.in
yacreader_library.rdef.in"
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
yacreader$secondaryArchSuffix = $portVersion
app:YACReader$secondaryArchSuffix = $portVersion
app:YACReaderLibrary$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libgl$secondaryArchSuffix
lib:libglu$secondaryArchSuffix
lib:libpoppler$secondaryArchSuffix
lib:libpoppler${secondaryArchSuffix}_qt5
lib:libQt5Core$secondaryArchSuffix
lib:libQt5Gui$secondaryArchSuffix
lib:libQt5Multimedia$secondaryArchSuffix
lib:libQt5Network$secondaryArchSuffix
lib:libQt5OpenGL$secondaryArchSuffix
lib:libQt5Widgets$secondaryArchSuffix
lib:libunarr$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgl$secondaryArchSuffix
devel:libglu$secondaryArchSuffix
devel:libpoppler$secondaryArchSuffix
devel:libpoppler${secondaryArchSuffix}_qt5
devel:libQt5Core$secondaryArchSuffix
devel:libQt5Gui$secondaryArchSuffix
devel:libQt5Multimedia$secondaryArchSuffix
devel:libQt5Network$secondaryArchSuffix
devel:libQt5OpenGL$secondaryArchSuffix
devel:libQt5Widgets$secondaryArchSuffix
devel:libQt5Xml$secondaryArchSuffix
devel:libunarr$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:g++$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:qmake$secondaryArchSuffix >= 5
"
defineDebugInfoPackage yacreader$secondaryArchSuffix \
"$appsDir"/YACReader/YACReader \
"$appsDir"/YACReader/YACReaderLibrary
BUILD()
{
qmake PREFIX=$appsDir/YACReader MANDIR=$manDir DOCDIR=$docDir .
make $jobArgs
}
INSTALL()
{
mkdir -p $appsDir/YACReader
make install
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
local MINOR="`echo "$portVersion" | cut -d. -f3`"
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/yacreader.rdef.in \
> yacreader.rdef
sed \
-e "s|@MAJOR@|$MAJOR|" \
-e "s|@MIDDLE@|$MIDDLE|" \
-e "s|@MINOR@|$MINOR|" \
$portDir/additional-files/yacreader_library.rdef.in \
> yacreader_library.rdef
addResourcesToBinaries yacreader.rdef \
$appsDir/YACReader/YACReader
addResourcesToBinaries yacreader_library.rdef \
$appsDir/YACReader/YACReaderLibrary
addAppDeskbarSymlink $appsDir/YACReader/YACReader
addAppDeskbarSymlink $appsDir/YACReader/YACReaderLibrary
}
TEST()
{
make check
}