]> git.pld-linux.org Git - packages/dar.git/blame - dar.spec
- more static libs
[packages/dar.git] / dar.spec
CommitLineData
5f5a8b21 1#
2# Conditional build:
7f28cb4a 3%bcond_without xattr # support for Linux extented attributes
cd96d2aa 4%bcond_without static # dar_static program
7f28cb4a
JB
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
097d504f 8#
7f28cb4a
JB
9%if %{without static_libs}
10%undefine with_static
a5f8478f 11%endif
12#
fbe89be6 13Summary: dar makes backup of a directory tree and files
83798cfc 14Summary(pl.UTF-8): dar - narzędzie do tworzenia kopii zapasowych drzew katalogów i plików
fbe89be6 15Name: dar
7f28cb4a 16Version: 2.7.14
cd96d2aa
JB
17Release: 1
18License: GPL v2+
0e3cdb42 19Group: Applications/Archiving
7f28cb4a
JB
20Source0: https://downloads.sourceforge.net/dar/%{name}-%{version}.tar.gz
21# Source0-md5: 268f9e3c799eff1fcc2881baf7e45beb
097d504f 22Patch0: %{name}-opt.patch
fbe89be6 23URL: http://dar.linux.free.fr/
7f28cb4a 24%{?with_xattr:BuildRequires: attr-devel >= 2.4.16-3}
cd96d2aa 25BuildRequires: autoconf >= 2.69
097d504f 26BuildRequires: automake
efc8da18 27BuildRequires: bzip2-devel
7f28cb4a 28BuildRequires: curl-devel
e4cfcb7c 29BuildRequires: doxygen >= 1:1.3
c5440f43 30BuildRequires: e2fsprogs-devel
93d5d6ae 31BuildRequires: gettext-tools
cd96d2aa 32BuildRequires: gpgme-devel >= 1.2.0
853009b5 33BuildRequires: groff
7f28cb4a 34BuildRequires: libargon2-devel
cd96d2aa
JB
35BuildRequires: libcap-devel
36BuildRequires: libgcrypt-devel >= 1.6.0
0aa85ee6 37BuildRequires: libgpg-error-devel
7f28cb4a
JB
38BuildRequires: librsync-devel
39BuildRequires: libstdc++-devel >= 6:5
40%{?with_threads:BuildRequires: libthreadar-devel >= 1.3.1}
57d80953 41BuildRequires: libtool >= 2:1.4d
7f28cb4a 42BuildRequires: lz4-devel
cd96d2aa 43BuildRequires: lzo-devel >= 2
7f28cb4a
JB
44BuildRequires: pkgconfig
45%if %{with python}
46BuildRequires: python3-devel >= 1:3.2
47BuildRequires: python3-pybind11
48%endif
49BuildRequires: sed >= 4.0
cd96d2aa 50BuildRequires: xz-devel
efc8da18 51BuildRequires: zlib-devel
7f28cb4a 52BuildRequires: zstd-devel >= 1.3
42343508 53%if %{with static}
7f28cb4a 54%{?with_xattr:BuildRequires: attr-static}
efc8da18 55BuildRequires: bzip2-static
7cd544cd 56BuildRequires: curl-static
5f5a8b21 57BuildRequires: glibc-static
e4895387 58BuildRequires: gpgme-static
7cd544cd 59BuildRequires: libargon2-static
e4895387 60BuildRequires: libassuan-static
2a49a8ba 61BuildRequires: libgcrypt-static
62BuildRequires: libgpg-error-static
7f28cb4a
JB
63BuildRequires: librsync-static
64BuildRequires: libstdc++-static >= 6:5
65%{?with_threads:BuildRequires: libthreadar-static >= 1.3.1}
66BuildRequires: lz4-static
2a49a8ba 67BuildRequires: lzo-static
e4895387 68BuildRequires: xz-static
5f5a8b21 69BuildRequires: zlib-static
7f28cb4a 70BuildRequires: zstd-static >= 1.3
5f5a8b21 71%endif
5a9f3364 72Requires: %{name}-libs = %{version}-%{release}
fbe89be6 73BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
74
a5f8478f 75# don't generate `Requires' for sample scripts
76%define _noautoreq bash perl
77
fbe89be6 78%description
fbe89be6 79dar is a shell command, that makes backup of a directory tree and
80files.
81
82FILTERS: dar is able to backup from total file system to a single
83file. Additionally a mechanism of filters permits, based on the
84filename, to exclude or include some files while backing up or
85restoring a directory tree. In the other side, a secondary filter
86mechanism permits to exclude some branches of a directory tree, or to
87only include some branches.
88
89DIFFERENTIAL BACKUP: When making a backup with dar, you have the
90possibility to make a full backup or a differential backup. A full
91backup, as expected makes backup of all files as specified on the
92command line (with or without filters). Instead, a differential
93backup, (over filter mechanism), saves only files that have changed
94since a given reference backup. Additionally, files that existed in
95the reference backup and which do no more exist at the time of the
96differential backup are recorded in the backup. At recovery time,
97(unless you deactivate it), restoring a differential backup will
98update changed files and new files, but also remove files that have
99been recorded as deleted. Note that the reference backup can be a full
100backup or another differential backup. This way you can make a first
101full backup, then many differential backup, each taking as reference
102the last backup made.
103
104SLICES: Dar stands for Disk ARchive. From the beginning it was
105designed to be able to split an archive over several removable media
106whatever their number is and whatever their size is. Thus dar is able
107to save over old floppy disk, CD-R, DVD-R, CD-RW, DVD-RW, Zip, Jazz,
108etc... Dar is not concerned by un/mounting a removable medium, instead
109it is independent of hardware. Given the size, it will split the
110archive in several files (called SLICES), eventually pausing before
111creating the next one, allowing this way, the user to un/mount a
112medium, burn the file on CD-R, send it by email (if your mail system
113does not allow huge file in emails, dar can help you here also). By
114default, (no size specified), dar will make one slice whatever its
115size is. Additionally, the size of the first slice can be specified
116separately, if for example you want first to fulfil a partially filled
117disk before starting using empty ones. Last, at restoration time, dar
118will just pause and prompt the user asking a slice only if it is
119missing.
120
121COMPRESSION: last, dar can use compression. By default no compression
122is used. Actually only gzip algorithm is implemented, but some room
123has been done for bzip2 and any other compression algorithm. Note
124that, compression is made before slices, which means that using
125compression with slices, will not make slices smaller, but will
126probably make less slices in the backup.
127
128DIRECT ACCESS: even using compression dar has not to read the whole
129backup to extract one file. This way if you just want to restore one
130file from a huge backup, the process will be much faster than using
131tar. Dar first reads the catalogue (i.e. the contents of the backup),
132then it goes directly to the location of the saved file(s) you want to
133restore and proceed to restoration. In particular using slices dar
134will ask only for the slice(s) containing the file(s) to restore.
135
136HARD LINK CONSIDERATION: hard links are now properly saved. They are
137properly restored if possible. If for example restoring across a
138mounted filesystem, hard linking will fail, but dar will then
139duplicate the inode and file content, issuing a warning.
140
141EXTENDED ATTRIBUTES: support for extended attributes have to be
142activated at compilation time (see INSTALL). Dar is able to save and
143restore EA, all or just those of a given namespace (system or user).
144If no EA have been saved and restoration occurs over a file that has
145EA, they will be preserved. But if they have been saved empty for a
146given file, any existing EA for that file will be removed at
147restoration time, unless -u and/or -U is given on command-line.
148
149ARCHIVE TESTING thanks to CRC (cyclic redundancy checks), dar is able
150to detect data corruption in the archive. Only the file where data
151corruption occurred will not be possible to restore, but dar will
152restore the other even when compression is used.
153
154USING PIPES dar is now able to produce an archive to its standard
155output or named pipe. it is also able to read an archive through a
156pair of pipes, to take a remote archive as reference, or even to
157restore data from a remote archive. This way it is now possible to
158store an archive remotely and in total security (if using encrypted
159means)
160
161ISOLATION the catalogue (i.e.: the contents of an archive), can be
162extracted (this operation is called isolation) to a small file, that
163can in turn be used as reference for differential archive. There is no
164more need to provide an archive to be able to create a differential
165backup over it, just its catalogue is necessary.
166
167RE-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.
169The resulting archive is totally identical to archives directly
170created by dar. Source archive can be taken from a set of slice, from
171standard input or even a named pipe.
172
9b828d75
JR
173%description -l pl.UTF-8
174dar jest poleceniem powłoki, które tworzy kopie zapasowe drzew
175katalogó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ć
b0d714a3 178 pliki przy tworzeniu kopii lub odtwarzaniu z niej.
9b828d75
JR
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,
b0d714a3 184 DVD-R, CD-RW, Zip, Jazz...).
9b828d75 185- Kompresja: domyślnie dar nie kompresuje danych; ma zaimplementowany
b0d714a3 186 algorytm gzip, jest przygotowywany do bzip2 i innych. Kompresja jest
9b828d75
JR
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
b0d714a3
JB
209 nazwanej rurki.
210
5f5a8b21 211%package static
b67216c8 212Summary: Static version of dar backup tool
83798cfc 213Summary(pl.UTF-8): Statyczna wersja archiwizatora dar
23b7ee86 214Group: Applications/Archiving
5f5a8b21 215
216%description static
217Static version of dar backup tool.
218
9b828d75 219%description static -l pl.UTF-8
5f5a8b21 220Statyczna wersja archiwizatora dar.
221
5a9f3364
JB
222%package libs
223Summary: Shared version of dar library
83798cfc 224Summary(pl.UTF-8): Współdzielona wersja biblioteki dar
c8a764ad 225Group: Libraries
7f28cb4a 226%{?with_xattr:Requires: attr >= 2.4.16-3}
cd96d2aa
JB
227Requires: gpgme >= 1.2.0
228Requires: libgcrypt >= 1.6.0
7f28cb4a
JB
229%{?with_threads:Requires: libthreadar >= 1.3.1}
230Requires: zstd >= 1.3
5a9f3364
JB
231
232%description libs
233Shared version of dar library.
234
9b828d75
JR
235%description libs -l pl.UTF-8
236Współdzielona wersja biblioteki dar.
5a9f3364 237
09a398d2 238%package devel
c8a764ad 239Summary: Header files to develop dar software
83798cfc 240Summary(pl.UTF-8): Pliki nagłówkowe biblioteki dar
c8a764ad 241Group: Development/Libraries
242Requires: %{name}-libs = %{version}-%{release}
7f28cb4a 243%{?with_xattr:Requires: attr-devel >= 2.4.16-3}
b7684ca4 244Requires: bzip2-devel
7f28cb4a
JB
245Requires: gpgme-devel >= 1.2.0
246Requires: libargon2-devel
cd96d2aa
JB
247Requires: libcap-devel
248Requires: libgcrypt-devel >= 1.6.0
249Requires: libgpg-error-devel
7f28cb4a
JB
250Requires: librsync-devel
251Requires: libstdc++-devel >= 6:5
252%{?with_threads:Requires: libthreadar-devel >= 1.3.1}
253Requires: lz4-devel
cd96d2aa
JB
254Requires: lzo-devel >= 2
255Requires: xz-devel
3cc31188 256Requires: zlib-devel
7f28cb4a 257Requires: zstd-devel >= 1.3
09a398d2 258
259%description devel
097d504f 260Header files to develop software which operates on dar.
09a398d2 261
9b828d75
JR
262%description devel -l pl.UTF-8
263Pliki nagłówkowe potrzebne do rozwoju oprogramowania korzystającego z
097d504f
JB
264dara.
265
266%package libs-static
267Summary: Static version of dar library
83798cfc 268Summary(pl.UTF-8): Statyczna wersja biblioteki dar
c8a764ad 269Group: Development/Libraries
270Requires: %{name}-devel = %{version}-%{release}
097d504f
JB
271
272%description libs-static
273Static version of dar library.
274
9b828d75 275%description libs-static -l pl.UTF-8
097d504f 276Statyczna wersja biblioteki dar.
09a398d2 277
bca9e56e 278%package doc
279Summary: dar - documentation
83798cfc 280Summary(pl.UTF-8): dar - dokumentacja
bca9e56e 281Group: Documentation
282Requires: %{name} = %{version}-%{release}
283
284%description doc
285Dar ducumentation.
286
aa8e3fd8 287%description doc -l pl.UTF-8
bca9e56e 288Dokumentacja dla dar.
289
7f28cb4a
JB
290%package -n python3-libdar
291Summary: Python 3 binding for dar library
292Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki dar
293Group: Libraries/Python
294Requires: %{name}-libs = %{version}-%{release}
295
296%description -n python3-libdar
297Python 3 binding for dar library.
298
299%description -n python3-libdar -l pl.UTF-8
300Wiązanie Pythona 3 do biblioteki dar.
301
fbe89be6 302%prep
303%setup -q
e42712d8 304%patch0 -p1
fbe89be6 305
7f28cb4a
JB
306%{__sed} -i -e 's,\$(libdir)/python3/dist-packages,%{py3_sitedir},' src/python/Makefile.am
307
fbe89be6 308%build
a5f8478f 309%{__gettextize}
09a398d2 310%{__libtoolize}
311%{__aclocal}
312%{__autoconf}
313%{__autoheader}
314%{__automake}
315%configure \
248dd4dd 316 %{!?with_static:--disable-dar-static} \
7f28cb4a 317 %{!?with_xattr:--disable-ea-support} \
12760b79 318 --enable-mode=64 \
7f28cb4a 319 %{!?with_python:--disable-python-binding} \
23b7ee86 320 --enable-static%{!?with_static_libs:=no} \
7f28cb4a 321 %{!?with_threads:--disable-threadar} \
09a398d2 322 --disable-upx
323%{__make}
fbe89be6 324
325%install
326rm -rf $RPM_BUILD_ROOT
42343508 327%{?with_static:install -d $RPM_BUILD_ROOT/bin}
5f5a8b21 328
097d504f
JB
329%{__make} install \
330 DESTDIR=$RPM_BUILD_ROOT
fbe89be6 331
cd96d2aa 332%{?with_static:%{__mv} $RPM_BUILD_ROOT{%{_bindir},/bin}/dar_static}
5f5a8b21 333
bca9e56e 334ln -sf %{_datadir}/%{name} misc/doc
a9720b1c 335
cd96d2aa
JB
336# obsoleted by pkg-config
337%{__rm} $RPM_BUILD_ROOT%{_libdir}/libdar64.la
338
7f28cb4a
JB
339%{__rm} $RPM_BUILD_ROOT%{_datadir}/dar/{libdar_test.py,pybind11_libdar.cpp,python/libdar_test.py}
340
bac87f6c
KK
341%find_lang %{name}
342
fbe89be6 343%clean
344rm -rf $RPM_BUILD_ROOT
345
5a9f3364
JB
346%post libs -p /sbin/ldconfig
347%postun libs -p /sbin/ldconfig
09a398d2 348
bac87f6c 349%files -f %{name}.lang
fbe89be6 350%defattr(644,root,root,755)
cd96d2aa 351%doc AUTHORS ChangeLog NEWS README THANKS TODO misc/doc
407d29c6 352%attr(755,root,root) %{_bindir}/dar*
edcac7c2 353%dir %{_datadir}/%{name}
407d29c6 354%{_mandir}/man1/dar*.1*
651df1b8 355%attr(644,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/darrc
5f5a8b21 356
cd96d2aa
JB
357%if %{with static}
358%files static
359%defattr(644,root,root,755)
360%attr(755,root,root) /bin/dar_static
361%endif
362
97597b5c 363%files libs
5a9f3364 364%defattr(644,root,root,755)
12760b79 365%attr(755,root,root) %{_libdir}/libdar64.so.*.*.*
7f28cb4a 366%attr(755,root,root) %ghost %{_libdir}/libdar64.so.6000
97597b5c 367
09a398d2 368%files devel
369%defattr(644,root,root,755)
12760b79 370%attr(755,root,root) %{_libdir}/libdar64.so
09a398d2 371%{_includedir}/dar
853009b5 372%{_pkgconfigdir}/libdar64.pc
09a398d2 373
9369df59 374%if %{with static_libs}
097d504f
JB
375%files libs-static
376%defattr(644,root,root,755)
12760b79 377%{_libdir}/libdar64.a
9369df59 378%endif
bca9e56e 379
380%files doc
381%defattr(644,root,root,755)
407d29c6
JB
382%{_datadir}/%{name}/html
383%{_datadir}/%{name}/man
384%{_datadir}/%{name}/mini-howto
385%{_datadir}/%{name}/samples
7f28cb4a 386%{_datadir}/%{name}/*.css
407d29c6
JB
387%{_datadir}/%{name}/*.dtd
388%{_datadir}/%{name}/*.jpg
389%{_datadir}/%{name}/*.html
390%{_datadir}/%{name}/*.txt
391%{_datadir}/%{name}/README
7f28cb4a
JB
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.140925 seconds and 4 git commands to generate.