]> git.pld-linux.org Git - packages/dropbox.git/blob - dropbox.spec
Up to 157.4.4808
[packages/dropbox.git] / dropbox.spec
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
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
9 # NOTES:
10 # - Upstream Dropbox Support (https://www.dropbox.com/ticket)
11 # - Release Notes (check new versions here): https://www.dropbox.com/release_notes
12 # - Download instructions (click the download link to find current version):
13 #   https://www.dropbox.com/install-linux
14 #   http://wiki.dropbox.com/TipsAndTricks/TextBasedLinuxInstall
15 Summary:        Sync and backup files between computers
16 Name:           dropbox
17 # https://www.dropboxforum.com/hc/en-us/community/posts/206682016-New-Versioning-Scheme
18 Version:        157.4.4808
19 Release:        1
20 License:        Proprietary
21 Group:          Daemons
22 Source0:        https://edge.dropboxstatic.com/dbx-releng/client/%{name}-lnx.x86-%{version}.tar.gz
23 # NoSource0-md5:        a8b605277aaafaf9303a6a21ec15a041
24 NoSource:       0
25 Source1:        https://edge.dropboxstatic.com/dbx-releng/client/%{name}-lnx.x86_64-%{version}.tar.gz
26 # NoSource1-md5:        2b619997b08296671ed51f83415c7814
27 NoSource:       1
28 URL:            https://www.dropbox.com/
29 BuildRequires:  rpmbuild(macros) >= 1.566
30 BuildRequires:  sed >= 4.0
31 BuildRequires:  tar >= 1:1.15.1
32 BuildRequires:  unzip
33 BuildRequires:  zip
34 Conflicts:      nautilus-dropbox < 0.6.3-2
35 ExclusiveArch:  %{ix86} %{x8664}
36 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37
38 # generate no Provides from private modules
39 %define         _noautoprovfiles        %{_libdir}/%{name}
40
41 # libicu-42, but pld th already has 59+
42 %define         icu_libs        libicudata.so.42 libicui18n.so.42 libicuuc.so.42
43
44 %define         qt_libs         libQt5(Core|DBus|Gui|Network|OpenGL|PrintSupport|Qml|Quick|Sql|WebKit|WebKitWidgets|Widgets|XcbQpa).so.5 libqxcb.so
45
46 # provided by package itself, but autodeps disabled
47 %define         _noautoreq              libwx_.*.so %{icu_libs} %{!?system_qt:%{qt_libs}} librsync.so.1 libdropbox_core.so libdropbox_tprt.so
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
55 # prelinked library, it is missing some cairo symbols
56 #define         skip_post_check_so      libwx_gtk2ud_core-2.8.so.0
57
58 %description
59 Dropbox is software that syncs your files online and across your
60 computers.
61
62 Put your files into your Dropbox on one computer, and they'll be
63 instantly available on any of your other computers that you've
64 installed Dropbox on (Windows, Mac, and Linux too!) Because a copy of
65 your files are stored on Dropbox's secure servers, you can also access
66 them from any computer or mobile device using the Dropbox website.
67
68 %package gui
69 Summary:        Gtk+2 GUI of Dropbox
70 Group:          X11/Applications
71 Requires:       %{name} = %{version}-%{release}
72
73 %description gui
74 Gtk+2 Systray of Dropbox Daemon status.
75
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
84 mv dropbox-lnx.*-%{version}/* .
85
86 # no need to package this
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
89
90 # libraries to be taken from system
91 # for a in *.so*; do ls -ld /lib64/$a /us?/lib64/$a; done 2>/dev/null
92 %{__rm} libpopt.so.0 libdrm.so.2 libGL.so.1
93 %{__rm} libX11-xcb.so.1
94 %{__rm} libffi.so.7*
95 %if %{with system_qt}
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
99 %endif
100
101 # keep librsync, won't finish syncing if not using upstream copy
102 #test -f librsync.so.1
103
104 %if %{with rewrite_zip}
105 # For fun, let's delete non-Linux files from archive
106 d=.delete-lib.txt
107 unzip -l python-packages.zip | \
108         grep -E '(arch|dropbox)/(mac|win32)|_(win32|mac)\.py|pymac|ui/cocoa|unittest' | \
109         grep -vE 'pymac/(__init__|constants|types|lazydll|lazyframework)\.py' | \
110         grep -vE 'dropbox/mac/(version|__init__)\.py' | \
111         grep -vE 'dropbox/win32/(__init__|microsoft_store)\.py' | \
112         grep -vF 'dropbox/client/features/files/local/operations/_mac.py' | \
113         awk '{print $NF}' > $d
114 zip python-packages.zip -d $(cat $d)
115 %endif
116
117 %install
118 rm -rf $RPM_BUILD_ROOT
119 install -d $RPM_BUILD_ROOT%{_bindir}
120 ln -s --relative %{_libdir}/%{name}/dropboxd $RPM_BUILD_ROOT%{_bindir}/dropboxd
121
122 # install everything else
123 install -d $RPM_BUILD_ROOT%{_libdir}/%{name}
124 cp -a * $RPM_BUILD_ROOT%{_libdir}/%{name}
125
126 # in doc
127 %{__rm} $RPM_BUILD_ROOT%{_libdir}/%{name}/{ACKNOWLEDGEMENTS,VERSION,README}
128
129 %clean
130 rm -rf $RPM_BUILD_ROOT
131
132 %files
133 %defattr(644,root,root,755)
134 %doc ACKNOWLEDGEMENTS VERSION README
135 %attr(755,root,root) %{_bindir}/dropboxd
136 %dir %{_libdir}/%{name}
137 %attr(755,root,root) %{_libdir}/%{name}/*-linux-gnu.so
138 %attr(755,root,root) %{_libdir}/%{name}/dropbox
139 %attr(755,root,root) %{_libdir}/%{name}/dropboxd
140 %attr(755,root,root) %{_libdir}/%{name}/libatomic.so.1
141 %attr(755,root,root) %{_libdir}/%{name}/libdropbox_core.so
142 %attr(755,root,root) %{_libdir}/%{name}/libdropbox_sqlite_ext.so
143 %attr(755,root,root) %{_libdir}/%{name}/libdropbox_tprt.so
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.*
147 %attr(755,root,root) %{_libdir}/%{name}/libpython3.8.so.*.*
148 %{_libdir}/%{name}/python-packages.zip
149
150 # need +x bits for .so files
151 %defattr(-,root,root,-)
152
153 # GUI parts
154 %exclude %{_libdir}/%{name}/PyQt5.*.so
155
156 %files gui
157 %defattr(644,root,root,755)
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
177 %attr(755,root,root) %{_libdir}/%{name}/PyQt5.*.so
178 %attr(755,root,root) %{_libdir}/%{name}/wmctrl
179 %dir %{_libdir}/%{name}/images
180 %{_libdir}/%{name}/images/emblems
181 %{_libdir}/%{name}/images/hicolor
182 %{_libdir}/%{name}/resources
This page took 0.143156 seconds and 4 git commands to generate.