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