92 lines
2.6 KiB
Bash
92 lines
2.6 KiB
Bash
SUMMARY="A cross-platform, aesthetic, distraction-free Markdown editor"
|
|
DESCRIPTION="ghostwriter is a text editor for Markdown."
|
|
HOMEPAGE="https://wereturtle.github.io/ghostwriter/"
|
|
COPYRIGHT="wereturtle et al."
|
|
LICENSE="GNU GPL v3"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/wereturtle/ghostwriter/archive/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="4987126e71a37556e575fbce2002c5504cf15a04c11bcce604a278f59ec9c11a"
|
|
SOURCE_FILENAME="ghostwriter-$portVersion.tar.gz"
|
|
ADDITIONAL_FILES="ghostwriter.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
ghostwriter$secondaryArchSuffix = $portVersion
|
|
app:Ghostwriter$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
cmd:hunspell$secondaryArchSuffix
|
|
lib:libGL$secondaryArchSuffix
|
|
lib:libQt5Concurrent$secondaryArchSuffix
|
|
lib:libQt5Core$secondaryArchSuffix
|
|
lib:libQt5Gui$secondaryArchSuffix
|
|
lib:libQt5PrintSupport$secondaryArchSuffix
|
|
lib:libQt5WebKit$secondaryArchSuffix
|
|
lib:libQt5WebKitWidgets$secondaryArchSuffix
|
|
lib:libQt5Widgets$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
hunspell${secondaryArchSuffix}_devel
|
|
devel:libGL$secondaryArchSuffix
|
|
devel:libQt5Concurrent$secondaryArchSuffix
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
devel:libQt5PrintSupport$secondaryArchSuffix
|
|
devel:libQt5WebKit$secondaryArchSuffix
|
|
devel:libQt5WebKitWidgets$secondaryArchSuffix
|
|
devel:libQt5Widgets$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:lrelease$secondaryArchSuffix >= 5
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:qmake$secondaryArchSuffix >= 5
|
|
"
|
|
|
|
PATCH()
|
|
{
|
|
sed -i \
|
|
-e "/translationPaths.append/ \
|
|
s|appDir + \"/translations\"|\"$dataDir/ghostwriter/translations\"|;" \
|
|
src/AppSettings.cpp
|
|
}
|
|
|
|
BUILD()
|
|
{
|
|
lrelease ghostwriter.pro
|
|
qmake BINDIR=$appsDir DATADIR=$dataDir
|
|
make $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make install
|
|
mv $appsDir/ghostwriter $appsDir/Ghostwriter
|
|
rm -rf $dataDir/{appdata,applications,icons,pixmaps}
|
|
|
|
local APP_SIGNATURE="application/x-vnd.ghostwriter"
|
|
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/ghostwriter.rdef.in > ghostwriter.rdef
|
|
|
|
addResourcesToBinaries ghostwriter.rdef $appsDir/Ghostwriter
|
|
mimeset -f $appsDir/Ghostwriter
|
|
addAppDeskbarSymlink $appsDir/Ghostwriter
|
|
}
|