]> git.pld-linux.org Git - packages/owncloudclient.git/blobdiff - owncloudclient.spec
- release 2 (by relup.sh)
[packages/owncloudclient.git] / owncloudclient.spec
index 82a7b098c56934031dd9d04e9aa30550545ec16b..38348d224392e6df310b4634c775c1e3a909c876 100644 (file)
@@ -1,50 +1,83 @@
+#
+# Conditional build:
+%bcond_without nautilus        # build Nautilus extension
+%bcond_without caja            # build caja extension
+%bcond_with    dolphin         # build dolphin extension
+%bcond_without doc             # build docs
+%bcond_without gui             # build only libraries
+
+%if %{without gui}
+%undefine      with_nautilus
+%undefine      with_caja
+%undefine      with_dolphin
+%undefine      with_doc
+%endif
 
+%define                qtver   5.4
 Summary:       The ownCloud client
 Name:          owncloudclient
-Version:       2.1.1
-Release:       0.1
-License:       GPL-2.0+
+Version:       2.3.3
+Release:       2
+License:       GPL v2+
 Group:         X11/Applications
-URL:           https://www.owncloud.com
 Source0:       https://download.owncloud.com/desktop/stable/%{name}-%{version}.tar.xz
-# Source0-md5:  ee08ccedccd4c49f1464957146e14d26
-Source1:       owncloud.sh
-Source2:       owncloudcmd.sh
+# Source0-md5: bba20fc6f38e0b14f6ceb9ab432d1802
+Patch0:                syslibs.patch
+URL:           https://www.owncloud.com/
+BuildRequires: Qt5Concurrent-devel >= %{qtver}
+BuildRequires: Qt5Core-devel >= %{qtver}
+BuildRequires: Qt5DBus-devel >= %{qtver}
+BuildRequires: Qt5Gui-devel >= %{qtver}
+BuildRequires: Qt5Keychain-devel
+BuildRequires: Qt5Network-devel >= %{qtver}
+BuildRequires: Qt5WebKit-devel >= %{qtver}
+BuildRequires: Qt5Xml-devel >= %{qtver}
 BuildRequires: cmake >= 2.8.11
-BuildRequires: gcc
-BuildRequires: gcc-c++
-BuildRequires: qt4
-BuildRequires: qt4-devel >= 4.7
-BuildRequires: qtwebkit >= 2.2
-BuildRequires: qtwebkit-devel >= 2.2
-BuildRequires: inetd
-BuildRequires: desktop-file-utils
-BuildRequires: openssl-devel
-BuildRequires: libQt5Concurrent-devel
-BuildRequires: libQt5Core-devel
-BuildRequires: libQt5DBus-devel
-BuildRequires: libQt5Gui-devel
-BuildRequires: libQt5Network-devel
-BuildRequires: libQt5PrintSupport-devel
-BuildRequires: libQt5WebKitWidgets-devel
-BuildRequires: libQt5Xml-devel
-BuildRequires: libqt5-linguist-devel
-BuildRequires: inetd
-BuildRequires: desktop-file-utils
-BuildRequires: sqlite-devel
-BuildRequires: sphinx-pdg
-BuildRequires: python-Sphinx
-BuildRequires: sqlite3-devel
-BuildRequires: update-desktop-files
+BuildRequires: libstdc++-devel
+BuildRequires: openssl-devel >= 1.0.0
+BuildRequires: pkgconfig
+BuildRequires: qt5-linguist >= %{qtver}
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.596
+BuildRequires: sqlite3-devel >= 3.8.0
+BuildRequires: tar >= 1:1.22
+BuildRequires: xz
+BuildRequires: zlib-devel
+%if %{with gui}
+BuildRequires: Qt5LockedFile-devel >= 2.4
+BuildRequires: Qt5SingleApplication-devel >= 2.6.1-3
+BuildRequires: Qt5Sql-devel >= %{qtver}
+BuildConflicts:        QtLockedFile-devel
+%endif
+%if %{with dolphin}
+BuildRequires: kf5-attica-devel >= 5.16
+BuildRequires: kf5-extra-cmake-modules >= 1.2.0
+BuildRequires: kf5-kconfig-devel >= 5.16
+BuildRequires: kf5-ki18n-devel >= 5.16
+BuildRequires: kf5-kio-devel >= 5.16
+%endif
+%if %{with doc}
+BuildRequires: doxygen
+BuildRequires: sphinx-pdg-2
+BuildRequires: texlive-format-pdflatex
+BuildRequires: texlive-latex-ams
+BuildRequires: texlive-makeindex
+BuildRequires: texlive-pdftex
+BuildRequires: texlive-plain
+BuildRequires: texlive-xetex
+%endif
+Requires:      %{name}-libs = %{version}-%{release}
+Requires:      Qt5Gui-platform-xcb
+Requires:      Qt5SingleApplication >= 2.6.1-3
+Requires:      desktop-file-utils
+Requires:      gtk-update-icon-cache
+Requires:      hicolor-icon-theme
 Suggests:      %{name}-nautilus
 Suggests:      %{name}-nemo
-Requires:      %{name}-l10n
-Requires:      libowncloudsync0 = %{version}
+Obsoletes:     mirall < 1.8
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
-The ownCloud sync client - github.com/owncloud/client
-
 ownCloud client enables you to connect to your private ownCloud
 Server. With it you can create folders in your home directory, and
 keep the contents of those folders synced with your ownCloud server.
@@ -60,251 +93,171 @@ controlled architecture. You can easily extend ownCloud with plug-ins
 from the community, or that you build yourself to meet the
 requirements of your infrastructure and business.
 
-%package -n %{name}-doc
-Summary:       Documentation for ownCloud
-Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     opt-owncloud-client-doc
+%package libs
+Summary:       Shared ownCloud client libraries
+Group:         Libraries
+Obsoletes:     mirall-libs < 1.8
 
-%description -n %{name}-doc
-Documentation about the ownCloud desktop application.
+%description libs
+Shared ownCloud client libraries.
 
-%package -n %{name}-l10n
-Summary:       Localization for ownCloud
+%package devel
+Summary:       Header files for %{name} library
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki %{name}
 Group:         Development/Libraries
-Requires:      %{name} = %{version}-%{release}
-Obsoletes:     opt-owncloud-client-l10n
+Requires:      %{name}-libs = %{version}-%{release}
 
-%description -n %{name}-l10n
-Localization files for the ownCloud desktop application.
+%description devel
+Header files for %{name} library.
 
-%package -n libowncloudsync0
-Summary:       The ownCloud sync library
-Group:         Development/Libraries
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki %{name}.
 
-%description -n libowncloudsync0
-The ownCloud sync library.
+%package apidocs
+Summary:       %{name} API documentation
+Summary(pl.UTF-8):     Dokumentacja API biblioteki %{name}
+Group:         Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch:     noarch
+%endif
 
-%package -n libowncloudsync-devel
-Summary:       Development files for the ownCloud sync library
-Group:         Development/Libraries
-Requires:      libowncloudsync0 = %{version}
+%description apidocs
+API documentation for %{name} library.
 
-%description -n libowncloudsync-devel
-Development files for the ownCloud sync library.
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki %{name}.
 
-%package -n %{name}-nautilus
+%package nautilus
 Summary:       Nautilus overlay icons
-Group:         Productivity/Networking/Other
-Requires:      nautilus
-Requires:      nautilus-python
-Requires:      python-nautilus
+Group:         Applications
 Requires:      %{name} = %{version}-%{release}
+Requires:      nautilus-python
 
-%description -n %{name}-nautilus
+%description nautilus
 This package provides overlay icons to visualize the sync state in the
-nautilus file manager.
-
-%package -n %{name}-nemo
-Summary:       Nemo overlay icons
-Group:         Productivity/Networking/Other
-Requires:      nemo
-Requires:      nemo-python
-Requires:      python-nemo
+Nautilus file manager.
+
+%package caja
+Summary:       Caja overlay icons
+Group:         Applications
 Requires:      %{name} = %{version}-%{release}
+Requires:      caja-python
 
-%description -n %{name}-nemo
+%description caja
 This package provides overlay icons to visualize the sync state in the
-nemo file manager.
+Caja file manager.
 
 %prep
-%setup -q -n owncloudclient-%{version}
-%if 0%{?rhel_version} || 0%{?centos_version} || 0%{?suse_version} == 1110
-# autostart_use_wrapper.diff
-%patch1 -p1
-%endif
+%setup -q
+%patch0 -p1
+
+mv src/3rdparty/qtlockedfile .
+mv src/3rdparty/qtsingleapplication .
 
 %build
-export LD_LIBRARY_PATH=%{optdir}/%{_lib}
-export PATH=%{optdir}/bin:$PATH
-
-mkdir build
-pushd build
-# http://www.cmake.org/Wiki/CMake_RPATH_handling#Default_RPATH_settings
-cmake .. -DWITH_DOC=TRUE \
-%if "%{prerelease}" != ""
-  -DMIRALL_VERSION_SUFFIX="%{prerelease}" \
-  -DMIRALL_VERSION_BUILD=0 \
-%endif
-  -DCMAKE_C_FLAGS:STRING="%{optflags}" \
-  -DCMAKE_CXX_FLAGS:STRING="%{optflags}" \
-  -DCMAKE_SKIP_RPATH=OFF \
-  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-  -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-%if %{_lib} == lib64
-  -DLIB_SUFFIX=64 \
-%endif
-%if ! %{is_owncloud_client}
-  -DOEM_THEME_DIR=$PWD/../ownCloud/syncclient \
-%endif
-%if %{opt_hack}
-%if 0%{?rhel_version} == 600 || 0%{?centos_version} == 600
-  -DQTKEYCHAIN_INCLUDE_DIR=%{optdir}/include/qtkeychain \
-  -DQTKEYCHAIN_LIBRARY=%{optdir}/%{_lib}/libqtkeychain.so \
+install -d build
+cd build
+%cmake \
+       -DQTKEYCHAIN_INCLUDE_DIR=/usr/include/qt5keychain \
+       -DQTKEYCHAIN_LIBRARY=/usr/%{_lib}/libqt5keychain.so \
+       -DQT_LRELEASE_EXECUTABLE=/usr/bin/lrelease-qt5 \
+       -DBUILD_WITH_QT4=NO \
+%if %{with doc}
+       -DSPHINX_EXECUTABLE=/usr/bin/sphinx-build-2 \
+       -DPDFLATEX_EXECUTABLE=/usr/bin/pdflatex \
+       -DDOXYGEN_EXECUTABLE=/usr/bin/doxygen \
+       -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} \
 %else
-  -DQTKEYCHAIN_INCLUDE_DIR=%{optdir}/include/qt5keychain \
-  -DQTKEYCHAIN_LIBRARY=%{optdir}/%{_lib}/libqt5keychain.so \
+       -DWITH_DOC=NO \
+       -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE \
+       -DCMAKE_DISABLE_FIND_PACKAGE_PdfLatex=TRUE \
+       -DCMAKE_DISABLE_FIND_PACKAGE_Sphinx=TRUE \
 %endif
+%if %{without dolphin}
+       -DCMAKE_DISABLE_FIND_PACKAGE_ECM=TRUE \
+       -DCMAKE_DISABLE_FIND_PACKAGE_KF5=TRUE \
 %endif
-  %cmake_args
-
-# documentation here?
-if [ -e conf.py ];
-then
-  # for old cmake versions we need to move the conf.py.
-  mv conf.py doc/
-fi
-
-env LD_RUN_PATH=%{_libdir}/owncloud:%{_libdir}/owncloud make %{?_smp_mflags} VERBOSE=1
+       %{!?with_gui:-DBUILD_LIBRARIES_ONLY=ON} \
+       ..
+%{__make}
 
+%if %{with doc}
 %{__make} doc
-popd
+rm doc/html/unthemed/.buildinfo
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
-pushd build
-%{__make} install \
+%{__make} -C build install \
        DESTDIR=$RPM_BUILD_ROOT
 
-if [ %{have_doc} != 0 ];
-then
-  install -d ${RPM_BUILD_ROOT}%{_docdir}/%{name}
-  mv ${RPM_BUILD_ROOT}%{_docdir}/client/* ${RPM_BUILD_ROOT}%{_docdir}/%{name}
-  rmdir ${RPM_BUILD_ROOT}%{_docdir}/client
-  rm ${RPM_BUILD_ROOT}%{_docdir}/%{name}/html/unthemed/.buildinfo
-  mv ${RPM_BUILD_ROOT}%{_docdir}/%{name}/html/unthemed/* ${RPM_BUILD_ROOT}%{_docdir}/%{name}/html/
-  rmdir ${RPM_BUILD_ROOT}%{_docdir}/%{name}/html/unthemed
-fi
-popd
-
-if [ -d ${RPM_BUILD_ROOT}%{_mandir}/man1 ]; then
-%if ! %{is_owncloud_client}
-  install -d ${RPM_BUILD_ROOT}%{_mandir}man1
-  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/{owncloud.1,owncloud.1}
-  mv ${RPM_BUILD_ROOT}%{_mandir}/man1/{owncloudcmd.1,owncloudcmd.1}
-%endif
-  gzip ${RPM_BUILD_ROOT}%{_mandir}/man1/*.1
-fi
-
-%define extdir ${RPM_BUILD_ROOT}%{_datadir}/nautilus-python/extensions
-test -f %{extdir}/ownCloud.py  && mv %{extdir}/ownCloud.py  %{extdir}/owncloud.py  || true
-test -f %{extdir}/ownCloud.pyo && mv %{extdir}/ownCloud.pyo %{extdir}/owncloud.pyo || true
-test -f %{extdir}/ownCloud.pyc && mv %{extdir}/ownCloud.pyc %{extdir}/owncloud.pyc || true
+# owncloud client links without rpath
+mv $RPM_BUILD_ROOT%{_libdir}/owncloud/libocsync.so* $RPM_BUILD_ROOT%{_libdir}
 
-%if %opt_hack
-install -d ${RPM_BUILD_ROOT}/%{optdir}/bin
-mv ${RPM_BUILD_ROOT}/%{_bindir}/owncloud* ${RPM_BUILD_ROOT}/%{optdir}/bin/
-
-cp -p %{SOURCE1} ${RPM_BUILD_ROOT}%{_bindir}/owncloud
-cp -p %{SOURCE2} ${RPM_BUILD_ROOT}%{_bindir}/owncloudcmd
+%if %{with nautilus}
+# nemo not in pld
+%{__rm} $RPM_BUILD_ROOT%{_datadir}/nemo-python/extensions/syncstate-ownCloud.py*
 %endif
 
-%if %{?suse_version:1}0
-%suse_update_desktop_file -n owncloud
-# workaround for https://github.com/owncloud/ownbrander/issues/322
-for desktop_icon_dir in $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/*/apps; do
-  # copy shortname to executable name, if missing.
-  if [ -f $desktop_icon_dir/owncloud.png -a ! -f $desktop_icon_dir/owncloud.png ]; then
-    cp $desktop_icon_dir/owncloud.png $desktop_icon_dir/owncloud.png
-  fi
-done
-%endif
+%clean
+rm -rf $RPM_BUILD_ROOT
 
-%check
-## use exit 0 instead of exit 1 to turn this into warnings:
-if [ "%{name}" != "testpilotcloud-client" ]; then
-  if [ "%{prerelease}" == "" ]; then
-    expr match '%{distribution}' '.*:community:\(testing\|nightly\)' && { echo "Error: Need a prerelease here, not %{version}"; exit 1; }
-  else
-    expr match '%{distribution}' '.*:community:desktop' && { echo "Error: Must not have a prerelease here, not %{version}"; exit 1; }
-  fi
-fi
-
-%if 0%{?fedora_version}
 %post
-/bin/%update_icon_cache_post hicolor &>/dev/null || :
+%update_desktop_database
+%update_icon_cache hicolor
 
 %postun
-if [ $1 -eq 0 ] ; then
-    /bin/%update_icon_cache_post hicolor &>/dev/null
-    %{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-fi
+%update_desktop_database
+%update_icon_cache hicolor
 
-%posttrans
-%{_bindir}/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
-%endif
-
-%post -n libowncloudsync0
-/sbin/ldconfig
-
-%postun -n libowncloudsync0
-/sbin/ldconfig
+%post  libs -p /sbin/ldconfig
+%postun        libs -p /sbin/ldconfig
 
+%if %{with gui}
 %files
 %defattr(644,root,root,755)
+%doc README.md COPYING
 %attr(755,root,root) %{_bindir}/owncloud
 %attr(755,root,root) %{_bindir}/owncloudcmd
-%{optdir}/bin/owncloud
-%{optdir}/bin/owncloudcmd
-
 %{_desktopdir}/owncloud.desktop
-%{_iconsdir}/hicolor
-%{_mandir}/man1/owncloud*
-
-%{_iconsdir}/hicolor
-%{_desktopdir}/owncloud.desktop
-%attr(755,root,root) %{_bindir}/owncloud
-%attr(755,root,root) %{_bindir}/owncloudcmd
-%config %{_sysconfdir}/ownCloud
-%dir %{_sysconfdir}
-
-%files -n %{name}-doc
-%defattr(644,root,root,755)
-%doc README.md COPYING
-%if 0%{have_doc}
-%doc %{_docdir}/%{name}
-%endif
-
-%files -n %{name}-l10n
-%defattr(644,root,root,755)
+%{_iconsdir}/*/*/apps/*.png
 %{_datadir}/owncloud
-
-%files -n libowncloudsync0
-%defattr(644,root,root,755)
-%{_libdir}/libowncloudsync.so.*
-%{_libdir}/owncloud/libocsync.so.*
 %dir %{_libdir}/owncloud
+%if %{with doc}
+%{_mandir}/man1/owncloud.1*
+%{_mandir}/man1/owncloudcmd.1*
+%endif
+%endif
 
-%files -n libowncloudsync-devel
+%files libs
+%defattr(644,root,root,755)
+%dir %{_sysconfdir}/ownCloud
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ownCloud/sync-exclude.lst
+%attr(755,root,root) %{_libdir}/libowncloudsync.so.*.*.*
+%ghost %{_libdir}/libowncloudsync.so.0
+%attr(755,root,root) %{_libdir}/libocsync.so.*.*.*
+%ghost %{_libdir}/libocsync.so.0
+
+%files devel
 %defattr(644,root,root,755)
+%{_includedir}/owncloudsync
 %{_libdir}/libowncloudsync.so
-%{_libdir}/owncloud/libocsync.so
-%{_includedir}/owncloudsync/
+%{_libdir}/libocsync.so
 
-%files -n %{name}-nautilus
+%if %{with nautilus}
+%files nautilus
 %defattr(644,root,root,755)
-# Fedora also has *.pyc and *.pyo files here.
-%{_datadir}/nautilus-python/extensions/syncstate.py*
-%dir %{_datadir}/nautilus-python
-%dir %{_datadir}/nautilus-python/extensions/
+%{_datadir}/nautilus-python/extensions/syncstate-ownCloud.py*
+%endif
 
-%files -n %{name}-nemo
+%if %{with caja}
+%files caja
 %defattr(644,root,root,755)
-# Fedora also has *.pyc and *.pyo files here.
-%{_datadir}/nemo-python/extensions/syncstate.py*
-%dir %{_datadir}/nemo-python
-%dir %{_datadir}/nemo-python/extensions/
-
+%{_datadir}/caja-python/extensions/syncstate-ownCloud.py*
+%endif
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc %{_docdir}/%{name}
+%endif
This page took 0.042656 seconds and 4 git commands to generate.