]> git.pld-linux.org Git - packages/dropbox.git/blobdiff - dropbox.spec
Up to 157.4.4808
[packages/dropbox.git] / dropbox.spec
index d84b31cfccf8744ff7f14159b0bd936ab581b0c4..41fed5a8dc5f786ecde4515046707df829b363dd 100644 (file)
@@ -1,3 +1,8 @@
+#
+# Conditional build:
+%bcond_with    system_qt               # Remove bundled Qt5
+%bcond_with    rewrite_zip             # Remove Python modules this platform has no use
+
 # TODO
 # - avoid dropboxd relaunching itself with newer version if there's update available (disable auto updating):
 #   glen     25034 19.9  1.5 1496132 81256 pts/46  Sl+  11:02   1:02 /home/glen/.dropbox-dist/dropbox /newerversion
 # - Upstream Dropbox Support (https://www.dropbox.com/ticket)
 # - Release Notes (check new versions here): https://www.dropbox.com/release_notes
 # - Download instructions (click the download link to find current version):
-#   http://www.dropbox.com/downloading?os=lnx
+#   https://www.dropbox.com/install-linux
 #   http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall
 Summary:       Sync and backup files between computers
 Name:          dropbox
 # https://www.dropboxforum.com/hc/en-us/community/posts/206682016-New-Versioning-Scheme
-Version:       11.4.22
+Version:       157.4.4808
 Release:       1
 License:       Proprietary
 Group:         Daemons
-Source0:       http://dl-web.dropbox.com/u/17/%{name}-lnx.x86-%{version}.tar.gz
-# NoSource0-md5:       0be3ce1990b811439d6f76b936595084
+Source0:       https://edge.dropboxstatic.com/dbx-releng/client/%{name}-lnx.x86-%{version}.tar.gz
+# NoSource0-md5:       a8b605277aaafaf9303a6a21ec15a041
 NoSource:      0
-Source1:       http://dl-web.dropbox.com/u/17/%{name}-lnx.x86_64-%{version}.tar.gz
-# NoSource1-md5:       12bd23402fa69996d95730b87d4e39b2
+Source1:       https://edge.dropboxstatic.com/dbx-releng/client/%{name}-lnx.x86_64-%{version}.tar.gz
+# NoSource1-md5:       2b619997b08296671ed51f83415c7814
 NoSource:      1
-URL:           http://www.dropbox.com/
+URL:           https://www.dropbox.com/
 BuildRequires: rpmbuild(macros) >= 1.566
 BuildRequires: sed >= 4.0
 BuildRequires: tar >= 1:1.15.1
@@ -33,11 +38,13 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 # generate no Provides from private modules
 %define                _noautoprovfiles        %{_libdir}/%{name}
 
-# libicu-42, but pld th already has 54
+# libicu-42, but pld th already has 59+
 %define                icu_libs        libicudata.so.42 libicui18n.so.42 libicuuc.so.42
 
+%define                qt_libs         libQt5(Core|DBus|Gui|Network|OpenGL|PrintSupport|Qml|Quick|Sql|WebKit|WebKitWidgets|Widgets|XcbQpa).so.5 libqxcb.so
+
 # provided by package itself, but autodeps disabled
-%define                _noautoreq              libwx_.*.so %{icu_libs} libffi.so.6 librsync.so.1
+%define                _noautoreq              libwx_.*.so %{icu_libs} %{!?system_qt:%{qt_libs}} librsync.so.1 libdropbox_core.so libdropbox_tprt.so
 
 # a zip and executable at the same time
 %define                _noautostrip    .*/library.zip\\|.*/dropbox
@@ -83,37 +90,38 @@ mv dropbox-lnx.*-%{version}/* .
 # libraries to be taken from system
 # for a in *.so*; do ls -ld /lib64/$a /us?/lib64/$a; done 2>/dev/null
 %{__rm} libpopt.so.0 libdrm.so.2 libGL.so.1
-%{__rm} libffi.so.6
 %{__rm} libX11-xcb.so.1
+%{__rm} libffi.so.7*
+%if %{with system_qt}
 %{__rm} libQt5{Core,DBus,Gui,Network,OpenGL,PrintSupport,Qml,Quick,Sql,WebKit,WebKitWidgets,Widgets,XcbQpa}.so.5
 %{__rm} qt.conf
 %{__rm} -r plugins
+%endif
 
 # keep librsync, won't finish syncing if not using upstream copy
-test -f librsync.so.1
+#test -f librsync.so.1
 
-# fun, let's delete non-linux files from archive
-unzip -l library.zip | \
+%if %{with rewrite_zip}
+# For fun, let's delete non-Linux files from archive
+d=.delete-lib.txt
+unzip -l python-packages.zip | \
        grep -E '(arch|dropbox)/(mac|win32)|_(win32|mac)\.py|pymac|ui/cocoa|unittest' | \
        grep -vE 'pymac/(__init__|constants|types|lazydll|lazyframework)\.py' | \
-       grep -vE 'dropbox/mac/(version|__init__).py' | \
-       awk '{print $NF}' > lib.delete
-zip library.zip -d $(cat lib.delete)
-
-# make into symlink, looks cleaner than hardlink:
-# we can attach executable attrs to binary and leave no attrs for symlink in
-# %files section.
-ln -sf dropbox library.zip
+       grep -vE 'dropbox/mac/(version|__init__)\.py' | \
+       grep -vE 'dropbox/win32/(__init__|microsoft_store)\.py' | \
+       grep -vF 'dropbox/client/features/files/local/operations/_mac.py' | \
+       awk '{print $NF}' > $d
+zip python-packages.zip -d $(cat $d)
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT%{_bindir}
-ln -s %{_libdir}/%{name}/dropboxd $RPM_BUILD_ROOT%{_bindir}/dropboxd
+ln -s --relative %{_libdir}/%{name}/dropboxd $RPM_BUILD_ROOT%{_bindir}/dropboxd
 
 # install everything else
 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
-cp -a . $RPM_BUILD_ROOT%{_libdir}/%{name}
-%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/lib.delete
+cp -a * $RPM_BUILD_ROOT%{_libdir}/%{name}
 
 # in doc
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/{ACKNOWLEDGEMENTS,VERSION,README}
@@ -126,28 +134,48 @@ rm -rf $RPM_BUILD_ROOT
 %doc ACKNOWLEDGEMENTS VERSION README
 %attr(755,root,root) %{_bindir}/dropboxd
 %dir %{_libdir}/%{name}
-%attr(755,root,root) %{_libdir}/%{name}/*.so*
+%attr(755,root,root) %{_libdir}/%{name}/*-linux-gnu.so
 %attr(755,root,root) %{_libdir}/%{name}/dropbox
 %attr(755,root,root) %{_libdir}/%{name}/dropboxd
-%{_libdir}/%{name}/library.zip
-
-%{_libdir}/%{name}/dropbox_sqlite_ext-*-py*.egg
-%{_libdir}/%{name}/psutil-*-py*.egg
-%{_libdir}/%{name}/setuptools-*-py*.egg
+%attr(755,root,root) %{_libdir}/%{name}/libatomic.so.1
+%attr(755,root,root) %{_libdir}/%{name}/libdropbox_core.so
+%attr(755,root,root) %{_libdir}/%{name}/libdropbox_sqlite_ext.so
+%attr(755,root,root) %{_libdir}/%{name}/libdropbox_tprt.so
+%attr(755,root,root) %{_libdir}/%{name}/libicudata.so.*
+%attr(755,root,root) %{_libdir}/%{name}/libicui18n.so.*
+%attr(755,root,root) %{_libdir}/%{name}/libicuuc.so.*
+%attr(755,root,root) %{_libdir}/%{name}/libpython3.8.so.*.*
+%{_libdir}/%{name}/python-packages.zip
 
 # need +x bits for .so files
 %defattr(-,root,root,-)
-%{_libdir}/%{name}/cryptography-*-py*-linux-*.egg
 
 # GUI parts
 %exclude %{_libdir}/%{name}/PyQt5.*.so
-%exclude %{_libdir}/%{name}/dbus.mainloop.pyqt5.so
 
 %files gui
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/%{name}/wmctrl
+%if %{without system_qt}
+%{_libdir}/%{name}/qt.conf
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Core.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5DBus.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Gui.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Network.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5OpenGL.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5PrintSupport.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Qml.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Quick.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Sql.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5WebKit.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5WebKitWidgets.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5Widgets.so.5
+%attr(755,root,root) %{_libdir}/%{name}/libQt5XcbQpa.so.5
+%dir %{_libdir}/%{name}/plugins
+%dir %{_libdir}/%{name}/plugins/platforms
+%attr(755,root,root) %{_libdir}/%{name}/plugins/platforms/libqxcb.so
+%endif
 %attr(755,root,root) %{_libdir}/%{name}/PyQt5.*.so
-%attr(755,root,root) %{_libdir}/%{name}/dbus.mainloop.pyqt5.so
+%attr(755,root,root) %{_libdir}/%{name}/wmctrl
 %dir %{_libdir}/%{name}/images
 %{_libdir}/%{name}/images/emblems
 %{_libdir}/%{name}/images/hicolor
This page took 0.353633 seconds and 4 git commands to generate.