2 # - shared lib is not versioned
3 # - can't build shared and static in same build. drop shared bcond
6 %bcond_without fuse # Build fuse mount helper
7 %bcond_without qt # Build reference Qt application
8 %bcond_without shared # Build shared library
9 %bcond_with static_libs # don't build static libraries
11 # build doesn't support both
16 Summary: Android File Transfer for Linux
17 Name: android-file-transfer
21 Group: X11/Applications
22 Source0: https://github.com/whoozle/android-file-transfer-linux/archive/v%{version}/%{name}-%{version}.tar.gz
23 # Source0-md5: 691142fdbea216676df27bfc94885f71
24 URL: https://whoozle.github.io/android-file-transfer-linux/
25 BuildRequires: build-essential
26 BuildRequires: cmake >= 2.8
27 %{?with_fuse:BuildRequires: libfuse-devel}
28 BuildRequires: libmagic-devel
29 BuildRequires: libstdc++-devel
31 BuildRequires: pkgconfig
32 BuildRequires: readline-devel
33 BuildRequires: rpmbuild(macros) >= 1.727
35 BuildRequires: Qt5Widgets-devel
36 BuildRequires: qt5-build
37 BuildRequires: qt5-qmake
40 Requires: %{name}-libs = %{version}-%{release}
42 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 Android File Transfer for Linux - reliable MTP client with
46 minimalistic UI similar to Android File Transfer for Mac.
49 - Simple Qt UI with progress dialogs.
50 - FUSE wrapper (If you'd prefer mounting your device), supporting
51 partial read/writes, allowing instant access to your files.
52 - No file size limits.
53 - Automatically renames album cover to make it visible from media
55 - USB 'Zerocopy' support found in recent Linux kernel (no user/kernel
57 - No extra dependencies (e.g. libptp/libmtp).
58 - Available as static/shared library.
59 - Command line tool (aft-mtp-cli)
62 Summary: Shared %{name} library
66 Shared %{name} library.
69 Summary: Static %{name} library
70 Summary(pl.UTF-8): Statyczna biblioteka %{name}
71 Group: Development/Libraries
74 Static %{name} library.
76 %description static -l pl.UTF-8
77 Statyczna biblioteka %{name}.
80 Summary: aft-mtp-mount fuse wrapper
83 Requires: %{name}-libs = %{version}-%{release}
87 FUSE wrapper (If you'd prefer mounting your device), supporting
88 partial read/writes, allowing instant access to your files.
92 Group: X11/Applications
94 Requires: %{name}-libs = %{version}-%{release}
96 Requires: desktop-file-utils
97 Requires: gtk-update-icon-cache
98 Requires: hicolor-icon-theme
104 %setup -q -n %{name}-linux-%{version}
110 -DBUILD_FUSE=%{!?with_fuse:OFF}%{?with_fuse:ON} \
111 -DBUILD_QT_UI=%{!?with_qt:OFF}%{?with_qt:ON} \
112 -DBUILD_SHARED_LIB=%{!?with_shared:OFF}%{?with_shared:ON} \
117 rm -rf $RPM_BUILD_ROOT
118 %ninja_install -C build
121 rm -rf $RPM_BUILD_ROOT
124 %update_desktop_database
125 %update_icon_cache hicolor
128 %update_desktop_database
129 %update_icon_cache hicolor
132 %defattr(644,root,root,755)
133 %attr(755,root,root) %{_bindir}/aft-mtp-cli
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/aft-mtp-mount
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_bindir}/android-file-transfer
145 %{_desktopdir}/android-file-transfer.desktop
146 %{_iconsdir}/hicolor/*/apps/android-file-transfer.png
147 %{_datadir}/metainfo/android-file-transfer.appdata.xml
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/libmtp-ng.so
156 %if %{with static_libs}
158 %defattr(644,root,root,755)
159 %{_libdir}/libmtp-ng-static.a