]> git.pld-linux.org Git - packages/dropbox.git/blame - dropbox.spec
Up to 157.4.4808
[packages/dropbox.git] / dropbox.spec
CommitLineData
b464b71c
ER
1#
2# Conditional build:
3%bcond_with system_qt # Remove bundled Qt5
4%bcond_with rewrite_zip # Remove Python modules this platform has no use
5
eec680ba
ER
6# TODO
7# - avoid dropboxd relaunching itself with newer version if there's update available (disable auto updating):
8# glen 25034 19.9 1.5 1496132 81256 pts/46 Sl+ 11:02 1:02 /home/glen/.dropbox-dist/dropbox /newerversion
9dd470b7
ER
9# NOTES:
10# - Upstream Dropbox Support (https://www.dropbox.com/ticket)
77d2e1b5 11# - Release Notes (check new versions here): https://www.dropbox.com/release_notes
9dd470b7 12# - Download instructions (click the download link to find current version):
8527ceb7 13# https://www.dropbox.com/install-linux
84f5c3ef 14# http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall
da4b87b9
ER
15Summary: Sync and backup files between computers
16Name: dropbox
d78295a9 17# https://www.dropboxforum.com/hc/en-us/community/posts/206682016-New-Versioning-Scheme
97f51d93 18Version: 157.4.4808
8527ceb7 19Release: 1
da4b87b9
ER
20License: Proprietary
21Group: Daemons
8527ceb7 22Source0: https://edge.dropboxstatic.com/dbx-releng/client/%{name}-lnx.x86-%{version}.tar.gz
97f51d93 23# NoSource0-md5: a8b605277aaafaf9303a6a21ec15a041
da4b87b9 24NoSource: 0
8527ceb7 25Source1: https://edge.dropboxstatic.com/dbx-releng/client/%{name}-lnx.x86_64-%{version}.tar.gz
97f51d93 26# NoSource1-md5: 2b619997b08296671ed51f83415c7814
da4b87b9 27NoSource: 1
6cecb0b6 28URL: https://www.dropbox.com/
da4b87b9
ER
29BuildRequires: rpmbuild(macros) >= 1.566
30BuildRequires: sed >= 4.0
31BuildRequires: tar >= 1:1.15.1
6b9a4628 32BuildRequires: unzip
5fe51dfe 33BuildRequires: zip
8c0a6f53 34Conflicts: nautilus-dropbox < 0.6.3-2
da4b87b9
ER
35ExclusiveArch: %{ix86} %{x8664}
36BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38# generate no Provides from private modules
39%define _noautoprovfiles %{_libdir}/%{name}
40
6cecb0b6 41# libicu-42, but pld th already has 59+
d4b9c773
ER
42%define icu_libs libicudata.so.42 libicui18n.so.42 libicuuc.so.42
43
6d68e641
ER
44%define qt_libs libQt5(Core|DBus|Gui|Network|OpenGL|PrintSupport|Qml|Quick|Sql|WebKit|WebKitWidgets|Widgets|XcbQpa).so.5 libqxcb.so
45
da4b87b9 46# provided by package itself, but autodeps disabled
6d68e641 47%define _noautoreq libwx_.*.so %{icu_libs} %{!?system_qt:%{qt_libs}} librsync.so.1 libdropbox_core.so libdropbox_tprt.so
da4b87b9
ER
48
49# a zip and executable at the same time
50%define _noautostrip .*/library.zip\\|.*/dropbox
51
52# debuginfo wouldn't be useful
53%define _enable_debug_packages 0
54
b70c96ae 55# prelinked library, it is missing some cairo symbols
d4b9c773 56#define skip_post_check_so libwx_gtk2ud_core-2.8.so.0
b70c96ae 57
da4b87b9
ER
58%description
59Dropbox is software that syncs your files online and across your
60computers.
61
62Put your files into your Dropbox on one computer, and they'll be
63instantly available on any of your other computers that you've
64installed Dropbox on (Windows, Mac, and Linux too!) Because a copy of
65your files are stored on Dropbox's secure servers, you can also access
66them from any computer or mobile device using the Dropbox website.
67
eec680ba
ER
68%package gui
69Summary: Gtk+2 GUI of Dropbox
70Group: X11/Applications
71Requires: %{name} = %{version}-%{release}
72
73%description gui
74Gtk+2 Systray of Dropbox Daemon status.
75
da4b87b9
ER
76%prep
77%setup -qcT
78%ifarch %{ix86}
79%{__tar} --strip-components=1 -xzf %{SOURCE0}
80%endif
81%ifarch %{x8664}
82%{__tar} --strip-components=1 -xzf %{SOURCE1}
83%endif
27fd1422 84mv dropbox-lnx.*-%{version}/* .
da4b87b9 85
84f5c3ef 86# no need to package this
284b53dc
ER
87# altho system python is also 2.7, don't know how to enforce using it system libs
88#%{__rm} -r distribute-0.6.26-py2.7.egg
77d2e1b5
ER
89
90# libraries to be taken from system
d78295a9 91# for a in *.so*; do ls -ld /lib64/$a /us?/lib64/$a; done 2>/dev/null
2033761e 92%{__rm} libpopt.so.0 libdrm.so.2 libGL.so.1
d78295a9 93%{__rm} libX11-xcb.so.1
8527ceb7 94%{__rm} libffi.so.7*
b464b71c 95%if %{with system_qt}
d78295a9
ER
96%{__rm} libQt5{Core,DBus,Gui,Network,OpenGL,PrintSupport,Qml,Quick,Sql,WebKit,WebKitWidgets,Widgets,XcbQpa}.so.5
97%{__rm} qt.conf
98%{__rm} -r plugins
b464b71c 99%endif
84f5c3ef 100
3893feea 101# keep librsync, won't finish syncing if not using upstream copy
8527ceb7 102#test -f librsync.so.1
3893feea 103
b464b71c
ER
104%if %{with rewrite_zip}
105# For fun, let's delete non-Linux files from archive
5f7a680f 106d=.delete-lib.txt
f2abb7e5 107unzip -l python-packages.zip | \
8669a5fc
ER
108 grep -E '(arch|dropbox)/(mac|win32)|_(win32|mac)\.py|pymac|ui/cocoa|unittest' | \
109 grep -vE 'pymac/(__init__|constants|types|lazydll|lazyframework)\.py' | \
5f7a680f 110 grep -vE 'dropbox/mac/(version|__init__)\.py' | \
b464b71c 111 grep -vE 'dropbox/win32/(__init__|microsoft_store)\.py' | \
5f7a680f
ER
112 grep -vF 'dropbox/client/features/files/local/operations/_mac.py' | \
113 awk '{print $NF}' > $d
f2abb7e5 114zip python-packages.zip -d $(cat $d)
6cecb0b6 115%endif
bd07dff0 116
da4b87b9
ER
117%install
118rm -rf $RPM_BUILD_ROOT
119install -d $RPM_BUILD_ROOT%{_bindir}
97f51d93 120ln -s --relative %{_libdir}/%{name}/dropboxd $RPM_BUILD_ROOT%{_bindir}/dropboxd
da4b87b9
ER
121
122# install everything else
77d2e1b5 123install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
5f7a680f 124cp -a * $RPM_BUILD_ROOT%{_libdir}/%{name}
da4b87b9
ER
125
126# in doc
77d2e1b5 127%{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/{ACKNOWLEDGEMENTS,VERSION,README}
da4b87b9
ER
128
129%clean
130rm -rf $RPM_BUILD_ROOT
131
132%files
133%defattr(644,root,root,755)
14bae0cf 134%doc ACKNOWLEDGEMENTS VERSION README
da4b87b9 135%attr(755,root,root) %{_bindir}/dropboxd
77d2e1b5 136%dir %{_libdir}/%{name}
6cecb0b6 137%attr(755,root,root) %{_libdir}/%{name}/*-linux-gnu.so
77d2e1b5
ER
138%attr(755,root,root) %{_libdir}/%{name}/dropbox
139%attr(755,root,root) %{_libdir}/%{name}/dropboxd
f2abb7e5 140%attr(755,root,root) %{_libdir}/%{name}/libatomic.so.1
8527ceb7 141%attr(755,root,root) %{_libdir}/%{name}/libdropbox_core.so
6cecb0b6 142%attr(755,root,root) %{_libdir}/%{name}/libdropbox_sqlite_ext.so
08d27aed 143%attr(755,root,root) %{_libdir}/%{name}/libdropbox_tprt.so
6cecb0b6
ER
144%attr(755,root,root) %{_libdir}/%{name}/libicudata.so.*
145%attr(755,root,root) %{_libdir}/%{name}/libicui18n.so.*
146%attr(755,root,root) %{_libdir}/%{name}/libicuuc.so.*
97f51d93 147%attr(755,root,root) %{_libdir}/%{name}/libpython3.8.so.*.*
f2abb7e5 148%{_libdir}/%{name}/python-packages.zip
77d2e1b5 149
dbd4f1f7
ER
150# need +x bits for .so files
151%defattr(-,root,root,-)
dbd4f1f7 152
d4b9c773
ER
153# GUI parts
154%exclude %{_libdir}/%{name}/PyQt5.*.so
eec680ba
ER
155
156%files gui
157%defattr(644,root,root,755)
b464b71c
ER
158%if %{without system_qt}
159%{_libdir}/%{name}/qt.conf
160%attr(755,root,root) %{_libdir}/%{name}/libQt5Core.so.5
161%attr(755,root,root) %{_libdir}/%{name}/libQt5DBus.so.5
162%attr(755,root,root) %{_libdir}/%{name}/libQt5Gui.so.5
163%attr(755,root,root) %{_libdir}/%{name}/libQt5Network.so.5
164%attr(755,root,root) %{_libdir}/%{name}/libQt5OpenGL.so.5
165%attr(755,root,root) %{_libdir}/%{name}/libQt5PrintSupport.so.5
166%attr(755,root,root) %{_libdir}/%{name}/libQt5Qml.so.5
167%attr(755,root,root) %{_libdir}/%{name}/libQt5Quick.so.5
168%attr(755,root,root) %{_libdir}/%{name}/libQt5Sql.so.5
169%attr(755,root,root) %{_libdir}/%{name}/libQt5WebKit.so.5
170%attr(755,root,root) %{_libdir}/%{name}/libQt5WebKitWidgets.so.5
171%attr(755,root,root) %{_libdir}/%{name}/libQt5Widgets.so.5
172%attr(755,root,root) %{_libdir}/%{name}/libQt5XcbQpa.so.5
173%dir %{_libdir}/%{name}/plugins
174%dir %{_libdir}/%{name}/plugins/platforms
175%attr(755,root,root) %{_libdir}/%{name}/plugins/platforms/libqxcb.so
176%endif
d4b9c773 177%attr(755,root,root) %{_libdir}/%{name}/PyQt5.*.so
6cecb0b6 178%attr(755,root,root) %{_libdir}/%{name}/wmctrl
77d2e1b5
ER
179%dir %{_libdir}/%{name}/images
180%{_libdir}/%{name}/images/emblems
181%{_libdir}/%{name}/images/hicolor
e2a81b70 182%{_libdir}/%{name}/resources
This page took 0.086834 seconds and 4 git commands to generate.