]> git.pld-linux.org Git - packages/android-file-transfer.git/blame - android-file-transfer.spec
- release 2 (by relup.sh)
[packages/android-file-transfer.git] / android-file-transfer.spec
CommitLineData
010acf0c 1# TODO
8b71ca8d
ER
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
010acf0c
ER
16Summary: Android File Transfer for Linux
17Name: android-file-transfer
18Version: 3.4
980259f2 19Release: 2
010acf0c
ER
20License: LGPLv2.1
21Group: X11/Applications
22Source0: https://github.com/whoozle/android-file-transfer-linux/archive/v%{version}/%{name}-%{version}.tar.gz
23# Source0-md5: 691142fdbea216676df27bfc94885f71
24URL: https://whoozle.github.io/android-file-transfer-linux/
010acf0c 25BuildRequires: build-essential
8b71ca8d
ER
26BuildRequires: cmake >= 2.8
27%{?with_fuse:BuildRequires: libfuse-devel}
28BuildRequires: libmagic-devel
6c6c3756 29BuildRequires: libstdc++-devel
010acf0c 30BuildRequires: ninja
6c6c3756 31BuildRequires: pkgconfig
010acf0c
ER
32BuildRequires: readline-devel
33BuildRequires: rpmbuild(macros) >= 1.727
0c55280c
ER
34%if %{with qt}
35BuildRequires: Qt5Widgets-devel
36BuildRequires: qt5-build
37BuildRequires: qt5-qmake
38%endif
8b71ca8d
ER
39%if %{with shared}
40Requires: %{name}-libs = %{version}-%{release}
41%endif
010acf0c
ER
42BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44%description
45Android File Transfer for Linux - reliable MTP client with
46minimalistic UI similar to Android File Transfer for Mac.
47
48Features:
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
8b71ca8d
ER
61%package libs
62Summary: Shared %{name} library
63Group: Libraries
64
65%description libs
66Shared %{name} library.
67
68%package static
69Summary: Static %{name} library
70Summary(pl.UTF-8): Statyczna biblioteka %{name}
71Group: Development/Libraries
72
73%description static
74Static %{name} library.
75
76%description static -l pl.UTF-8
77Statyczna biblioteka %{name}.
78
724bec88
ER
79%package fuse
80Summary: aft-mtp-mount fuse wrapper
81Group: Applications
82%if %{with shared}
83Requires: %{name}-libs = %{version}-%{release}
84%endif
85
86%description fuse
87FUSE wrapper (If you'd prefer mounting your device), supporting
88partial read/writes, allowing instant access to your files.
89
0c55280c
ER
90%package qt
91Summary: Qt GUI
92Group: X11/Applications
724bec88
ER
93%if %{with shared}
94Requires: %{name}-libs = %{version}-%{release}
95%endif
d8b9bd55
ER
96Requires: desktop-file-utils
97Requires: gtk-update-icon-cache
98Requires: hicolor-icon-theme
0c55280c
ER
99
100%description qt
101Qt GUI.
102
010acf0c
ER
103%prep
104%setup -q -n %{name}-linux-%{version}
105
106%build
107install -d build
108cd build
8b71ca8d
ER
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 ..
010acf0c
ER
114%ninja_build
115
116%install
117rm -rf $RPM_BUILD_ROOT
118%ninja_install -C build
119
120%clean
121rm -rf $RPM_BUILD_ROOT
122
d8b9bd55
ER
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
010acf0c
ER
131%files
132%defattr(644,root,root,755)
133%attr(755,root,root) %{_bindir}/aft-mtp-cli
724bec88
ER
134
135%if %{with fuse}
136%files fuse
137%defattr(644,root,root,755)
010acf0c 138%attr(755,root,root) %{_bindir}/aft-mtp-mount
724bec88 139%endif
0c55280c 140
724bec88 141%if %{with qt}
0c55280c
ER
142%files qt
143%defattr(644,root,root,755)
010acf0c 144%attr(755,root,root) %{_bindir}/android-file-transfer
010acf0c 145%{_desktopdir}/android-file-transfer.desktop
d8b9bd55 146%{_iconsdir}/hicolor/*/apps/android-file-transfer.png
010acf0c 147%{_datadir}/metainfo/android-file-transfer.appdata.xml
0c55280c 148%endif
8b71ca8d
ER
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.105216 seconds and 5 git commands to generate.