]> git.pld-linux.org Git - packages/dar.git/blob - dar.spec
- more static libs
[packages/dar.git] / dar.spec
1 #
2 # Conditional build:
3 %bcond_without  xattr           # support for Linux extented attributes
4 %bcond_without  static          # dar_static program
5 %bcond_without  static_libs     # static library (required for dar_static)
6 %bcond_without  threads         # threading using libthreadar library
7 %bcond_without  python          # CPython (3.x) binding
8 #
9 %if %{without static_libs}
10 %undefine       with_static
11 %endif
12 #
13 Summary:        dar makes backup of a directory tree and files
14 Summary(pl.UTF-8):      dar - narzędzie do tworzenia kopii zapasowych drzew katalogów i plików
15 Name:           dar
16 Version:        2.7.14
17 Release:        1
18 License:        GPL v2+
19 Group:          Applications/Archiving
20 Source0:        https://downloads.sourceforge.net/dar/%{name}-%{version}.tar.gz
21 # Source0-md5:  268f9e3c799eff1fcc2881baf7e45beb
22 Patch0:         %{name}-opt.patch
23 URL:            http://dar.linux.free.fr/
24 %{?with_xattr:BuildRequires:    attr-devel >= 2.4.16-3}
25 BuildRequires:  autoconf >= 2.69
26 BuildRequires:  automake
27 BuildRequires:  bzip2-devel
28 BuildRequires:  curl-devel
29 BuildRequires:  doxygen >= 1:1.3
30 BuildRequires:  e2fsprogs-devel
31 BuildRequires:  gettext-tools
32 BuildRequires:  gpgme-devel >= 1.2.0
33 BuildRequires:  groff
34 BuildRequires:  libargon2-devel
35 BuildRequires:  libcap-devel
36 BuildRequires:  libgcrypt-devel >= 1.6.0
37 BuildRequires:  libgpg-error-devel
38 BuildRequires:  librsync-devel
39 BuildRequires:  libstdc++-devel >= 6:5
40 %{?with_threads:BuildRequires:  libthreadar-devel >= 1.3.1}
41 BuildRequires:  libtool >= 2:1.4d
42 BuildRequires:  lz4-devel
43 BuildRequires:  lzo-devel >= 2
44 BuildRequires:  pkgconfig
45 %if %{with python}
46 BuildRequires:  python3-devel >= 1:3.2
47 BuildRequires:  python3-pybind11
48 %endif
49 BuildRequires:  sed >= 4.0
50 BuildRequires:  xz-devel
51 BuildRequires:  zlib-devel
52 BuildRequires:  zstd-devel >= 1.3
53 %if %{with static}
54 %{?with_xattr:BuildRequires:    attr-static}
55 BuildRequires:  bzip2-static
56 BuildRequires:  curl-static
57 BuildRequires:  glibc-static
58 BuildRequires:  gpgme-static
59 BuildRequires:  libargon2-static
60 BuildRequires:  libassuan-static
61 BuildRequires:  libgcrypt-static
62 BuildRequires:  libgpg-error-static
63 BuildRequires:  librsync-static
64 BuildRequires:  libstdc++-static >= 6:5
65 %{?with_threads:BuildRequires:  libthreadar-static >= 1.3.1}
66 BuildRequires:  lz4-static
67 BuildRequires:  lzo-static
68 BuildRequires:  xz-static
69 BuildRequires:  zlib-static
70 BuildRequires:  zstd-static >= 1.3
71 %endif
72 Requires:       %{name}-libs = %{version}-%{release}
73 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
75 # don't generate `Requires' for sample scripts
76 %define _noautoreq bash perl
77
78 %description
79 dar is a shell command, that makes backup of a directory tree and
80 files.
81
82 FILTERS: dar is able to backup from total file system to a single
83 file. Additionally a mechanism of filters permits, based on the
84 filename, to exclude or include some files while backing up or
85 restoring a directory tree. In the other side, a secondary filter
86 mechanism permits to exclude some branches of a directory tree, or to
87 only include some branches.
88
89 DIFFERENTIAL BACKUP: When making a backup with dar, you have the
90 possibility to make a full backup or a differential backup. A full
91 backup, as expected makes backup of all files as specified on the
92 command line (with or without filters). Instead, a differential
93 backup, (over filter mechanism), saves only files that have changed
94 since a given reference backup. Additionally, files that existed in
95 the reference backup and which do no more exist at the time of the
96 differential backup are recorded in the backup. At recovery time,
97 (unless you deactivate it), restoring a differential backup will
98 update changed files and new files, but also remove files that have
99 been recorded as deleted. Note that the reference backup can be a full
100 backup or another differential backup. This way you can make a first
101 full backup, then many differential backup, each taking as reference
102 the last backup made.
103
104 SLICES: Dar stands for Disk ARchive. From the beginning it was
105 designed to be able to split an archive over several removable media
106 whatever their number is and whatever their size is. Thus dar is able
107 to save over old floppy disk, CD-R, DVD-R, CD-RW, DVD-RW, Zip, Jazz,
108 etc... Dar is not concerned by un/mounting a removable medium, instead
109 it is independent of hardware. Given the size, it will split the
110 archive in several files (called SLICES), eventually pausing before
111 creating the next one, allowing this way, the user to un/mount a
112 medium, burn the file on CD-R, send it by email (if your mail system
113 does not allow huge file in emails, dar can help you here also). By
114 default, (no size specified), dar will make one slice whatever its
115 size is. Additionally, the size of the first slice can be specified
116 separately, if for example you want first to fulfil a partially filled
117 disk before starting using empty ones. Last, at restoration time, dar
118 will just pause and prompt the user asking a slice only if it is
119 missing.
120
121 COMPRESSION: last, dar can use compression. By default no compression
122 is used. Actually only gzip algorithm is implemented, but some room
123 has been done for bzip2 and any other compression algorithm. Note
124 that, compression is made before slices, which means that using
125 compression with slices, will not make slices smaller, but will
126 probably make less slices in the backup.
127
128 DIRECT ACCESS: even using compression dar has not to read the whole
129 backup to extract one file. This way if you just want to restore one
130 file from a huge backup, the process will be much faster than using
131 tar. Dar first reads the catalogue (i.e. the contents of the backup),
132 then it goes directly to the location of the saved file(s) you want to
133 restore and proceed to restoration. In particular using slices dar
134 will ask only for the slice(s) containing the file(s) to restore.
135
136 HARD LINK CONSIDERATION: hard links are now properly saved. They are
137 properly restored if possible. If for example restoring across a
138 mounted filesystem, hard linking will fail, but dar will then
139 duplicate the inode and file content, issuing a warning.
140
141 EXTENDED ATTRIBUTES: support for extended attributes have to be
142 activated at compilation time (see INSTALL). Dar is able to save and
143 restore EA, all or just those of a given namespace (system or user).
144 If no EA have been saved and restoration occurs over a file that has
145 EA, they will be preserved. But if they have been saved empty for a
146 given file, any existing EA for that file will be removed at
147 restoration time, unless -u and/or -U is given on command-line.
148
149 ARCHIVE TESTING thanks to CRC (cyclic redundancy checks), dar is able
150 to detect data corruption in the archive. Only the file where data
151 corruption occurred will not be possible to restore, but dar will
152 restore the other even when compression is used.
153
154 USING PIPES dar is now able to produce an archive to its standard
155 output or named pipe. it is also able to read an archive through a
156 pair of pipes, to take a remote archive as reference, or even to
157 restore data from a remote archive. This way it is now possible to
158 store an archive remotely and in total security (if using encrypted
159 means)
160
161 ISOLATION the catalogue (i.e.: the contents of an archive), can be
162 extracted (this operation is called isolation) to a small file, that
163 can in turn be used as reference for differential archive. There is no
164 more need to provide an archive to be able to create a differential
165 backup over it, just its catalogue is necessary.
166
167 RE-SHAPE SLICES OF AN EXISTING ARCHIVE the external program named
168 "dar_xform" is able to change the size of slices of a given archive.
169 The resulting archive is totally identical to archives directly
170 created by dar. Source archive can be taken from a set of slice, from
171 standard input or even a named pipe.
172
173 %description -l pl.UTF-8
174 dar jest poleceniem powłoki, które tworzy kopie zapasowe drzew
175 katalogów i plików. Możliwości:
176 - Filtry: dar może tworzyć kopię zapasową całego systemu plików do
177   pojedynczego pliku; mechanizm filtrów pozwala wyłączać lub dołączać
178   pliki przy tworzeniu kopii lub odtwarzaniu z niej.
179 - Backup różnicowy: dar może tworzyć kopie pełne lub różnicowe
180   (zawierające tylko te pliki, które zmieniły się od innego backupu)
181 - Części (slices): dar oznacza "Disk ARchive". Od początku ma
182   możliwość dzielenia archiwów na różne nośniki wymienialne,
183   niezależnie od ich liczby i rozmiaru (można tworzyć kopie na CD-R,
184   DVD-R, CD-RW, Zip, Jazz...).
185 - Kompresja: domyślnie dar nie kompresuje danych; ma zaimplementowany
186   algorytm gzip, jest przygotowywany do bzip2 i innych. Kompresja jest
187   wykonywana przed podziałem na części.
188 - Bezpośredni dostęp: nawet w przypadku użycia kompresji, dar nie musi
189   czytać całej kopii aby odtworzyć jeden plik. Najpierw odczytuje
190   katalog, następnie skacze od razu do właściwego miejsca.
191 - Obsługa twardych dowiązań: dar zachowuje i odtwarza je w miarę
192   możliwości; w przypadku niemożliwości wykonania dowiązania, powiela
193   plik i wypisuje ostrzeżenie.
194 - Obsługa rozszerzonych atrybutów (zależnie od opcji kompilacji): dar
195   potrafi zachowywać i odtwarzać rozszerzone atrybuty - wszystkie lub
196   tylko dotyczące danej przestrzeni nazw (systemowej lub użytkownika).
197 - Testowanie archiwów: dzięki użyciu CRC dar wykrywa uszkodzone dane;
198   tylko uszkodzone pliki nie zostaną odtworzone, reszta tak - nawet w
199   przypadku użycia kompresji.
200 - Użycie rurek - dar może wyprodukować archiwum na standardowe wyjście
201   lub do nazwanej rurki. Może także czytać archiwum z pary rurek, a
202   nawet odtwarzać ze zdalnego archiwum.
203 - Rozdzielenie: katalog (zawartość archiwum) może być wyciągnięty do
204   małego pliku, który może być używany jako odniesienie dla
205   różnicowego backupu.
206 - Przekształcanie części istniejącego archiwum: zewnętrzny program o
207   nazwie dar_xform jest w stanie zmieniać rozmiary części podanego
208   archiwum. Może czytać z zestawu kawałków, standardowego wejścia lub
209   nazwanej rurki.
210
211 %package static
212 Summary:        Static version of dar backup tool
213 Summary(pl.UTF-8):      Statyczna wersja archiwizatora dar
214 Group:          Applications/Archiving
215
216 %description static
217 Static version of dar backup tool.
218
219 %description static -l pl.UTF-8
220 Statyczna wersja archiwizatora dar.
221
222 %package libs
223 Summary:        Shared version of dar library
224 Summary(pl.UTF-8):      Współdzielona wersja biblioteki dar
225 Group:          Libraries
226 %{?with_xattr:Requires: attr >= 2.4.16-3}
227 Requires:       gpgme >= 1.2.0
228 Requires:       libgcrypt >= 1.6.0
229 %{?with_threads:Requires:       libthreadar >= 1.3.1}
230 Requires:       zstd >= 1.3
231
232 %description libs
233 Shared version of dar library.
234
235 %description libs -l pl.UTF-8
236 Współdzielona wersja biblioteki dar.
237
238 %package devel
239 Summary:        Header files to develop dar software
240 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki dar
241 Group:          Development/Libraries
242 Requires:       %{name}-libs = %{version}-%{release}
243 %{?with_xattr:Requires: attr-devel >= 2.4.16-3}
244 Requires:       bzip2-devel
245 Requires:       gpgme-devel >= 1.2.0
246 Requires:       libargon2-devel
247 Requires:       libcap-devel
248 Requires:       libgcrypt-devel >= 1.6.0
249 Requires:       libgpg-error-devel
250 Requires:       librsync-devel
251 Requires:       libstdc++-devel >= 6:5
252 %{?with_threads:Requires:       libthreadar-devel >= 1.3.1}
253 Requires:       lz4-devel
254 Requires:       lzo-devel >= 2
255 Requires:       xz-devel
256 Requires:       zlib-devel
257 Requires:       zstd-devel >= 1.3
258
259 %description devel
260 Header files to develop software which operates on dar.
261
262 %description devel -l pl.UTF-8
263 Pliki nagłówkowe potrzebne do rozwoju oprogramowania korzystającego z
264 dara.
265
266 %package libs-static
267 Summary:        Static version of dar library
268 Summary(pl.UTF-8):      Statyczna wersja biblioteki dar
269 Group:          Development/Libraries
270 Requires:       %{name}-devel = %{version}-%{release}
271
272 %description libs-static
273 Static version of dar library.
274
275 %description libs-static -l pl.UTF-8
276 Statyczna wersja biblioteki dar.
277
278 %package doc
279 Summary:        dar - documentation
280 Summary(pl.UTF-8):      dar - dokumentacja
281 Group:          Documentation
282 Requires:       %{name} = %{version}-%{release}
283
284 %description doc
285 Dar ducumentation.
286
287 %description doc -l pl.UTF-8
288 Dokumentacja dla dar.
289
290 %package -n python3-libdar
291 Summary:        Python 3 binding for dar library
292 Summary(pl.UTF-8):      Wiązanie Pythona 3 do biblioteki dar
293 Group:          Libraries/Python
294 Requires:       %{name}-libs = %{version}-%{release}
295
296 %description -n python3-libdar
297 Python 3 binding for dar library.
298
299 %description -n python3-libdar -l pl.UTF-8
300 Wiązanie Pythona 3 do biblioteki dar.
301
302 %prep
303 %setup -q
304 %patch0 -p1
305
306 %{__sed} -i -e 's,\$(libdir)/python3/dist-packages,%{py3_sitedir},' src/python/Makefile.am
307
308 %build
309 %{__gettextize}
310 %{__libtoolize}
311 %{__aclocal}
312 %{__autoconf}
313 %{__autoheader}
314 %{__automake}
315 %configure \
316         %{!?with_static:--disable-dar-static} \
317         %{!?with_xattr:--disable-ea-support} \
318         --enable-mode=64 \
319         %{!?with_python:--disable-python-binding} \
320         --enable-static%{!?with_static_libs:=no} \
321         %{!?with_threads:--disable-threadar} \
322         --disable-upx
323 %{__make}
324
325 %install
326 rm -rf $RPM_BUILD_ROOT
327 %{?with_static:install -d $RPM_BUILD_ROOT/bin}
328
329 %{__make} install \
330         DESTDIR=$RPM_BUILD_ROOT
331
332 %{?with_static:%{__mv} $RPM_BUILD_ROOT{%{_bindir},/bin}/dar_static}
333
334 ln -sf %{_datadir}/%{name} misc/doc
335
336 # obsoleted by pkg-config
337 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libdar64.la
338
339 %{__rm} $RPM_BUILD_ROOT%{_datadir}/dar/{libdar_test.py,pybind11_libdar.cpp,python/libdar_test.py}
340
341 %find_lang %{name}
342
343 %clean
344 rm -rf $RPM_BUILD_ROOT
345
346 %post   libs -p /sbin/ldconfig
347 %postun libs -p /sbin/ldconfig
348
349 %files -f %{name}.lang
350 %defattr(644,root,root,755)
351 %doc AUTHORS ChangeLog NEWS README THANKS TODO misc/doc
352 %attr(755,root,root) %{_bindir}/dar*
353 %dir %{_datadir}/%{name}
354 %{_mandir}/man1/dar*.1*
355 %attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/darrc
356
357 %if %{with static}
358 %files static
359 %defattr(644,root,root,755)
360 %attr(755,root,root) /bin/dar_static
361 %endif
362
363 %files libs
364 %defattr(644,root,root,755)
365 %attr(755,root,root) %{_libdir}/libdar64.so.*.*.*
366 %attr(755,root,root) %ghost %{_libdir}/libdar64.so.6000
367
368 %files devel
369 %defattr(644,root,root,755)
370 %attr(755,root,root) %{_libdir}/libdar64.so
371 %{_includedir}/dar
372 %{_pkgconfigdir}/libdar64.pc
373
374 %if %{with static_libs}
375 %files libs-static
376 %defattr(644,root,root,755)
377 %{_libdir}/libdar64.a
378 %endif
379
380 %files doc
381 %defattr(644,root,root,755)
382 %{_datadir}/%{name}/html
383 %{_datadir}/%{name}/man
384 %{_datadir}/%{name}/mini-howto
385 %{_datadir}/%{name}/samples
386 %{_datadir}/%{name}/*.css
387 %{_datadir}/%{name}/*.dtd
388 %{_datadir}/%{name}/*.jpg
389 %{_datadir}/%{name}/*.html
390 %{_datadir}/%{name}/*.txt
391 %{_datadir}/%{name}/README
392
393 %if %{with python}
394 %files -n python3-libdar
395 %defattr(644,root,root,755)
396 %attr(755,root,root) %{py3_sitedir}/libdar.cpython-*.so
397 %endif
This page took 0.09748 seconds and 4 git commands to generate.