%global _hardened_build 1 Name: nextcloud-client Version: 2.2.4 Release: %mkrel 3 Summary: The Nextcloud Client Group: Archiving/Backup # -libs are LGPLv2+, rest GPLv2 License: LGPLv2+ and GPLv2 Url: https://nextcloud.com/install/#install-clients Source0: https://github.com/nextcloud/client_theming/archive/v%{version}.tar.gz Source1: https://download.owncloud.com/desktop/stable/owncloudclient-%{version}.tar.xz Source2: %{name}.appdata.xml Patch0: %{name}-2.2.3-syslibs.patch Patch1: %{name}-2.2.4-appshortname.patch BuildRequires: cmake BuildRequires: desktop-file-utils BuildRequires: doxygen BuildRequires: neon-devel BuildRequires: openssl-devel BuildRequires: python-sphinx BuildRequires: qtsingleapplication-qt5-devel BuildRequires: appstream-util BuildRequires: kf5-macros BuildRequires: cmake(KF5KIO) BuildRequires: cmake(Qt5Keychain) BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(Qt5Xml) BuildRequires: pkgconfig(Qt5Concurrent) BuildRequires: pkgconfig(Qt5WebKitWidgets) BuildRequires: pkgconfig(Qt5DBus) BuildRequires: pkgconfig(Qt5Help) Provides: mirall = %{version}-%{release} Obsoletes: mirall < 1.8.0 Provides: owncloud-client = %version-%release Obsoletes: owncloud-client < 2.2.4-2 %description Nextcloud-client enables you to connect to your private Nextcloud Server. With it you can create folders in your home directory, and keep the contents of those folders synced with your Nextcloud server. Simply copy a file into the directory and the Nextcloud Client does the rest. %files %{_bindir}/nextcloud %{_bindir}/nextcloudcmd %{_datadir}/applications/nextcloud.desktop %{_datadir}/nextcloud/i18n/* %{_datadir}/icons/hicolor/*/apps/* %{_datadir}/appdata/%{name}.appdata.xml %{_sysconfdir}/Nextcloud/sync-exclude.lst #------------------------------------------------------------------------------ %package nautilus Summary: nextcloud client nautilus extension Requires: nautilus Requires: nautilus-python Requires: %{name} = %{version}-%{release} Provides: mirall-nautilus = %{version}-%{release} Obsoletes: mirall-nautilus < 1.8.0 %description nautilus The nextcloud desktop client nautilus extension. %files nautilus %{_datadir}/nautilus-python/extensions/* #------------------------------------------------------------------------------ %package nemo Summary: Nemo overlay icons Requires: nemo Requires: nemo-python Requires: %{name} = %{version}-%{release} %description nemo This package provides overlay icons to visualize the sync state in the nemo file manager. %files nemo %{_datadir}/nemo-python/extensions/* #------------------------------------------------------------------------------ %package dolphin Summary: Dolphin overlay icons Requires: dolphin Requires: %{name} = %{version}-%{release} %description dolphin The nextcloud desktop client dolphin extension. %files dolphin %{_libdir}/libnextclouddolphinpluginhelper.so %{_kf5_plugindir}/overlayicon/nextclouddolphinoverlayplugin.so %{_qt5_plugindir}/nextclouddolphinactionplugin.so %{_kf5_datadir}/kservices5/nextclouddolphinactionplugin.desktop #------------------------------------------------------------------------------ %define nextcloudsync_major 0 %define libnextcloudsync %mklibname nextcloudsync %nextcloudsync_major %package -n %libnextcloudsync Summary: The Nextcloud Client Libraries Group: System/Libraries %description -n %libnextcloudsync The Nextcloud Client Libraries %files -n %libnextcloudsync %{_libdir}/libnextcloudsync.so.%nextcloudsync_major %{_libdir}/libnextcloudsync.so.%version #------------------------------------------------------------------------------ %define libocsync_major 0 %define liblibocsync %mklibname libocsync %libocsync_major %package -n %liblibocsync Summary: The Nextcloud Client Libraries Group: System/Libraries %description -n %liblibocsync The Nextcloud Client Libraries %files -n %liblibocsync %_libdir/nextcloud/libocsync.so.%{libocsync_major} %_libdir/nextcloud/libocsync.so.%{version} #------------------------------------------------------------------------------ %package devel Summary: Development files for nextcloud-client License: LGPLv2+ Requires: %libnextcloudsync = %{version}-%{release} Requires: %liblibocsync = %{version}-%{release} Provides: %{name}-static = %{version}-%{release} Provides: mirall-devel = %{version}-%{release} Obsoletes: mirall-devel < 1.8.0 %description devel Development headers for use of the nextcloud-client library %files devel %{_libdir}/libnextcloudsync.so %{_includedir}/nextcloudsync/ %{_libdir}/libnextcloudsync.so %{_libdir}/nextcloud/libocsync.so #------------------------------------------------------------------------------ %prep %setup -q -n client_theming-%{version} %setup -T -D -a 1 -n client_theming-%{version} rm -Rf client mv owncloudclient-%{version} client %patch0 -p1 %patch1 -p1 rm -rf src/3rdparty/qtlockedfile src/3rdparty/qtsingleapplication %build #see https://www.openssl.org/docs/manmaster/crypto/OpenSSL_add_all_algorithms.html sed -i "s#SSLeay_add_all_algorithms#//OPENSSL_init_crypto#g" client/src/3rdparty/certificates/p12topem.cpp %cmake_kf5 .. -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" -D OEM_THEME_DIR=`pwd`/../nextcloudtheme ../client make %{?_smp_mflags} %install pushd build make install DESTDIR=%{buildroot} popd %find_lang client mkdir -p %{buildroot}%{_datadir}/appdata/ install -m 644 %{SOURCE2} %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml %check appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml