]> git.pld-linux.org Git - packages/android-file-transfer.git/blob - android-file-transfer.spec
- release 2 (by relup.sh)
[packages/android-file-transfer.git] / android-file-transfer.spec
1 # TODO
2 # - shared lib is not versioned
3 # - can't build shared and static in same build. drop shared bcond
4 #
5 # Conditional build:
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
10
11 # build doesn't support both
12 %if %{with shared}
13 %undefine static_libs
14 %endif
15
16 Summary:        Android File Transfer for Linux
17 Name:           android-file-transfer
18 Version:        3.4
19 Release:        2
20 License:        LGPLv2.1
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
30 BuildRequires:  ninja
31 BuildRequires:  pkgconfig
32 BuildRequires:  readline-devel
33 BuildRequires:  rpmbuild(macros) >= 1.727
34 %if %{with qt}
35 BuildRequires:  Qt5Widgets-devel
36 BuildRequires:  qt5-build
37 BuildRequires:  qt5-qmake
38 %endif
39 %if %{with shared}
40 Requires:       %{name}-libs = %{version}-%{release}
41 %endif
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %description
45 Android File Transfer for Linux - reliable MTP client with
46 minimalistic UI similar to Android File Transfer for Mac.
47
48 Features:
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
54   player.
55 - USB 'Zerocopy' support found in recent Linux kernel (no user/kernel
56   data copying)
57 - No extra dependencies (e.g. libptp/libmtp).
58 - Available as static/shared library.
59 - Command line tool (aft-mtp-cli)
60
61 %package libs
62 Summary:        Shared %{name} library
63 Group:          Libraries
64
65 %description libs
66 Shared %{name} library.
67
68 %package static
69 Summary:        Static %{name} library
70 Summary(pl.UTF-8):      Statyczna biblioteka %{name}
71 Group:          Development/Libraries
72
73 %description static
74 Static %{name} library.
75
76 %description static -l pl.UTF-8
77 Statyczna biblioteka %{name}.
78
79 %package fuse
80 Summary:        aft-mtp-mount fuse wrapper
81 Group:          Applications
82 %if %{with shared}
83 Requires:       %{name}-libs = %{version}-%{release}
84 %endif
85
86 %description fuse
87 FUSE wrapper (If you'd prefer mounting your device), supporting
88 partial read/writes, allowing instant access to your files.
89
90 %package qt
91 Summary:        Qt GUI
92 Group:          X11/Applications
93 %if %{with shared}
94 Requires:       %{name}-libs = %{version}-%{release}
95 %endif
96 Requires:       desktop-file-utils
97 Requires:       gtk-update-icon-cache
98 Requires:       hicolor-icon-theme
99
100 %description qt
101 Qt GUI.
102
103 %prep
104 %setup -q -n %{name}-linux-%{version}
105
106 %build
107 install -d build
108 cd build
109 %cmake -G Ninja \
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} \
113         ..
114 %ninja_build
115
116 %install
117 rm -rf $RPM_BUILD_ROOT
118 %ninja_install -C build
119
120 %clean
121 rm -rf $RPM_BUILD_ROOT
122
123 %post qt
124 %update_desktop_database
125 %update_icon_cache hicolor
126
127 %postun qt
128 %update_desktop_database
129 %update_icon_cache hicolor
130
131 %files
132 %defattr(644,root,root,755)
133 %attr(755,root,root) %{_bindir}/aft-mtp-cli
134
135 %if %{with fuse}
136 %files fuse
137 %defattr(644,root,root,755)
138 %attr(755,root,root) %{_bindir}/aft-mtp-mount
139 %endif
140
141 %if %{with qt}
142 %files qt
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
148 %endif
149
150 %if %{with shared}
151 %files libs
152 %defattr(644,root,root,755)
153 %attr(755,root,root) %{_libdir}/libmtp-ng.so
154 %endif
155
156 %if %{with static_libs}
157 %files static
158 %defattr(644,root,root,755)
159 %{_libdir}/libmtp-ng-static.a
160 %endif
This page took 0.087078 seconds and 4 git commands to generate.