mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 00:30:06 +02:00
cmocka is only used for testing and can be removed from REQUIRES. Fix typo in the rm command to remove the applications and icons directories. Also, add several more directories to be pruned.
176 lines
5.5 KiB
Bash
176 lines
5.5 KiB
Bash
SUMMARY="A syncing client for Nextcloud"
|
|
DESCRIPTION="This Nextcloud client is a tool to synchronize files with a Nextcloud server."
|
|
HOMEPAGE="https://nextcloud.com"
|
|
COPYRIGHT="Nextcloud GmbH"
|
|
LICENSE="GNU GPL v2"
|
|
REVISION="3"
|
|
SOURCE_URI="https://github.com/nextcloud/desktop/archive/refs/tags/v$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="9f60a6707d31e82357780dff11168ede88d1f859481a22f2d04c827e656f3fba"
|
|
SOURCE_DIR="desktop-$portVersion"
|
|
PATCHES="nextcloud_client-$portVersion.patchset"
|
|
ADDITIONAL_FILES="nextcloud_client.rdef.in"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
|
commandBinDir=$binDir
|
|
commandSuffix=$secondaryArchSuffix
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
commandSuffix=
|
|
commandBinDir=$prefix/bin
|
|
fi
|
|
|
|
libVersion="$portVersion"
|
|
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
|
|
|
GLOBAL_WRITABLE_FILES="
|
|
settings/Nextcloud/sync-exclude.lst keep-old
|
|
"
|
|
|
|
PROVIDES="
|
|
nextcloud_client$secondaryArchSuffix = $portVersion
|
|
cmd:nextcloud$secondaryArchSuffix = $portVersion
|
|
cmd:nextcloudcmd$secondaryArchSuffix = $portVersion
|
|
lib:libnextcloud_csync$secondaryArchSuffix = $libVersionCompat
|
|
lib:libnextcloudsync$secondaryArchSuffix = $libVersionCompat
|
|
lib:nextcloudsync_vfs_suffix$secondaryArchSuffix = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
lib:libcrypto$secondaryArchSuffix
|
|
lib:libkf5archive$secondaryArchSuffix
|
|
lib:libQt5Concurrent$secondaryArchSuffix
|
|
lib:libQt5Core$secondaryArchSuffix
|
|
lib:libQt5DBus$secondaryArchSuffix
|
|
lib:libQt5Gui$secondaryArchSuffix
|
|
lib:libqt5keychain$secondaryArchSuffix
|
|
lib:libqt5Network$secondaryArchSuffix
|
|
lib:libQT5Qml$secondaryArchSuffix
|
|
lib:libQt5QmlModels$secondaryArchSuffix
|
|
lib:libQt5Quick$secondaryArchSuffix
|
|
lib:libQt5QuickControls2$secondaryArchSuffix
|
|
lib:libQt5Sql$secondaryArchSuffix
|
|
lib:libQt5Svg$secondaryArchSuffix
|
|
lib:libqt5Test$secondaryArchSuffix
|
|
lib:libQt5WebEngine$secondaryArchSuffix
|
|
lib:libQt5WebEngineWidgets$secondaryArchSuffix
|
|
lib:libQt5WebSockets$secondaryArchSuffix
|
|
lib:libQt5Widgets$secondaryArchSuffix
|
|
lib:libQt5Xml$secondaryArchSuffix
|
|
lib:libsqlite3$secondaryArchSuffix
|
|
lib:libssl$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
#optional
|
|
lib:libQt5WebChannel$secondaryArchSuffix
|
|
lib:libQt5Positioning$secondaryArchSuffix
|
|
lib:libQt5WebEngineCore$secondaryArchSuffix
|
|
lib:libQt5PrintSupport$secondaryArchSuffix
|
|
"
|
|
|
|
PROVIDES_devel="
|
|
nextcloud_client${secondaryArchSuffix}_devel = $portVersion
|
|
devel:libnextcloud_csync$secondaryArchSuffix = $libVersionCompat
|
|
devel:libnextcloudsync$secondaryArchSuffix = $libVersionCompat
|
|
"
|
|
REQUIRES_devel="
|
|
nextcloud_client$secondaryArchSuffix == $portVersion base
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
extra_cmake_modules$secondaryArchSuffix
|
|
devel:libcmocka$secondaryArchSuffix # only needed during configure and testing
|
|
devel:libcrypto$secondaryArchSuffix
|
|
devel:libkf5archive$secondaryArchSuffix
|
|
devel:libQt5Concurrent$secondaryArchSuffix
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5DBus$secondaryArchSuffix
|
|
devel:libQt5Gui$secondaryArchSuffix
|
|
devel:libqt5keychain$secondaryArchSuffix
|
|
devel:libqt5Network$secondaryArchSuffix
|
|
devel:libQT5Qml$secondaryArchSuffix
|
|
devel:libQt5QmlModels$secondaryArchSuffix
|
|
devel:libQt5Quick$secondaryArchSuffix
|
|
devel:libQt5QuickControls2$secondaryArchSuffix
|
|
devel:libQt5Sql$secondaryArchSuffix
|
|
devel:libQt5Svg$secondaryArchSuffix
|
|
devel:libqt5Test$secondaryArchSuffix
|
|
devel:libQt5WebEngine$secondaryArchSuffix
|
|
devel:libQt5WebEngineWidgets$secondaryArchSuffix
|
|
devel:libQt5WebSockets$secondaryArchSuffix
|
|
devel:libQt5Widgets$secondaryArchSuffix
|
|
devel:libQt5Xml$secondaryArchSuffix
|
|
devel:libsqlite3$secondaryArchSuffix
|
|
devel:libssl$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
#optional
|
|
devel:libQt5Core$secondaryArchSuffix
|
|
devel:libQt5WebChannel$secondaryArchSuffix
|
|
devel:libQt5Positioning$secondaryArchSuffix
|
|
devel:libQt5WebEngineCore$secondaryArchSuffix
|
|
devel:libQt5PrintSupport$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:cmake
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
cmd:linguist$secondaryArchSuffix >= 5
|
|
cmd:rsvg_convert
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
cmake -B build -S . $cmakeDirArgs \
|
|
-DCMAKE_INSTALL_BINDIR=$commandBinDir \
|
|
-DINCLUDE_INSTALL_DIR=$includeDir \
|
|
-DSYSCONF_INSTALL_DIR=$settingsDir \
|
|
-DCMAKE_BUILD_TYPE=Release -Wno-dev
|
|
make -C build $jobArgs
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
make -C build install
|
|
|
|
# don't mess with shared_mime_info files
|
|
rm -rf $dataDir/mime/{aliases,generic-icons,globs,globs2,icons,magic}
|
|
rm -rf $dataDir/mime/{mime.cache,subclasses,treemagic,types,version,XMLnamespaces}
|
|
# cleanup (not needed)
|
|
rm -rf $dataDir/{applications,icons,caja-python,nautilus-python,nemo-python}
|
|
|
|
local MAJOR="`echo "$portVersion" | cut -d. -f1`"
|
|
local MIDDLE="`echo "$portVersion" | cut -d. -f2`"
|
|
local MINOR="`echo "$portVersion" | cut -d. -f3`"
|
|
local APP_NAME="Nextcloud Desktop Client"
|
|
local LONG_INFO="$SUMMARY"
|
|
local APP_SIGNATURE="application/x-vnd.nextcloud"
|
|
sed \
|
|
-e "s|@MAJOR@|$MAJOR|" \
|
|
-e "s|@MIDDLE@|$MIDDLE|" \
|
|
-e "s|@MINOR@|$MINOR|" \
|
|
-e "s|@LONG_INFO@|$LONG_INFO|" \
|
|
-e "s|@APP_NAME@|$APP_NAME|" \
|
|
-e "s|@APP_SIGNATURE@|$APP_SIGNATURE|" \
|
|
$portDir/additional-files/nextcloud_client.rdef.in > nextcloud_client.rdef
|
|
|
|
addResourcesToBinaries nextcloud_client.rdef $commandBinDir/nextcloud
|
|
|
|
addAppDeskbarSymlink $commandBinDir/nextcloud Nextcloud
|
|
|
|
prepareInstalledDevelLibs \
|
|
libnextcloud_csync \
|
|
libnextcloudsync
|
|
|
|
packageEntries devel \
|
|
$developDir
|
|
}
|
|
|
|
TEST()
|
|
{
|
|
make -C build test
|
|
}
|