Files
haikuports/net-im/psi_plus/psi_plus-1.2.105.recipe
Sergei Reznikov 95039741ac Psi+: add recipe for version 1.2.105
disabled for now as it can't conntect to xmpp, likely due to a bug in qca
see https://bugs.archlinux.org/task/19175
2017-11-15 21:23:38 +03:00

108 lines
3.1 KiB
Bash

SUMMARY="A development branch of Psi IM XMPP/Jabber client"
DESCRIPTION="Psi is a cross-platform powerful XMPP/Jabber client (Qt, C++) \
designed for the Jabber power users."
HOMEPAGE="http://psi-plus.com/"
SOURCE_URI="https://github.com/psi-plus/psi-plus-snapshots/archive/$portVersion.tar.gz"
SOURCE_DIR="psi-plus-snapshots-$portVersion"
CHECKSUM_SHA256="b010bcb538c31699a86a7df22500cca4018060b2bfea97732739b62406c0f803"
SOURCE_URI_2="https://github.com/psi-plus/psi-plus-l10n/archive/$portVersion.tar.gz"
SOURCE_FILENAME_2="psi-plus-l10n-$portVersion.tar.gz"
SOURCE_DIR_2="psi-plus-l10n-$portVersion"
CHECKSUM_SHA256_2="16ee3bb7cd2939fafe6ab11c9026e6846355ca1be9c4cf91c2547af0c9951019"
REVISION="1"
LICENSE="GNU GPL v2"
COPYRIGHT="2005-2017, Psi+ Project"
ARCHITECTURES="!x86_gcc2 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
ADDITIONAL_FILES="psi-plus.rdef.in"
PATCHES="psi_plus-$portVersion.patchset"
PROVIDES="
psi$secondaryArchSuffix = $portVersion
app:Psi$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libhunspell_1.6$secondaryArchSuffix
lib:libidn$secondaryArchSuffix
lib:libqca$secondaryArchSuffix
lib:libqt5$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:g++$secondaryArchSuffix
cmd:patch
cmd:pkg_config$secondaryArchSuffix
cmd:make
cmd:which
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgcrypt$secondaryArchSuffix
devel:libhunspell_1.6$secondaryArchSuffix
devel:libidn$secondaryArchSuffix
devel:libotr$secondaryArchSuffix
devel:libqca$secondaryArchSuffix
devel:libqt5$secondaryArchSuffix
devel:libQt5WebKit$secondaryArchSuffix
devel:libtidys$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD()
{
# disable videostatusplugin as it doesn't build
sed -i 's/videostatusplugin//' src/plugins/generic/CMakeLists.txt
ln -sf ../../sources-2/psi-plus-l10n-$portVersion/translations .
mkdir -p build && cd build
cmake .. \
-DCMAKE_INSTALL_PREFIX:PATH=$appsDir/Psi-plus \
-DCMAKE_INSTALL_BINDIR:PATH=$appsDir/Psi-plus \
-DCMAKE_INSTALL_LIBDIR:PATH=$appsDir/Psi-plus/lib \
-DCMAKE_INSTALL_DATAROOTDIR:PATH=$appsDir/Psi-plus/data \
-DPLUGINS_PATH=plugins \
-DCMAKE_BUILD_TYPE=RELEASE \
-DBUNDLED_IRIS=ON \
-DUSE_HUNSPELL=ON \
-DENABLE_WEBKIT=OFF \
-DENABLE_PLUGINS=ON \
-DONLY_PLUGINS=OFF \
-DBUILD_PLUGINS="ALL"
make $jobArgs
}
INSTALL()
{
cd build
make install
# cleanup
rm -rf $appsDir/Psi-plus/{applications,pixmaps}
# crashes Psi-plus on launch
rm -rf $appsDir/Psi-plus/plugins/libjuickplugin.so
mv $appsDir/Psi-plus/psi-plus $appsDir/Psi-plus/Psi-plus
local APP_SIGNATURE="application/x-vnd.Psi-plus"
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/psi-plus.rdef.in > psi-plus.rdef
addResourcesToBinaries psi-plus.rdef $appsDir/Psi-plus/Psi-plus
addAppDeskbarSymlink $appsDir/Psi-plus/Psi-plus
}