]>
Commit | Line | Data |
---|---|---|
e4496910 ER |
1 | # |
2 | # Conditional build: | |
e03499dd ER |
3 | %bcond_without ffmpeg # build with ffmpeg for thumbnails and previews |
4 | %bcond_without freeimage # build with freeimage to manage thumbnails/previews | |
f7ed37d0 ER |
5 | %bcond_without fuse # build megafuse |
6 | %bcond_without libmediainfo # build with libmediainfo for media file attributes | |
e4496910 | 7 | |
87cee7c0 ER |
8 | Summary: Command Line Interactive and Scriptable Application to access MEGA |
9 | Name: megacmd | |
a38be195 | 10 | Version: 1.0.0 |
f3c91bd4 | 11 | Release: 2 |
c1b11adc ER |
12 | # https://github.com/meganz/MEGAcmd/commit/b366c77370c277223be123e05e5ef15fafbce185#r31261647 |
13 | License: BSD 2-Clause "Simplified" License | |
87cee7c0 ER |
14 | Group: Applications |
15 | Source0: https://github.com/meganz/MEGAcmd/archive/%{version}/%{name}-%{version}.tar.gz | |
a38be195 ER |
16 | # Source0-md5: 8af6215ce167b15b92f8683c4c1caa7c |
17 | Source1: https://github.com/meganz/sdk/archive/f3a3b810/mega-sdk-v3.4.0-216-gf3a3b810.tar.gz | |
18 | # Source1-md5: dccc60aa2ac5680a719b74bc0968984f | |
8eb3178f | 19 | Patch0: libtool.patch |
87cee7c0 | 20 | URL: https://mega.nz/ |
e03499dd | 21 | %{?with_freeimage:BuildRequires: FreeImage-devel} |
b33e7950 ER |
22 | BuildRequires: autoconf |
23 | BuildRequires: automake | |
24 | BuildRequires: c-ares-devel | |
b33e7950 | 25 | BuildRequires: cryptopp-devel |
f7ed37d0 | 26 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} |
e4496910 | 27 | %{?with_fuse:BuildRequires: libfuse-devel} |
7b4a00eb | 28 | %{?with_mediainfo:BuildRequires: libmediainfo-devel} |
b33e7950 ER |
29 | BuildRequires: libraw-devel |
30 | BuildRequires: libsodium-devel | |
31 | BuildRequires: libstdc++-devel | |
32 | BuildRequires: libtool | |
33 | BuildRequires: libuv-devel | |
b33e7950 ER |
34 | BuildRequires: openssl-devel |
35 | BuildRequires: pcre-cxx-devel | |
36 | BuildRequires: pcre-devel | |
37 | BuildRequires: pkgconfig | |
38 | BuildRequires: readline-devel | |
39 | BuildRequires: sqlite3-devel | |
40 | BuildRequires: zlib-devel | |
8e4e3a4f | 41 | Requires: %{name}-libs = %{version}-%{release} |
87cee7c0 ER |
42 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
43 | ||
44 | %description | |
45 | MEGAcmd provides non UI access to MEGA services. It intends to offer | |
46 | all the functionality with your MEGA account via commands. It features | |
47 | synchronization and backup of local folders into your MEGA account. | |
48 | ||
8e4e3a4f ER |
49 | %package libs |
50 | Summary: Shared libmega library | |
51 | Group: Libraries | |
e4496910 | 52 | Requires: %{name}-libs = %{version}-%{release} |
8e4e3a4f ER |
53 | |
54 | %description libs | |
55 | Shared libmega library. | |
56 | ||
57 | %package devel | |
58 | Summary: Header files for %{name} library | |
59 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
60 | Group: Development/Libraries | |
61 | Requires: %{name}-libs = %{version}-%{release} | |
62 | ||
63 | %description devel | |
64 | Header files for %{name} library. | |
65 | ||
66 | %description devel -l pl.UTF-8 | |
67 | Pliki nagłówkowe biblioteki %{name}. | |
68 | ||
e4496910 ER |
69 | %package fuse |
70 | Summary: megafuse | |
71 | Group: Libraries | |
72 | ||
73 | %description fuse | |
74 | megafuse. | |
75 | ||
87cee7c0 ER |
76 | %prep |
77 | %setup -q -n MEGAcmd-%{version} -a1 | |
78 | mv sdk-*/* sdk | |
79 | %patch0 -p1 | |
80 | ||
81 | %build | |
82 | autoreconf -vif | |
83 | %configure \ | |
cce502db | 84 | ac_cv_prog_HAVE_CPPCHECK=/usr/bin/cppcheck \ |
f7ed37d0 | 85 | %{__with_without ffmpeg} \ |
e03499dd | 86 | %{__with_without freeimage} \ |
6773bcd0 | 87 | %{__with_without fuse} \ |
7b4a00eb | 88 | %{__with_without libmediainfo} \ |
87cee7c0 ER |
89 | --disable-silent-rules |
90 | %{__make} | |
91 | ||
92 | %install | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | %{__make} install \ | |
95 | DESTDIR=$RPM_BUILD_ROOT | |
96 | ||
8e4e3a4f ER |
97 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libmega.la |
98 | ||
87cee7c0 ER |
99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
101 | ||
8e4e3a4f ER |
102 | %post libs -p /sbin/ldconfig |
103 | %postun libs -p /sbin/ldconfig | |
104 | ||
87cee7c0 ER |
105 | %files |
106 | %defattr(644,root,root,755) | |
8e4e3a4f ER |
107 | %doc README.md LICENSE |
108 | /etc/bash_completion.d/megacmd_completion.sh | |
109 | %attr(755,root,root) %{_bindir}/mega-attr | |
110 | %attr(755,root,root) %{_bindir}/mega-backup | |
111 | %attr(755,root,root) %{_bindir}/mega-cancel | |
112 | %attr(755,root,root) %{_bindir}/mega-cd | |
113 | %attr(755,root,root) %{_bindir}/mega-cmd | |
114 | %attr(755,root,root) %{_bindir}/mega-cmd-server | |
115 | %attr(755,root,root) %{_bindir}/mega-confirm | |
116 | %attr(755,root,root) %{_bindir}/mega-confirmcancel | |
117 | %attr(755,root,root) %{_bindir}/mega-cp | |
118 | %attr(755,root,root) %{_bindir}/mega-debug | |
119 | %attr(755,root,root) %{_bindir}/mega-deleteversions | |
120 | %attr(755,root,root) %{_bindir}/mega-du | |
121 | %attr(755,root,root) %{_bindir}/mega-errorcode | |
122 | %attr(755,root,root) %{_bindir}/mega-exclude | |
123 | %attr(755,root,root) %{_bindir}/mega-exec | |
124 | %attr(755,root,root) %{_bindir}/mega-export | |
125 | %attr(755,root,root) %{_bindir}/mega-find | |
126 | %attr(755,root,root) %{_bindir}/mega-ftp | |
127 | %attr(755,root,root) %{_bindir}/mega-get | |
128 | %attr(755,root,root) %{_bindir}/mega-graphics | |
129 | %attr(755,root,root) %{_bindir}/mega-help | |
130 | %attr(755,root,root) %{_bindir}/mega-https | |
131 | %attr(755,root,root) %{_bindir}/mega-import | |
132 | %attr(755,root,root) %{_bindir}/mega-invite | |
133 | %attr(755,root,root) %{_bindir}/mega-ipc | |
134 | %attr(755,root,root) %{_bindir}/mega-killsession | |
135 | %attr(755,root,root) %{_bindir}/mega-lcd | |
136 | %attr(755,root,root) %{_bindir}/mega-log | |
137 | %attr(755,root,root) %{_bindir}/mega-login | |
138 | %attr(755,root,root) %{_bindir}/mega-logout | |
139 | %attr(755,root,root) %{_bindir}/mega-lpwd | |
140 | %attr(755,root,root) %{_bindir}/mega-ls | |
141 | %attr(755,root,root) %{_bindir}/mega-mkdir | |
142 | %attr(755,root,root) %{_bindir}/mega-mount | |
143 | %attr(755,root,root) %{_bindir}/mega-mv | |
144 | %attr(755,root,root) %{_bindir}/mega-passwd | |
145 | %attr(755,root,root) %{_bindir}/mega-permissions | |
146 | %attr(755,root,root) %{_bindir}/mega-preview | |
147 | %attr(755,root,root) %{_bindir}/mega-put | |
148 | %attr(755,root,root) %{_bindir}/mega-pwd | |
149 | %attr(755,root,root) %{_bindir}/mega-quit | |
150 | %attr(755,root,root) %{_bindir}/mega-reload | |
151 | %attr(755,root,root) %{_bindir}/mega-rm | |
152 | %attr(755,root,root) %{_bindir}/mega-session | |
153 | %attr(755,root,root) %{_bindir}/mega-share | |
154 | %attr(755,root,root) %{_bindir}/mega-showpcr | |
155 | %attr(755,root,root) %{_bindir}/mega-signup | |
156 | %attr(755,root,root) %{_bindir}/mega-speedlimit | |
157 | %attr(755,root,root) %{_bindir}/mega-sync | |
158 | %attr(755,root,root) %{_bindir}/mega-thumbnail | |
159 | %attr(755,root,root) %{_bindir}/mega-transfers | |
160 | %attr(755,root,root) %{_bindir}/mega-userattr | |
161 | %attr(755,root,root) %{_bindir}/mega-users | |
162 | %attr(755,root,root) %{_bindir}/mega-version | |
163 | %attr(755,root,root) %{_bindir}/mega-webdav | |
164 | %attr(755,root,root) %{_bindir}/mega-whoami | |
165 | %attr(755,root,root) %{_bindir}/megacli | |
8e4e3a4f ER |
166 | %attr(755,root,root) %{_bindir}/megasimplesync |
167 | ||
e4496910 ER |
168 | %if %{with fuse} |
169 | %files fuse | |
170 | %defattr(644,root,root,755) | |
171 | %attr(755,root,root) %{_bindir}/megafuse | |
172 | %endif | |
173 | ||
8e4e3a4f ER |
174 | %files libs |
175 | %defattr(644,root,root,755) | |
f3c91bd4 ER |
176 | %attr(755,root,root) %{_libdir}/libmega.so.*.*.* |
177 | %attr(755,root,root) %ghost %{_libdir}/libmega.so.30401 | |
8e4e3a4f ER |
178 | |
179 | %files devel | |
180 | %defattr(644,root,root,755) | |
181 | %{_includedir}/mega | |
182 | %{_includedir}/mega.h | |
183 | %{_includedir}/megaapi.h | |
184 | %{_includedir}/megaapi_impl.h | |
185 | %{_libdir}/libmega.so | |
186 | %{_pkgconfigdir}/libmega.pc |