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